Help: OnPlayerEnterCP
#1

Today , i created a Checkpoint using Incognito's Streamer Plugin.

i created a variable
pawn Код:
new checkpoint1;
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
Reply
#2

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.
Reply
#3

Thank you very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)