spawn at hospital when die
#10

Quote:
Originally Posted by Infamous
View Post
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;
}
I think there's no need for the variables.

Quote:
Originally Posted by Gooday
View Post
UPDATE: Not working Sorry for double post but i dunno to edit :/
What actually is the problem.Did you tried my code ?
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: 1 Guest(s)