AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problems with my new Mix Maker (https://forums.alliedmods.net/showthread.php?t=127549)

#8 SickneSS 05-22-2010 10:58

Problems with my new Mix Maker
 
This is part of a submenu,well whats wrong?

PHP Code:

case :
        {
            
set_hudmessage(64,255,64,-1.0,0.21,1,0.2,10.0,0.01,0.1)
            
show_hudmessage(0,"Mesclando Equipos")
            
            new 
Players[32]
            new 
Num
            get_players
(Players,Num,"h")
            
            for(new 
0;<= Num;i++)
            {
                
cs_set_user_team(Players[random(10)],CS_TEAM_CT,CTsModels[random(sizeof(CTsModels))])
                
cs_set_user_team(Players[random(10)],CS_TEAM_T,TsModels[random(sizeof(TsModels))])
            }
        } 

if i am alone in the server and use this case,debug shows.
Code:

L 05/22/2010 - 16:45:33: [CSTRIKE] Player out of range (0)
L 05/22/2010 - 16:45:33: [AMXX] Displaying debug trace (plugin "Mix_Maker.amxx")
L 05/22/2010 - 16:45:33: [AMXX] Run time error 10: native error (native "cs_set_user_team")

When are more than 10 players in the server,works well,but sometimes sets 6 Players to T and 4 Players to CT,and that kind of values.

How i Can fix it?

fezh 05-22-2010 11:11

Re: Random 5 Players Problem
 
Maybe this can help you:
http://forums.alliedmods.net/showthread.php?t=115196

#8 SickneSS 05-22-2010 15:57

Re: Problems with my new Mix Maker
 
I change the title of this because I don't want to make a lot of threads (1 for error) :P...

Thanks to help fezh,but doesn't works.

sorry for my english


All times are GMT -4. The time now is 03:45.

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