OnPlayerDeath
#3

pawn Код:
new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], PosZ[MAX_PLAYERS]; //to save players location
new died[MAX_PLAYERS]; //confirming he's dead
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    died[playerid] = 1; //he's dead
    GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]); //get his position now
        return 1;
    }
pawn Код:
if(died[playerid] == 1) //if he's dead
        {
            died[playerid] = 0; //dead reset
            SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]); //set his position back to where he was on respawn
            // Apply your animation here and more codes
        }
        return 1;
        }
Reply


Messages In This Thread
OnPlayerDeath - by PaulDinam - 06.01.2015, 18:37
Re: OnPlayerDeath - by HY - 06.01.2015, 18:45
Re: OnPlayerDeath - by Sid_Alexander - 06.01.2015, 18:48
Re: OnPlayerDeath - by PaulDinam - 06.01.2015, 18:51
Re: OnPlayerDeath - by Sid_Alexander - 06.01.2015, 18:53
Re: OnPlayerDeath - by HY - 06.01.2015, 18:54

Forum Jump:


Users browsing this thread: 2 Guest(s)