14.02.2018, 15:05
No... you need to show where the checkpoint is set thats the same code as above and its too vague,
You need to realize that OnPlayerEnterCheckpoint is called for every checkpoint so for EX if i wanna make a certain checkpoint say "hi" i'll do it like this:
that's for setting, when you enter:
That's the basic idea, read that and compare to see where you went wrong.
On the other hand if you already knew what i explained above, show me where you set the player's CP and where is it called at the OPECP callback.
You need to realize that OnPlayerEnterCheckpoint is called for every checkpoint so for EX if i wanna make a certain checkpoint say "hi" i'll do it like this:
PHP код:
CMD:msghi(playerid, prams[])
{
SetPlayerCheckPoint(playerid, x,y,z, range);//setting the CP
playermsgcp[playerid] = true;//to determine the CP
return 1;
}
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(playermsgcp[playerid])//if the CP was set for that player
{
SendClientMessage(playerid, -1, "hi");//send the msg
DisablePlayerCheckpoint(playerid);//disable the cP
playermsgcp[playerid] = false;//reset variable for next use.
}
return 1;
}
On the other hand if you already knew what i explained above, show me where you set the player's CP and where is it called at the OPECP callback.