19.03.2018, 18:27
Return only at the end, or where you want to finalize the code scope.
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if((MilitarJob[playerid] == 1) && (pInfo[playerid][pSkin] == 287))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2741.6865,-1504.8694,30.9064, 5.0);
AddSlotToInventoryWorld(playerid,"Sticla de Apa Plina",1);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}Sticla de Apa Plina {FFCC33}pentru primul transport al gunoiului!");
MilitarJob[playerid] = 2;
}
if(MilitarJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2703.7903,-1065.6555,69.8232, 5.0);
GivePlayerMoney(playerid, 4321);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}4321 $ {FFCC33}pentru al doilea transport al gunoiului!");
MilitarJob[playerid] = 3;
}
return 1;
}