Lower the damage of weapons
#6

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
    new 
Float:HP,Float:gain;
    
GetPlayerHealth(playeridHP);// ex: HP==65
    
if(weaponid == 25
    {
         
gain=amount*0.25  //25 percent ex: amount(damage teken)=35 so 35*0.25==8.75
         
SetPlayerHealth(playerid,HP+gain);//HP==65+8.75
    
}
    return 
1;
}
//overall damage dealt by shotgun==26.25 {100-73.75}regardless of original amount send by client which is 35 
Reply


Messages In This Thread
Lower the damage of weapons - by alonxx - 04.10.2014, 06:05
Re: Lower the damage of weapons - by Gogeta101 - 04.10.2014, 06:08
Respuesta: Lower the damage of weapons - by alonxx - 04.10.2014, 06:17
Re: Lower the damage of weapons - by DavidBilla - 04.10.2014, 06:24
Re: Lower the damage of weapons - by jamjamnewbie - 04.10.2014, 06:38
Re: Lower the damage of weapons - by Quickie - 04.10.2014, 07:18
Respuesta: Lower the damage of weapons - by alonxx - 04.10.2014, 16:01
Re: Lower the damage of weapons - by Pottus - 04.10.2014, 16:29

Forum Jump:


Users browsing this thread: 3 Guest(s)