| zombieplague |
10-20-2010 13:07 |
multi damag.e.
hi,
this plugin work !. but the problem is something weird happen to my server as you have to buy this item to gain multi damage. but sometimes i didn't buy this item it already giving me more damage than the item. which mean i don't need to buy that item i can do more damage just like if i brought it.. so could you help me to check if there anything wrong with it ?
PHP Code:
#include <amxmodx> #include <hamsandwich> #include <zombieplague>
#define is_valid_player(%1) (1 <= %1 <= 32)
new g_iitem
new g_ihasit[ 33 ]
public plugin_init( ) { RegisterHam( Ham_TakeDamage, "player", "fw_TakeDamage" )
register_event( "HLTV", "Event_Round_Start", "a", "1=0", "2=0" ) }
public zp_extra_item_selected( id, itemid ) { if ( itemid == g_iitem ) { g_ihasit[ id ] = true } }
public fw_TakeDamage( victim, inflictor, attacker, Float:damage ) { if ( is_valid_player( attacker ) && g_ihasit[ attacker ] ) { SetHamParamFloat( 4, damage * 3 ) } }
public Event_Round_Start( ) { for ( new id; id <= 32; id++ ) { g_ihasit[ id ] = false; } }
public zp_user_humanized_post( id ) { if ( is_user_alive( id ) && zp_get_user_survivor( id ) ) { g_ihasit[ id ] = false } }
public zp_user_infected_post( id ) { if ( is_user_alive( id ) && zp_get_user_nemesis( id ) || zp_get_user_zombie( id ) ) { g_ihasit[ id ] = false } }
So the problem now is why am i dealing so much damage like this item does when i didn't buy it ??
|