Removing damages
#3

Yeah, I'm already doing that but it still kills the player.

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
    new 
DeathB;
    new 
DeathS[128];
    new 
Float:PlayerHealth;
    
GetPlayerHealth(playeridPlayerHealth);
    if (
PlayerHealth amount 5)
    if(
Character[playerid][BrutalM] == 0)
        {
            
ClearPlayerWeapons(playerid);
            
GetPlayerPos(playeridBMPos[playerid][0], BMPos[playerid][1], BMPos[playerid][2]);
            
Character[playerid][BrutalM] = 1;
            
Character[playerid][CanAccept] = 0;
            
LegHit[playerid] = 0;

            
format(DTextSsizeof(DTextS), "(( %s is currently injured, type /damages %i for more info. ))"GetName(playerid), playerid);
            
label[playerid] = Create3DTextLabel(DTextSCOLOR_REDBMPos[playerid][0], BMPos[playerid][1], BMPos[playerid][2], 10.00);
            
Attach3DTextLabelToPlayer(label[playerid], playerid000.7);

            if(
Character[playerid][Level] <= 10)
            {
                 
ClearPlayerWeapons(playerid);
                
DeathB RandomEx(100500);
                
GivePlayerMoney(playerid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(playeridCOLOR_LIGHTPINKDeathS);
                
SCM(playeridCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(playeridCOLOR_LIGHTRED"To accept death type /acceptdeath");
            }
            else if(
Character[playerid][Level] <= 20 && Character[playerid][Level] > 10)
            {
                
ClearPlayerWeapons(playerid);
                
DeathB RandomEx(100750);
                
GivePlayerMoney(playerid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(playeridCOLOR_LIGHTPINKDeathS);
                
SCM(playeridCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(playeridCOLOR_LIGHTRED"To accept death type /acceptdeath");
            }
            else if(
Character[playerid][Level] <= 30 && Character[playerid][Level] > 20)
            {
                
ClearPlayerWeapons(playerid);
                
DeathB RandomEx(1001250);
                
GivePlayerMoney(playerid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(playeridCOLOR_LIGHTPINKDeathS);
                
SCM(playeridCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(playeridCOLOR_LIGHTRED"To accept death type /acceptdeath");
            }
            else if(
Character[playerid][Level] > 30)
            {
                
ClearPlayerWeapons(playerid);
                
DeathB RandomEx(1001500);
                
GivePlayerMoney(playerid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(playeridCOLOR_LIGHTPINKDeathS);
                
SCM(playeridCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(playeridCOLOR_LIGHTRED"To accept death type /acceptdeath");
                return 
0;
            }
        }

//there is more code here for the rest 
Reply


Messages In This Thread
Removing damages - by aoky - 12.06.2017, 00:23
Re: Removing damages - by Toroi - 12.06.2017, 00:31
Re: Removing damages - by aoky - 12.06.2017, 00:40
Re: Removing damages - by Toroi - 12.06.2017, 00:49
Re: Removing damages - by Kane - 12.06.2017, 00:55
Re: Removing damages - by oSAINTo - 12.06.2017, 01:28
Re: Removing damages - by aoky - 12.06.2017, 01:52
Re: Removing damages - by Toroi - 12.06.2017, 01:56
Re: Removing damages - by aoky - 12.06.2017, 01:57
Re: Removing damages - by Toroi - 12.06.2017, 02:01

Forum Jump:


Users browsing this thread: 1 Guest(s)