Death 255 - Please Help
#1

Alright, for some reason, I die every time I log into my server to test something. I don't know what's causing it, but in the server log, it says "[death] Joshua_Cather died 255" I tried setting up so that if that's the reason I die, I have it reset some stats and spawns you at a certain place, depending on the race you are. How do I fix it so that I don't die in the first place?

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(reason == 255)
    {
        if(Player[playerid][Race] == 1)
        {
            SetPlayerPos(playerid,468.8824, 881.1055, -29.1138);
            Player[playerid][Health] = 100;
            Player[playerid][Hunger] = 100;
            Player[playerid][Thirst] = 100;
            Player[playerid][Radiation] = 9;
        }
        else if(Player[playerid][Race] == 2)
        {
            SetPlayerPos(playerid, 214.7090, 1902.7179, 17.6406);
            Player[playerid][Health] = 100;
            Player[playerid][Hunger] = 100;
            Player[playerid][Thirst] = 100;
            Player[playerid][Radiation] = 9;
        }
        else if(Player[playerid][Race] == 3)
        {
            SetPlayerPos(playerid, 274.3081, 1412.3754, 10.4440);
            Player[playerid][Health] = 100;
            Player[playerid][Hunger] = 100;
            Player[playerid][Thirst] = 100;
            Player[playerid][Radiation] = 9;
        }
    }
   
    if(killerid != INVALID_PLAYER_ID)
    {
        Player[killerid][Kills]++;
        Player[playerid][Deaths]++;
    }
    else
    {
        Player[playerid][Deaths]++;
    }
    return 1;
}
This is all that's in my OnPlayerDeath. If anyone can help, it'd be greatly appreciated.
Reply


Messages In This Thread
Death 255 - Please Help - by Stephano - 14.03.2013, 02:55
Re: Death 255 - Please Help - by MP2 - 14.03.2013, 04:31
Re: Death 255 - Please Help - by Stephano - 14.03.2013, 20:22
Re: Death 255 - Please Help - by Stephano - 16.03.2013, 17:40
Re: Death 255 - Please Help - by Stephano - 17.03.2013, 04:17

Forum Jump:


Users browsing this thread: 1 Guest(s)