OnPlayerSpawn doesn't get called (FIXED)
#1

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>

Reply
#2

Check to see if OnPlayerRequestSpawn is being called.
Reply
#3

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

According to the SA:MP Wiki, yes.
Reply
#5

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)