Player don't respawn on death?!
#1

http://i.imgur.com/E1rLHAp.jpg
How is this possible? the player remain with 0 hp but is not respawning..
My script

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        if(WarState == 1)
        {
            if(PlayerInfo[playerid][pMember] == WarID1 || PlayerInfo[playerid][pMember] == WarID2)
            {
                if(PlayerInfo[playerid][pMember] != PlayerInfo[killerid][pMember])
                {
                    if(PlayerInfo[killerid][pMember] == WarID1) { Score1 ++; }
                    if(PlayerInfo[killerid][pMember] == WarID2) { Score2 ++; }
                    WarScoreK[killerid] ++;
                    WarScoreD[playerid] ++;
                    new str[256];
                    new ttext[50];
                    if(WarID1 == 5) { ttext = "Corona"; }
                    if(WarID1 == 6) { ttext = "Vinewood"; }
                    if(WarID1 == 7) { ttext = "Guerilla"; }
                    if(WarID1 == 8) { ttext = "Saints"; }
                    new ttext2[50];
                    if(WarID2 == 5) { ttext2 = "Corona"; }
                    if(WarID2 == 6) { ttext2 = "Vinewood"; }
                    if(WarID2 == 7) { ttext2 = "Guerilla"; }
                    if(WarID2 == 8) { ttext2 = "Saints"; }
                    new timeleft = WarLeft;
                    format(str,sizeof(str),"Razboi in desfasurare~N~%s ~y~(%d)~W~ vs %s ~y~(%d)~W~~N~~y~%d~W~ minute ramase",
                    ttext,Score1,ttext2,Score2,timeleft);
                    TextDrawSetString(WarScore, str);
                    format(str, 256, "{FCAC3A}(Rгzboi Teritoriu) {FCAC3A}%s l-a omorat pe %s in timpul rгzboiului.", GetName(killerid), GetName(playerid));
                    TrimiteFactiune(WarID1,0, str);
                    TrimiteFactiune(WarID2,0, str);
                }


            }
        }
    }

    if(killerid != INVALID_PLAYER_ID)
    {
        PlayerInfo[playerid][pDeaths] ++, PlayerInfo[killerid][pKills] ++;
    }
    if(Ladder1Timer[playerid] != 0)
    {
        KillTimer(Ladder1Timer[playerid]);
        KillTimer(Ladder1Timer2[playerid]);
        Laddering[playerid] = 0;
    }
    if(IsWorking[playerid] == 1)
    {
        OpresteMunca(playerid);
    }
    if(dVehicleUsing[playerid] == 1)
    {
        SetPlayerWeatherEx(playerid, worldtimeid);
        SetPlayerTimeEx(playerid,hourtimeid,0);
        dVehicleTunned[playerid] = 0;
        dVehicleUsing[playerid] = 0;
        CancelSelectTextDraw(playerid);
        ClockShow(playerid);
        TextDrawHideForPlayer(playerid, DealershipulBG1);
        TextDrawHideForPlayer(playerid, DealershipulBG2);
        TextDrawHideForPlayer(playerid, DealershipulBG3);
        TextDrawHideForPlayer(playerid, DealershipulBG4);
        TextDrawHideForPlayer(playerid, DealershipulBG5);
        PlayerTextDrawHide(playerid, DealershipModelTD[playerid]);
        PlayerTextDrawHide(playerid, DealershipPriceTD[playerid]);
        PlayerTextDrawHide(playerid, DealershipStockTD[playerid]);
        SetPlayerVirtualWorld(playerid , 0 );
        DestroyVehicle(VehiculDS[playerid]);
    }
    if(IsHavingBlowjob[playerid] == 1)
    {
        if(IsHavingBlowjobFrom[playerid] == 2)
        {
            ClearActorAnimations(whorenpc2);
            DestroyActor(whorenpc2);
            whorenpc2 = CreateActor(245, 1928.7070,-2111.6855,13.6953,357.9971 );
            whorenpc2busy = 0;
            IsHavingBlowjob[playerid] = 0;
            KillTimer(whorenpctimer[playerid]);
            IsHavingBlowjobFrom[playerid] = 0;
        }
        if(IsHavingBlowjobFrom[playerid] == 1)
        {
            ClearActorAnimations(whorenpc1);
            DestroyActor(whorenpc1);
            whorenpc1 = CreateActor(152, 480.6221,-26.3759,1003.1094,344.5060);
            whorenpc1busy = 0;
            IsHavingBlowjob[playerid] = 0;
            IsHavingBlowjobFrom[playerid] = 0;
            KillTimer(whorenpctimer[playerid]);

        }
        if(IsHavingBlowjobFrom[playerid] == 3)
        {
            ClearActorAnimations(whorenpc3);
            DestroyActor(whorenpc3);
            whorenpc2 = CreateActor(64,107.1006,-1521.7814,7.3448,145.3264);
            whorenpc3busy = 0;
            IsHavingBlowjob[playerid] = 0;
            IsHavingBlowjobFrom[playerid] = 0;
            KillTimer(whorenpctimer[playerid]);
        }

    }

    if(IsBuyingSkin[playerid] == 1)
    {
        ClockShow(playerid);
        HideSkinTextdraws(playerid);
        SetPlayerVirtualWorld(playerid, 0);
        CancelSelectTextDraw(playerid);
        IsBuyingSkin[playerid] = 0;
    }
    new caller = Mobile[playerid];
    if(caller != 255)
    {
        SendClientMessage(caller,  COLOR_GRAD2, "   The line just went dead....");
        Mobile[caller] = 255;
        Mobile[playerid] = 255;
        PlayerInfo[playerid][pCreditPhone] -= 10;
        PlayerInfo[caller][pCreditPhone] -= 10;
    }
    if(killerid != INVALID_PLAYER_ID)
    {
        if(IsBlooding[playerid] != 1)
        {
            if(PlayerInfo[playerid][pJailTime] != 0 && PlayerInfo[killerid][pJailTime] != 0)
            {
                PlayerInfo[killerid][pIsolated] =1;
                PlayerInfo[killerid][pIsoTime] += 10;
                SpawnPlayerEX(killerid);
                return 1;
             }
            if(PlayerInfo[playerid][pJailTime] != 0) return 1;
            if(PlayerInfo[killerid][pMember] == 1) return 1;
            if(WarState == 1)
            {
                if(PlayerInfo[playerid][pMember] == WarID1 && PlayerInfo[killerid][pMember] == WarID2) return 1;
                if(PlayerInfo[playerid][pMember] == WarID2 && PlayerInfo[killerid][pMember] == WarID1) return 1;
            }
            PlayerInfo[killerid][pWanted] += 1; if(PlayerInfo[killerid][pWanted] > 5) { PlayerInfo[killerid][pWanted] = 6; }
            SetPlayerWantedLevel(killerid, PlayerInfo[killerid][pWanted]);
            new string[456];
            format(string,sizeof(string), " Ai fost ucis de cгtre %s autoritгtile au fost anuntate automat!", GetName(killerid));
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
        }
    }
    killerid = INVALID_PLAYER_ID;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)