SA-MP Forums Archive
Checkpoint problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Checkpoint problem (/showthread.php?tid=605173)



Checkpoint problem - andrejc999 - 15.04.2016

So I'm working on a job system and all of my jobs are working but one is not... When I enter the first checkpoint with vehicle it doesn't respond... It's weird I tried to fix it many times but it's still not working. Can someone help me? And I get no errors when I compile my script.

Here is the code:
Код:
public OnPlayerEnterCheckpoint(playerid)
{
        new vehid = GetPlayerVehicleID(playerid);
        if(vehid == Bus[1] || vehid == Bus[2] || vehid == Bus[3] || vehid == Bus[4] || vehid == Bus[5])
        {
	    if(busvoznja[playerid] == 1)
	    {
                DisablePlayerCheckpoint(playerid);
		busvoznja[playerid] = 2;
		SetTimerEx("WaitForJob", 3000, false, "i", playerid);
		TogglePlayerControllable(playerid, 0);
		SetPlayerCheckpoint(playerid, 1411.5480, -1734.8022, 12.8716, 5.0);
		SCM(playerid, COLOR_INFO, "Sacekajte da putnici udju u bus!");
 		return 1;
	    }
	    return 1;
	}
        return 1;
}