AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   multi damag.e. (https://forums.alliedmods.net/showthread.php?t=141177)

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_ihasit33 ]

public 
plugin_init( )
{
     
RegisterHamHam_TakeDamage"player""fw_TakeDamage" )

     
register_event"HLTV""Event_Round_Start""a""1=0""2=0" )
}

public 
zp_extra_item_selectediditemid )
{
     if ( 
itemid == g_iitem )
     {
          
g_ihasitid ] = true
     
}
}

public 
fw_TakeDamagevictiminflictorattackerFloat:damage )
{
    if ( 
is_valid_playerattacker ) && g_ihasitattacker ] )
    {
        
SetHamParamFloat4damage )
    }
}

public 
Event_Round_Start( )
{
     for ( new 
idid <= 32id++ )
     {
          
g_ihasitid ] = false;
     }
}

public 
zp_user_humanized_postid )
{
    if ( 
is_user_aliveid ) && zp_get_user_survivorid ) )
    {
        
g_ihasitid ] = false
    
}
}

public 
zp_user_infected_postid )
{
    if ( 
is_user_aliveid ) && zp_get_user_nemesisid ) || zp_get_user_zombieid ) )
    {
        
g_ihasitid ] = false
    
}


So the problem now is why am i dealing so much damage like this item does when i didn't buy it ??


All times are GMT -4. The time now is 10:16.

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