Help: OnPlayerEnterCP - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help: OnPlayerEnterCP (
/showthread.php?tid=273203)
Help: OnPlayerEnterCP -
(LifeStealeR) - 31.07.2011
Today , i created a Checkpoint using Incognito's Streamer Plugin.
i created a variable
I added on OnPlayerSpawn
pawn Код:
checkpoint1 = CreateDynamicCP(playerid, X,Y,Z);
At: OnPlayerEnterCP(playerid, checkpointid); i added:
pawn Код:
if(checkpointid = checkpoint1 )
{
// other codes
And i have a comand , and i want to use that command only when i am in that checkpoint. I searched on forum , but i founded
IsPlayerInDynamicCP(playerid, checkpointid); , without an example. I'm wonderig if you guys can help me
Re: Help: OnPlayerEnterCP -
Onyx - 31.07.2011
Instead of this...
pawn Код:
if(checkpointid = checkpoint1 )
{
// CODE
}
...use this.
pawn Код:
if(PlayerInRangeOfPoint(playerid, range, X,Y,Z (X,Y,Z need to be same with your choosed SetPlayerCheckpoint X,Y,Z cordinates));
{
// CODE
}
And you don't need to use variable for SetPlayerCheckpoint.
Re: Help: OnPlayerEnterCP -
(LifeStealeR) - 31.07.2011
Thank you very much