22.07.2011, 12:26
I think the problem comes here. Everytime someone dies program goes trough OnPlayerDeath(), and when he finishes it he automaticly goes OnPlayerSpawn() and spawns player. I think you should make a global varialble which will tell callback OnPlayerSpawn not to spawn player. For example:
And on DEAD1(playerid) i would add SetCameraBehindPlayer(playerid);
Hope this help
pawn Код:
new gPlayerDied[MAX_PLAYERS];
OnPlayerDeath(playerid,killerid,reason)
{
gPlayerDied[playerid]=1;
return 1;
}
OnPlayerSpawn(playerid)
{
if(gPlayerDied[playerid]==1)
return 0;
else return 1;
}
Hope this help