OnPlayerEnterCheckpoint(playerid)
#1

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 ?
Reply
#2

They behave the same, onplayerenterdynamicp is called only when u use the streamer's function. same goes to the default callback
Reply
#3

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)