Checkpoint not working.
#1

So when I do a Checkpoint, (for a GPS thing) and I have a command to make it show up, but right when you make the checkpoint it send the message for when you enter even if you are not in the check point here is the codes

Код:
public OnPlayerEnterCheckpoint(playerid)
	{
	DisablePlayerCheckpoint(playerid);
    	SendClientMessage(playerid, COLOR_RED, "You have reached your destination!");
    	return 1;
	}
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{	
        if(!strcmp(cmdtext, "/gps lspd"))
	{
	    SendClientMessage(playerid, COLOR_RED, "GPS Set to LSPD-Follow the Red Checkpoint");
    	SetPlayerCheckpoint(playerid,1529.5492,-1674.8779,13.3828,268.7893);
		return 1;
	}
	return 0;
}
Reply
#2

Try checking for player coordinates too by using IsPlayerInArea or something.
Reply
#3

pawn Код:
SetPlayerCheckpoint(playerid,1529.5492,-1674.8779,13.3828,268.7893);
This looks to be the problem dude. Looks like you set the X,Y,Z, and Angle

Proper Usage:
pawn Код:
SetPlayerCheckpoint(playerid,X,Y,Z,SIZE);
So it'll be

pawn Код:
SetPlayerCheckpoint(playerid,1529.5492,-1674.8779,13.3828,5.0);
Let me know if that helps.
Reply
#4

How do you know the proper (playerid,X,Y,Z,SIZE);?
Reply
#5

Quote:
Originally Posted by ajmac22
Посмотреть сообщение
How do you know the proper (playerid,X,Y,Z,SIZE);?
Tp Get the X Y Z Just use Real Samp Map editor then once you made something click show code the first 3 numbers ex:
12.000, 12.000, -12.000 A.
Are the X Y and Z
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)