SA-MP Forums Archive
OnPlayerSpawn called twice - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerSpawn called twice (/showthread.php?tid=105675)



OnPlayerSpawn called twice - Coicatak - 30.10.2009

OnPlayerSpawn is called twice when a player connects. Am I the only one tu have this bug?


Re: OnPlayerSpawn called twice - Sergei - 30.10.2009

Never heard this before, so it has to be problem on your side somewhere.


Re: OnPlayerSpawn called twice - GaGlets(R) - 30.10.2009

Try to fin another onplayerspawn with (FIND) button in you script..


Re: OnPlayerSpawn called twice - Sergei - 30.10.2009

Actually, how do you know it's getting called twice?


Re: OnPlayerSpawn called twice - Coicatak - 30.10.2009

pawn Код:
public OnPlayerSpawn(playerid)
{
    SendClientMessage(playerid, ORANGE, "DEBUG: OnPlayerSpawn");
    //my code here
    return 1;
}
The message displays twice on connect. But not when you respawn after dying.

I don't call OnPlayerSpawn in my GM so I don't understand what's wrong...


Re: OnPlayerSpawn called twice - gemadon - 31.10.2009

I have this SOMETIMES, which makes it so players must /kill so they can play.


Re: OnPlayerSpawn called twice - Danny_Costelo - 31.10.2009

OnPlayerSpawn is not called twice, I just tested it..

print("DEBUG: OnPlayerSpawn Called."); - It was only called once for each spawn.


Re: OnPlayerSpawn called twice - Coicatak - 31.10.2009

Ok thanks so it's GM side...


Re: OnPlayerSpawn called twice - member - 31.10.2009

Slightly a bit offtopic, but my OnPlayerSpawn isnt getting called. It gets called when I first connect, but after death it sometimes (most of the time) the player isnt respawned, but just remains dead with the health bar flashing. I dont know whats gone wrong.


Re: OnPlayerSpawn called twice - Misiek - 31.10.2009

If you use TogglePlayerSpectating(), then when you turn it off don't use SpawnPlayer() next to it. That's what's causing it.