Quote:
Originally Posted by fysiks
He doesn't want to change the damage to 1.0. He wants to execute code when the damage is 1.0 or greater:
PHP Code:
if( damage > 1.0 ) { // do stuff }
|
The if still triggers when I shoot a teammate or if a teammate shoots me, here's a part of my code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
public register_init(){
RegisterHam(Ham_TakeDamage, "player", "OnPlayerEvent_Damage", 1);
}
public OnPlayerEvent_Damage(victim, inflictor, attacker, Float:damage, damagebits){
if(damage > 1.0){
set_user_camo(victim, false);
set_user_camo(attacker, false);
}
}