Player Health and Armour
#7

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
    if(
kickback[issuerid] == 1)
    {
        if(
weaponid == 30 || weaponid == 31 || weaponid == 29)
        {
            new 
Float:x,Float:y,Float:z,Float:angle;
            
GetPlayerFacingAngle(playerid,Float:angle);
            
GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
            
SetPlayerVelocity(playerid,Float:x+0.1,Float:y+0.1,Float:z+0.2);
            
SetPlayerFacingAngle(playerid,Float:angle);
        }
    }
    if(
damager[issuerid] == 1)
    {
        if(
weaponid == 30 || weaponid == 31 || weaponid == 29)
        {
            new 
Float:Health,Float:Armour;
            
GetPlayerHealth(playerid,Health);
            
SetPlayerHealth(playerid,Health -30);
            
GetPlayerArmour(playerid,Armour);
            
SetPlayerArmour(playerid,Armour -30);
        }
    }
    return 
1;

Thats Right?
Reply


Messages In This Thread
Player Health and Armour - by Amunra - 21.01.2016, 05:51
Re: Player Health and Armour - by Weponz - 21.01.2016, 05:58
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:04
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:07
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:09
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:12
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:18
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:24
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:27
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:28

Forum Jump:


Users browsing this thread: 3 Guest(s)