OnPlayerTakeDamage.
#1

Well, what I want is if the player's armour is 100 it would take the armour first, for now it takes HP more than armour :3 , which means he dies before his armour is taken.

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP;
    GetPlayerHealth(playerid, HP);
    if(weaponid == 24) SetPlayerHealth(playerid, HP-110);
    if(weaponid == 22) SetPlayerHealth(playerid, HP-10);
    if(weaponid == 32) SetPlayerHealth(playerid, HP-35);
    if(weaponid == 28) SetPlayerHealth(playerid, HP-35);
    if(weaponid == 23) SetPlayerHealth(playerid, HP-30);
    if(weaponid == 31) SetPlayerHealth(playerid, HP-40);
    if(weaponid == 30) SetPlayerHealth(playerid, HP-40);
    if(weaponid == 29) SetPlayerHealth(playerid, HP-25);
    if(weaponid == 34) SetPlayerHealth(playerid, HP-199);
    if(weaponid == 33) SetPlayerHealth(playerid, HP-100);
    if(weaponid == 25) SetPlayerHealth(playerid, HP-35);
    if(weaponid == 27) SetPlayerHealth(playerid, HP-45); 
    return 1;
}
Thank you!
Reply


Messages In This Thread
OnPlayerTakeDamage. - by DaniceMcHarley - 14.06.2013, 18:36
Re: OnPlayerTakeDamage. - by Pottus - 14.06.2013, 18:51
Re: OnPlayerTakeDamage. - by DaniceMcHarley - 14.06.2013, 19:12
Re: OnPlayerTakeDamage. - by DaniceMcHarley - 14.06.2013, 19:28
Re: OnPlayerTakeDamage. - by B-Matt - 14.06.2013, 19:36

Forum Jump:


Users browsing this thread: 3 Guest(s)