Raised This Month: $ Target: $400
 0% 

Random number to each player.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 03-16-2011 , 04:36   Re: Random number to each player.
Reply With Quote #2

try this one
PHP Code:
set_numbers()
{
    new 
alive_humans get_alivehumans()

    
// Give Players random suspect #. If the same number as anyone else, redo loop.
    
new exsits_number[33], num
    
for(new 1<= maxplayersi++)
    {
        if(
is_user_alive(i) && PlayerInfo[i] == HUMAN)
        {
            
num random_num(1alive_humans)

            while(
exsits_number[num] != 0)
            {
                
num random_num(1alive_humans)
            }
            
pnumber[i] = exsits_number[num] = num
        
}
    }    

EDIT: if u don't understand that now, how it works ask me
__________________

Working on:
nothing

Last edited by schmurgel1983; 03-16-2011 at 05:24.
schmurgel1983 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:41.


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