Raised This Month: $ Target: $400
 0% 

Help with WeaponChance


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-08-2011 , 11:35   Re: Help with WeaponChance
Reply With Quote #4

Quote:
Originally Posted by lagaar View Post
Can you tell me an example?
He doesn't understand weapon chance blocks.

What you could do is this:

Code:
actionWeaponChance(id) {     // when player steps on block     // check cooldown if you want         // random chance for getting a weapon     if( random(100) < 30 )     {         // player beat the 30% chance for weapon                 // give the weapon (in this example, ak47)         new ent = give_item(id, "weapon_ak47");                 // set the weapon's ammo         cs_set_weapon_ammo(ent, 1); // 1 bullet in clip                 // set the backpack ammo         cs_set_user_bpammo(ent, CSW_AK47, 0); // no bp ammo     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 03:30.


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