SA-MP Forums Archive
Spawn bug? - 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: Spawn bug? (/showthread.php?tid=370961)



Spawn bug? - ValentinLaw - 21.08.2012

Soo I have this code:

PHP код:
public OnPlayerSpawn(playerid)                    // OnPlayerSpawn Callback
    
{
    if(
Alive[playerid] == false) return 0;
    }
    return 
1;

And this code:

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
pInfo[playerid][pAlive] = false;
    return 
1;

It compiles fine yet it wont work.


Re: Spawn bug? - Whitetiger - 21.08.2012

return 0; in OnPlayerSpawn doesn't prevent the spawn from happening. if you don't want a player to spawn you will have to put them in spectator or in class selection. also those aren't even the same variable, as one is in the pInfo enum and the other is just a regular array