SA-MP Forums Archive
OnPlayerSpawn doesn't get called (FIXED) - 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: OnPlayerSpawn doesn't get called (FIXED) (/showthread.php?tid=439905)



OnPlayerSpawn doesn't get called (FIXED) - Flyfishes - 27.05.2013

Hi!

I'm having this problem when I've logged in to my server. All the stats load perfectly fine and I spawn at my old location but the callback OnPlayerSpawn doesn't get called. I have this code after the code has been loaded and all of that is executed.

PHP код:
SetSpawnInfo(extraid0playerVariables[extraid][pSkin], playerVariables[extraid][pPos][0], playerVariables[extraid][pPos][1], playerVariables[extraid][pPos][2], 0000000);
SpawnPlayer(extraid);
                        
SetPlayerVirtualWorld(extraidplayerVariables[extraid][pVirtualWorld]);
SetPlayerInterior(extraidplayerVariables[extraid][pInterior]); 
I've debugged the script (both the loading and the whole OnPlayerSpawn) by sending client messages (I often do that haha) and what I've come up with is that OnPlayerSpawn isn't getting called.

What's the cause of this and how can I fix it?


EDIT;

I'm using these includes in case anyone wonders.
Quote:

#include <a_samp>
#define FIXES_Single 1
#include <fixes>
#include <a_mysql>
#include <foreach>
#include <streamer>
#include <zcmd>
#include <sscanf2>
#include <strlib>
#include <a_zones>




Re: OnPlayerSpawn doesn't get called - Scenario - 27.05.2013

Check to see if OnPlayerRequestSpawn is being called.


Re: OnPlayerSpawn doesn't get called - Flyfishes - 27.05.2013

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Check to see if OnPlayerRequestSpawn is being called.
It's returning 0. That's what's causing it, huh?


Re: OnPlayerSpawn doesn't get called - Scenario - 27.05.2013

According to the SA:MP Wiki, yes.


Re: OnPlayerSpawn doesn't get called - Flyfishes - 27.05.2013

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
According to the SA:MP Wiki, yes.
Yep it worked. Thank you for your quick reply. I don't know why I might have set it to 0.

Thanks!