Guten Tag,
Ich versuche gerade ein Kleines Auto Kauf system zu basteln aber bei mir geht irgentwie nicht Links/Rechts und Leertaste
Also Links um das nächste auto zu wählen Rechts um das andere zu wählen
Leertaste um kauf abzubrechen
und Eingabe geht irgentwie also zum auto kaufen
hier ma ein teil des Scripts es ist die Taste für Links
if (PRESSED(KEY_LEFT))
{
if(car1[playerid] == 1)
{
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3Sabre);
TextDrawShowForPlayer(playerid,Textdraw4Sabre);
TextDrawShowForPlayer(playerid,Textdraw5Sabre);
TextDrawShowForPlayer(playerid,Textdraw6Sabre);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
auto1 = CreateVehicle(475,2482.4724,-1783.7843,13.2616,233.1395,125,125,0);
PutPlayerInVehicle(playerid, auto1, 0);
DestroyVehicle(auto2);
car2[playerid] = 0;
car1[playerid] = 1;
}
else if(car2[playerid] == 1)
{
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3Alpha);
TextDrawShowForPlayer(playerid,Textdraw4Alpha);
TextDrawShowForPlayer(playerid,Textdraw5Alpha);
TextDrawShowForPlayer(playerid,Textdraw6Alpha);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
auto2 = CreateVehicle(602,2482.4724,-1783.7843,13.2616,233.1395,125,125,0);
PutPlayerInVehicle(playerid, auto2, 0);
DestroyVehicle(auto1);
car2[playerid] = 1;
car1[playerid] = 0;
}
}
Hoffe ihr könnt mir helfen
MFG: Evil
EDIT: Das habe ich unter dem Public OnPlayerKeyStateChange