Raised This Month: $ Target: $400
 0% 

[Solved]Random doesn't work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 07-10-2010 , 07:51   [Solved]Random doesn't work
Reply With Quote #1

Debug...
Code:
L 07/10/2010 - 08:47:20: [CSTRIKE] Player out of range (0)
L 07/10/2010 - 08:47:20: [AMXX] Displaying debug trace (plugin "Untitled.amxx")
L 07/10/2010 - 08:47:20: [AMXX] Run time error 10: native error (native "cs_set_user_team")
L 07/10/2010 - 08:47:20: [AMXX] [0] Untitled.sma::RandomPlayer (line 284)
L 07/10/2010 - 08:47:20: [AMXX] [1] Untitled.sma::MenuWinnerHandler (line 165)
Lines...

PHP Code:
public RandomPlayer(Index) {
    
    new 
Players[32]
    new 
Num
    get_players
(Players,Num)
    
    for(new 
0;<= Num;i++)
    {
        new 
Player Players[i]
        
        if(
is_user_connected(Player) && cs_get_user_team(Player) == CS_TEAM_SPECTATOR)
            
cs_set_user_team(random_num(0,Player),cs_get_user_team(Index))
    }

PHP Code:
    if(item == MENU_EXIT)
    {
        if(
Choosing[Looser])
            
ChatColor(id,"!y[!gMix Maker!y] No puedes elegir en este momento")
        else if(
Choosing[Winner])
        {
            
RandomPlayer(Winner)
            
ChatColor(0,"!y[!gMix Maker!y] %s hizo una eleccion random",name)
        }
    } 
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
 


Thread Tools
Display Modes

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 07:14.


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