OnPlayerEnterCheckpoint(playerid) - 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: OnPlayerEnterCheckpoint(playerid) (
/showthread.php?tid=398908)
OnPlayerEnterCheckpoint(playerid) -
Azazelo - 11.12.2012
How to make difference between this two call back ?
OnPlayerEnterCheckpoint(playerid)//default by SA-MP
OnPlayerEnterDynamicCP(playerid, checkpointid)//streamer by incognito
This callbacks called at same time. Why ?
Re: OnPlayerEnterCheckpoint(playerid) -
Nordic - 12.12.2012
They behave the same, onplayerenterdynamicp is called only when u use the streamer's function. same goes to the default callback
Re: OnPlayerEnterCheckpoint(playerid) -
RajatPawar - 12.12.2012
In SA-MP, by default you can only create/define ONE checkpoint, however thanks to Incognito, you can create now, multiple checkpoints. If you are not using streamer, you can create only one checkpoint and 'OnPlayerEnterCheckpoint' is the callback that gets called when you enter that ONE checkpoint.
However if you are using streamer, you can create multiple checkpoints, for example,
pawn Код:
checkpoint1 = CreateDynamicCP...'
so when the player enters a Dynamic Checkpoint, OnPlayerEnterDynamicCP gets called where you can define on entering WHICH checkpoint, what should be executed, etc.
For example:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if (checkpointid==checkpoint1)
{
//Your code here
}
return 1;
}