if(SP[playerid] ==1)
{
SetPlayerCheckpoint(playerid,1968.5508,-1621.8459,15.9688,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,1968.5508,-1621.8459,15.9688))
{
SetTimerEx("SP1Timer", 3000, false, "i", playerid);
GameTextForPlayer(playerid,"Du Packst den Müll in dein Auto rein!",3000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=2;
}
}
else if(SP[playerid] == 2)
{
SetPlayerCheckpoint(playerid,2498.5173,-1673.9349,13.3440,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,2498.5173,-1673.9349,13.3440))
{
SetTimerEx("SP1Timer", 3000, false, "i", playerid);
GameTextForPlayer(playerid,"Du Packst den Müll in dein Auto rein!",3000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=3;
}
}
else if(SP[playerid] == 3)
{
SetPlayerCheckpoint(playerid,2135.9063,-1296.2659,23.8281,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,2135.9063,-1296.2659,23.8281))
{
SetTimerEx("SP1Timer", 3000, false, "i", playerid);
GameTextForPlayer(playerid,"Du Packst den Müll in dein Auto rein!",3000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=4;
}
}
else if(SP[playerid] == 4)
{
SetPlayerCheckpoint(playerid,369.7742,-2033.6711,7.6719,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,369.7742,-2033.6711,7.6719))
{
SetTimerEx("SP1Timer", 3000, false, "i", playerid);
GameTextForPlayer(playerid,"Du Packst den letzten Müll in dein Auto rein und bist fertig!",3000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=5;
}
}
else if(SP[playerid] == 5)
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
GameTextForPlayer(playerid,"Du hast dein Job super gemacht und erhälts 1200$",3000,4);
GivePlayerMoney(playerid,1200);
SetVehicleToRespawn(vehicle);
}
so ich bekomme keine errors
oben hab eich noch das
forward SP1Timer(playerid);
new SP[MAX_PLAYERS];
Unten den Public vom timer
public SP1Timer(playerid)
{
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid,"du hast den Müll eingeladen weiter!",3000,4);
}
Und ingame passiert nix!
@edit Command
Hier mal mein command um die Tour zu starten
if(strcmp("/müll", cmdtext,true) == 0)
{
new car1 = GetPlayerVehicleID(playerid);
if(GetVehicleModel(car1) == 408)
{
if(SpielerInfo[playerid][Jobs]==1)
{
SP[playerid]=1;
SendClientMessage(playerid,BLAU,"Fahre zum Checkpoint");
SetPlayerCheckpoint(playerid,1968.5508,-1621.8459,15.9688,5);
}
else
{
SendClientMessage(playerid,ROT,"Du bist in keinen Müllauto!");
}
return 1;
}
}