Checkpoint not working. - 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 not working. (
/showthread.php?tid=396234)
Checkpoint not working. -
ajmac22 - 29.11.2012
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;
}
Re: Checkpoint not working. -
PlayLSX_Founder - 30.11.2012
Try checking for player coordinates too by using IsPlayerInArea or something.
Re: Checkpoint not working. -
Kreyg - 30.11.2012
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.
Re: Checkpoint not working. -
ajmac22 - 30.11.2012
How do you know the proper (playerid,X,Y,Z,SIZE);?
Re: Checkpoint not working. -
cluckintucker - 30.11.2012
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