Also ich wollte das man wenn man in den cp fährt 5 sek stehen bleiben muss aber man steht für immer da und ist gefreezet...
public OnPlayerEnterCheckpoint(playerid)
{
if(Muellmann[playerid][pmi_bAktiv]) {
Muellmann[playerid][pmi_Checkpoint]++;
TogglePlayerControllable(playerid,0);
SetTimer("muell",5000,0);
new
playercp = Muellmann[playerid][pmi_Checkpoint];
if(playercp == sizeof(Muellabfuhr_Stationen)) {
Muellmann[playerid][pmi_bAktiv]=false;
// Extra code
SendClientMessage(playerid, COLOR_GREEN, "Super Arbeit,du hast die Stadt hervorragend gesäubert");
GivePlayerMoney(playerid, 2000);
}
else {
SendClientMessage(playerid, COLOR_GREEN, "Müll wird aufgeladen.");
PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
}
return 1;
}
return 1;
}
public muell(playerid)
{
new String[128];
new playercp = Muellmann[playerid][pmi_Checkpoint];
TogglePlayerControllable(playerid,1);
format(String,sizeof(String),"Weiter so,du hast es fasst geschafft ! (%d / %d)",playercp,sizeof(Muellabfuhr_Stationen));
SendClientMessage(playerid,COLOR_LIGHTGREEN,String);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[playercp][M_fX],Muellabfuhr_Stationen[playercp][M_fY],Muellabfuhr_Stationen[playercp][M_fZ],Muellabfuhr_Stationen[playercp][M_fRad]);
}