Raised This Month: $ Target: $400
 0% 

[ Help ] Choose Random 1 "T"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-12-2018 , 11:42   Re: [ Help ] Choose Random 1 "T"
Reply With Quote #1

Still kinda confused maybe this will help idk really
PHP Code:
new iPlayers[32], iNum

get_playersiPlayersiNum"che""TERRORIST" )
new 
iRandomPlayer iPlayers[randomiNum )];
get_playersiPlayersiNum"ch" )

for( new 
0iNumi++ )
{
    case(
iPlayers[i])
    {
        case 
iRandomPlayer:
        {
               
// Do stuff to random player 
        
}
        default:
        {
            
// Do stuff to ALL other players
        
}

Note:

Idk: why you are doing this
Code:
randPlayer = Players[ i ];
In a loop alfter you already selected a random player, this will pretty much do the same thing to all players and ignore the randomPlayer you choose, as its is overwritten.

Last edited by maqi; 06-12-2018 at 12:03.
maqi is offline
Reply



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 04:37.


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