Raised This Month: $51 Target: $400
 12% 

set_weapon_ammo incorrect on some weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 04-22-2012 , 15:50   set_weapon_ammo incorrect on some weapons
Reply With Quote #1

Works fine with every weapon i've tested except for xm1014 and scout, it always sets to 1 ammo even if it should have set 2 or 3..
The value shown is correct though..
PHP Code:
static i_Weaponi_Ammoii_Bonus;
    
i_Bonus 5;
    if ( 
equal s_Weapon"weapon_scout" ) )
        
i_Bonus 3;
    if ( 
equal s_Weapon"weapon_m249" ) )
        
i_Bonus 8;
    if ( 
equal s_Weapon"weapon_awp" ) )
        
i_Bonus 2;
    if ( 
equal s_Weapon"weapon_xm1014" ) || equal s_Weapon"weapon_m3" ) )
        
i_Bonus 3;    
    
i_Weapon find_ent_by_owner ( -1s_Weaponi_Killer );
    
i_Ammo cs_get_weapon_ammo i_Weapon ) + i_Bonus;
cs_set_weapon_ammo i_Weaponi_Ammo );
client_print i_Killerprint_chat"+%i"i_Bonus ); 
__________________

anakin_cstrike is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-24-2012 , 10:37   Re: set_weapon_ammo incorrect on some weapons
Reply With Quote #2

Going to need some more context of your code than that.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:13.


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