Checkpoints not showing
#1

Hello fams,

I'm currently making new job for my server, simple one. Going from A checkpoint to B, from B to C and so on. I'm doing this job like any other that i've done. I'm facing one problem that i'm currently unable to solve on my own. When i start job with my command.

Код:
CMD:startjob(playerid, params[])
{
	if(GetPlayerVehicleID(playerid) <= DostavljacPaketa[0] && GetPlayerVehicleID(playerid) >= DostavljacPaketa[3]) return 1;
	DostavljaPakete[playerid] = 1;
	CheckpointX[playerid] = -2106.9138;
	CheckpointY[playerid] = -269.4246;
	CheckpointZ[playerid] = 35.1084;
	CheckpointR[playerid] = 6.0;
	h_SetPlayerCheckpoint(playerid, CheckpointX[playerid], CheckpointY[playerid], CheckpointZ[playerid], CheckpointR[playerid]);
	return 1;
}
This part works fine. It set my variable to 1, just so i can check it later when player enter checkpoint if he is actually doing job and also checkpoint works fine. But the problem i got is in
Код:
public OnPlayerEnterCheckpoint(playerid)
. When i enter into that checkpoint nothing actually happens. Literally nothing especially not another checkpoint showing. Here is that part of code.
Код:
if(PI[playerid][Posao] == POSAO_DOSTAVLJACA_PAKETA)
	{
	    if(Vid >= DostavljacPaketa[0] && Vid <= DostavljacPaketa[3] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	    {
	        if(IsPlayerInRangeOfPoint(playerid, 6.0, -2106.9138, -269.4246, 35.1084) && DostavljaPakete[playerid] == 1)
	        {
				DisablePlayerCheckpoint(playerid);
				CheckpointX[playerid] = -2079.7021;
				CheckpointY[playerid] = -296.1814;
				CheckpointZ[playerid] = 35.4141;
				CheckpointR[playerid] = 6.0;
				DostavljaPakete[playerid] = 2;
				SetPlayerCheckpoint(playerid, CheckpointX[playerid], CheckpointY[playerid], CheckpointZ[playerid], CheckpointR[playerid]);
				//h_SetPlayerCheckpoint(playerid, -2111.9641,-223.0582,35.3125, 6.0);
	        }
	    }
	}
Can someone point me what am I doing wrong here, because i can't find my misstake.

Thank you in advance.
Reply
#2

Anyone? ^_^
Reply
#3

Sorry but it looks like your code is ready to delete and make new one.
Try this tutorial for making job it's not that hard.
https://sampforum.blast.hk/showthread.php?pid=2057748#pid2057748
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)