[HOSPITAL SYSTEM] i need help with it please
#3

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:
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;
}
And on DEAD1(playerid) i would add SetCameraBehindPlayer(playerid);
Hope this help
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)