SA-MP Forums Archive
call order of callback - 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: call order of callback (/showthread.php?tid=532103)



call order of callback - fragclown - 16.08.2014

Hi for better understanding i want to know what is the call order of public callbavk when a player connect to the server.
For exemple --> OnPlayerConnect ->OnPlayerRequestClass...
I want to know the exact order.

I have another question: i know that pawn have no heap all the data allocated onto the stack so how can array be returned from function, it would point to an invalid stack location


Re: call order of callback - Affan - 16.08.2014

It's basically upto OnPlayerSpawn.

OnplayerConnect > OnlayerRequestClass > OnPlayerSpawn.


Re: call order of callback - fragclown - 16.08.2014

ok thanks, i tried to spawn the player in the callback OnPlayerSpawnClass using Spawn(playerid); but it dosen't work, nothing happen until the player click on spawn button.

what exactly i want to do is to spawn directly the player after connection.