Raised This Month: $ Target: $400
 0% 

random() function won't work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shadow.hk
Senior Member
Join Date: Dec 2008
Location: WA, Australia
Old 07-30-2009 , 10:32   random() function won't work
Reply With Quote #1

Been trying to use a simple chance function, however, it doesn't seem to work. It ALWAYS slays. So... am I doing this wrong?

PHP Code:
if(random(get_pcvar_num(p_Amount_Gamble)) == 1)
{
    
give_item(id"weapon_glock");
            
    
jb_print(id"Congratulations, you just won a !tglock!n!");
}
else
{
    
slay_lightning(id);
        
    
jb_print(id"Wow... bad luck");

shadow.hk is offline
Send a message via MSN to shadow.hk
 



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 18:27.


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