Sziasztok.
Olyan problémám van, hogy kétszer leszállítom a dobozokat utána felvenném a dobozokat de ugye nem történik a CP-nél semmi..
Hogy tudnám megoldani hogy ezt a 3 case-t ismételje ha vége?
if(DobozSzallitas[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new carid = GetPlayerVehicleID(playerid);
new rnd = random(sizeof(Epitkezesek));
if(Szallito(carid))
{
switch(Cpickup[playerid][0])
{
case 0:
{
TogglePlayerControllable(playerid,0);
SetTimerEx(\"Dobozrakodas\", 10000, false, \"i\", playerid);
GameTextForPlayer(playerid,\"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Felrakják a dobozokat.\",10000,3);
SetPlayerCheckpoint(playerid,Epitkezesek[rnd][0],Epitkezesek[rnd][1],Epitkezesek[rnd][2],3.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 1:
{
DisablePlayerCheckpoint(playerid);
TogglePlayerControllable(playerid,0);
SetTimerEx(\"DobozLeszallitva\", 20000, false, \"i\", playerid);
GameTextForPlayer(playerid,\"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Kipakolják a dobozokat.\",20000,3);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 2:
{
TogglePlayerControllable(playerid,0);
SetTimerEx(\"Dobozrakodas\", 10000, false, \"i\", playerid);
GameTextForPlayer(playerid,\"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Felrakják a dobozokat.\",10000,3);
SetPlayerCheckpoint(playerid,Epitkezesek[rnd][0],Epitkezesek[rnd][1],Epitkezesek[rnd][2],3.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 3:
{
DisablePlayerCheckpoint(playerid);
TogglePlayerControllable(playerid,0);
SetTimerEx(\"DobozLeszallitva\", 20000, false, \"i\", playerid);
GameTextForPlayer(playerid,\"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Kipakolják a dobozokat.\",20000,3);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
}
Cpickup[playerid][0]++;
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
}
}
return 1;
}