spawn at hospital when die
#7

Might be an idea to set HasDied[playerid] = 0; under the SetPlayerPos bit in OnPlayerSpawn and under OnPlayerConnect HasDied[playerid] = 0; just to ensure nothing goes wrong.

pawn Code:
// Top of script

new HasDied[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    HasDied[playerid] = 0;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(HasDied[playerid] == 1)
    {
        SetPlayerPos(..
        SetPlayerFacingAngle(..
        HasDied[playerid] = 0;
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    HasDied[playerid] = 1;
    return 1;
}
Reply


Messages In This Thread
spawn at hospital when die - by Gooday - 12.03.2012, 17:07
Re: spawn at hospital when die - by Infamous - 12.03.2012, 17:10
Re: spawn at hospital when die - by Ronaldo_raul™ - 12.03.2012, 17:11
Re: spawn at hospital when die - by Gooday - 12.03.2012, 17:15
Re: spawn at hospital when die - by Infamous - 12.03.2012, 17:16
Re: spawn at hospital when die - by Gooday - 12.03.2012, 17:18
Re: spawn at hospital when die - by Infamous - 12.03.2012, 17:21
Re: spawn at hospital when die - by Gooday - 12.03.2012, 17:22
Re: spawn at hospital when die - by Infamous - 12.03.2012, 17:25
Re: spawn at hospital when die - by Ronaldo_raul™ - 12.03.2012, 17:29

Forum Jump:


Users browsing this thread: 5 Guest(s)