OnPlayerSpawn called twice
#1

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

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

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

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

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...
Reply
#6

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

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

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

Ok thanks so it's GM side...
Reply
#9

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.
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)