Raised This Month: $ Target: $400
 0% 

random_num


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-08-2021 , 19:51   Re: random_num
Reply With Quote #2

Something like this

Code:
some_function() {     new players[MAX_PLAYERS], count     get_players(players, count, "ch")     new index, other_players[MAX_PLAYERS], another_count     for (new i = 0; i < count; i++)     {         index = players[i]         if (condition)             other_players[another_count++] = index     }     new random_player = other_players[random(another_count)] }
__________________








CrazY. 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 14:09.


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