Raised This Month: $ Target: $400
 0% 

randomizing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 10-08-2007 , 17:09   Re: randomizing
Reply With Quote #2

PHP Code:
public DoSomethingRandom() {
    switch(
random_num(1,10)) { // create a random number between 1 and 10, inclusive
        
case 1client_print(0print_chat"[AMXX] Random number: 1")
        case 
2client_print(0print_chat"[AMXX] Random number: 2")
        case 
3client_print(0print_chat"[AMXX] Random number: 3")
        case 
4..9client_print(0print_chat"[AMXX] Random number between 4 and 9 (inclusive)"// Something between 4 and 9, inclusive
        
default: client_print(0print_chat"[AMXX] This doesn't fit any of the above cases."// If nothing fits the case, do this
    
}

__________________

Last edited by M249-M4A1; 10-08-2007 at 20:40.
M249-M4A1 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 16:02.


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