Onplayerdeath problem
#3

pawn Код:
new bool:InHospital[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    InHospital[playerid] = true;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(InHospital[playerid])
    {
        SetPlayerPos(playerid, 1237.1611,304.9076,24.7578);
        SetPlayerCameraPos(playerid, 1251.0834,353.5869,26.5555);
        SetPlayerCameraLookAt(playerid, 1247.0811,325.1535,24.7578);
        SetTimerEx("HospitalRelease", 30000, 0, "i", playerid);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 0);
        SetTimerEx("HosCam", 1000, 0, "i", playerid);
    }
    return 1;
}
Remember in the function 'HospitalRelease' to set 'InHospital' to false for that player using:

pawn Код:
InHospital[playerid] = false;
Reply


Messages In This Thread
Onplayerdeath problem - by virusa1 - 16.03.2013, 11:25
Re: Onplayerdeath problem - by Colossus874 - 16.03.2013, 11:27
Re: Onplayerdeath problem - by Bicentric - 16.03.2013, 11:29
Re: Onplayerdeath problem - by virusa1 - 16.03.2013, 11:31
Re: Onplayerdeath problem - by Bicentric - 16.03.2013, 11:32
Re: Onplayerdeath problem - by virusa1 - 16.03.2013, 11:36
Re: Onplayerdeath problem - by daddyblake - 16.03.2013, 11:52

Forum Jump:


Users browsing this thread: 3 Guest(s)