Raised This Month: $ Target: $400
 0% 

[SOLVED] Setting weapon ammo...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bwgrubbs1
Senior Member
Join Date: Sep 2006
Old 04-26-2007 , 13:57   [SOLVED] Setting weapon ammo...
Reply With Quote #1

Ok I have everything just fine...but for some reason when I use this code.

Code:
public rndWEPS(id) {     new rnd     rnd = random_num(0,100)     if( rnd <= 5)     {         give_item(id, "weapon_awp")     cs_set_user_bpammo(id, CSW_AWP, 0)     cs_set_weapon_ammo(CSW_AWP, 3)     client_print(id, print_chat, "You got an awp with 3 bullets! (1/20 Chance)")     }     else if(rnd > 5 && rnd <= 15)     {         give_item(id, "weapon_p228")     cs_set_user_bpammo(id, CSW_P228, 0)     cs_set_weapon_ammo(CSW_P228, 2)     client_print(id, print_chat, "You got a P228 with 2 bullets! (1/10 Chance)")     }     else if(rnd > 15 && rnd <= 30)     {         give_item(id, "item_shield")     client_print(id, print_chat, "You got a Shield! (1/6 Chance)")     }     else if(rnd > 30 && rnd <= 60)     {         give_item(id, "weapon_hegrenade")     client_print(id, print_chat, "You got a HE Grenade! (1/3 Chance)")     } }

For some unknown reason it gives the awp 10 bullets...or the p228 a full chamber and none in the clip...I want just 3 bullets for awp... what am I doing wrong ?
bwgrubbs1 is offline
 


Thread Tools
Display Modes

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 06:38.


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