AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Setting client <ammout> damage (https://forums.alliedmods.net/showthread.php?t=101238)

Mr.Noobie 08-22-2009 01:56

Setting client <ammout> damage
 
Is it possible to set user damage at about > 100, < 100 damage even he use pistol ?

And how ?

ot_207 08-22-2009 06:04

Re: Setting client <ammout> damage
 
Yes using Hamsandwich.
Ham_TakeDamage

Bugsy 08-22-2009 09:37

Re: Setting client <ammout> damage
 
This will make the damage amt a player takes always 100. However, if the user has armor then this will not be the amount of health the player actually loses since armor absorbs some of the damage.
PHP Code:

public plugin_init() 
{
     
RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" ); 


public 
fw_HamTakeDamageidVictim iInflictor idAttacker Float:fDamage DamageBits 
{
     
//The 4th parameter of this forward is fDamage, the below will alter this value.
     //Example: A player can be shot in the foot with a glock or can be shot in the head with an awp
     //and the damage taken will always be 100.
     
SetHamParamFloat100.0 );  
     return 
HAM_HANDLED




All times are GMT -4. The time now is 15:03.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.