Player respawn
#1

How we can check in OnPlayerSpawn is player after death?
Reply
#2

pawn Код:
new Death[MAX_PLAYERS]; // put this wherever, under #include or #define

public OnPlayerDeath(playerid, killerid, reason)
{
    Death[playerid] = 1; // set the variable to 1, which mean, player is dead.
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(Death[playerid] == 1) // check the player death status
    {
        //if player spawns because of death, do something
    }
    return 1;
}
Reply
#3

what you mean ?
Reply
#4

Quote:
Originally Posted by VenomMancer
Посмотреть сообщение
what you mean ?
He wants to check, if player respawning (OnPlayerSpawn) because of death (OnPlayerDeath).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)