OnPlayerSpawn not called anymore? -
Ash. - 03.12.2010
[size=4pt][b]I failed. I forgot to return anything in another filterscript - i fixed that and now everything works...[b][/size]
Hi all, I was testing out some code that i had rescripted (at 1 this morning GMT time
) - and it seems that OnPlayerSpawn doesnt get called anymore...
pawn Code:
public OnPlayerSpawn(playerid)
{
print("OnPlayerSpawn was called");
return 1;
}
//Obviously this isnt the code that i'd rescripted, this was for testing purposes xD
I compiled that, went in game, nothing was printed, on the server console or the server_log - i have tried it without returning or return 1 / -1 / 0, still nothing.
Thanks
Ash
Re: OnPlayerSpawn not called anymore? -
Auxxx - 03.12.2010
Well that's odd... Make sure, that you are using the right GameMode (check the config file), nothing else I could suggest you to do.
Re: OnPlayerSpawn not called anymore? -
Ash. - 03.12.2010
It was in an FS taht i loaded myself via Server Console (Windows) - I have alse just recently tried it out on Linux and still nothing :S
Its very unusual...
Im going to go through my other scripts and make sure i return 1 in OnPlayerSpawn to see if that helps...
Re: OnPlayerSpawn not called anymore? -
The_Moddler - 03.12.2010
Show hole OnPlayerSpawn code..
Re: OnPlayerSpawn not called anymore? -
Ash. - 03.12.2010
First post - thats what i tested on a blank gm and it still didnt work
Re: OnPlayerSpawn not called anymore? -
Enerv - 03.12.2010
Do you use the function at all?
pawn Code:
public OnPlayerRequestSpawn(playerid)
{
SpawnPlayer(playerid); //Spawn me after connecting.
return 1;
}
Add this and try it now.
Re: OnPlayerSpawn not called anymore? -
On_Top_Non_Stop - 06.05.2011
Sorry to bump an old topic but it was better than making a new one.
A few days ago I wrote up a simple game mode with car spawn and a few teleports just to mess around in.
Every thing was fine when I left the server but the next day I found OnPlayerSpawn was not being called..
I wrote another mode, very simple with nothing but a few cars dotted here and there and again, I have the same problem. I managed to fix it on the first mode, no idea how but I can't on my second mode.
If any one has any idea what might cause it, please let me know.
Here are my coords after spawning.
pawn Code:
AddPlayerClass(0,17381391569063613000000000.0000,4544820010223581900000000000000.0000,18314355250257052000000000.0000,0.0000,0,0,0,0,0,0); //
AddPlayerClass(0,17381391569063613000000000.0000,4544820010223581900000000000000.0000,18314355250257052000000000.0000,0.0000,0,0,0,0,0,0); // 2
EDIT: Fixed.
Reproduce: Don't add a player class to your mode (you will get CJ) and press shift as soon as you connect.
Fix: Add player classes lol..