Raised This Month: $32 Target: $400
 8% 

Ml_notfound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shadow728988
Member
Join Date: Sep 2017
Old 11-04-2017 , 01:29   Ml_notfound
Reply With Quote #1

Code:
ML_NOTFOUND: Is now CT
ML_NOTFOUND: RANDOMIZING_TEAMS
ML_NOTFOUND: Is now T





PHP Code:
public randomize_teams(idlevel)
{
    
// Declare variables    
    
new num
    
new players[32]
    
    new 
playersT_pos
    
new playersCT_pos
    
    
new playersT[32]
    new 
playersCT[32]
    
    new 
random_team
    
    
new difference
    
    
new player
    
    
    
if (!access(id,level))
    {
        
console_print(id," %L"id"COMMAND_NO_AUTH")
        
console_print(id," %L"id"COMMAND_NO_AUTH")
        
        return 
PLUGIN_HANDLED
    
}

    
client_print(0,print_chat," %L"LANG_PLAYER"RANDOMIZING_TEAMS")

    
// Set the arrays
    
get_players(playersnum)
    for(new 
0numi++)
    {
        
player players[i]
        
        if(
is_user_connected(player) && (cs_get_user_team(player) != CS_TEAM_SPECTATOR ))
        {
            
random_team random_num(1,2)
            
            if(
random_team == 1
            {
                
playersT[playersT_pos++] = player
            
}
            else 
            {
                
playersCT[playersCT_pos++] = player
            
}
        }
    }
    
    
difference abs(playersCT_pos playersT_pos)
    
    if(
difference 1)
    {
        if(
playersCT_pos playersT_pos)
        {
            for(new 
playersCT_pos; (>= 0) && (playersCT_pos playersT_pos); i--)
            {
                
playersT[playersT_pos++] = playersCT[--playersCT_pos]
            }
        }
        else
        {
            for(new 
playersT_pos; (>= 0) && (playersT_pos playersCT_pos); i--)
            {
                
playersCT[playersCT_pos++] = playersT[--playersT_pos]
            }
        }
    }
    
    
    
// Set T team
    
for(new 0playersT_posi++)
    {
        
cs_set_user_team(playersT[i], CS_TEAM_T)
        
        
client_print(playersT[i],print_chat," %L"playersT[i], "Is now T")
    }    

    
    
// Set CT team
    
for(new 0playersCT_posi++)
    {    
        
cs_set_user_team(playersCT[i], CS_TEAM_CT)
        
        
client_print(playersCT[i],print_chat," %L"playersCT[i], "Is now CT")
    }
    
    
    
server_cmd("sv_restart 1");
    
    
    return 
PLUGIN_CONTINUE

The plugin is working fine teams are getting randomized but i get ml not found error in chat..
shadow728988 is offline
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 11-04-2017 , 01:38   Re: Ml_notfound
Reply With Quote #2

ML_NOTFOUND errors are related to language files. You probably don't have the lang file from where you took the code of a plugin which is probably AMX Match Deluxe. Just add it's lang file
WhiteFang1319 is offline
shadow728988
Member
Join Date: Sep 2017
Old 11-04-2017 , 01:42   Re: Ml_notfound
Reply With Quote #3

yeah i got it now thanks
shadow728988 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 08:36.


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