#9

HELP guys other player typed wrong rcon password but server kicking me WTF

here is the code :

PHP код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(
success)
    {
        new 
pip[16];
        for(new 
GetPlayerPoolSize(); != -1; --i)
        {
            
GetPlayerIp(ipipsizeof(pip));
            if(!
strcmp(ippiptrue))
            {
                
SetTimer("RconMsg"1000false);
            }
        }
    }
    else
    {
        
SetTimer("KickPlayer"1000false);
    }
    return 
1;
}
forward RconMsg(playerid);
public 
RconMsg(playerid)
{
    new 
pname[MAX_PLAYER_NAME], string[128];
    
GetPlayerName(playeridpnamesizeof(pname));
    
format(stringsizeof(string), "{AFAFAF}%s {33CC33}has logged in as RCON Administrator"pname);
    
SendClientMessageToAll(COLOR_WHITEstring);
    
format(stringsizeof(string), "Welcome {AFAFAF}%s, {FFFFFF}Type {FF6600}/cmds {FFFFFF}to see Admin commands"pname);
    
SendClientMessage(playeridCOLOR_WHITEstring);
    
PlayerPlaySound(playerid10580.00.00.0);
    return 
1;
}
forward KickPlayer(playerid);
public 
KickPlayer(playerid)
{
    new 
pname[MAX_PLAYER_NAME], string[128]; 
    
GetPlayerName(playeridpnamesizeof(pname)); 
    
format(stringsizeof(string), "{AFAFAF}%s {FF0000}has tried to login in RCON and got Kicked!"pname); 
    
SendClientMessageToAll(COLOR_REDstring);
   
    for (new 
0MAX_PLAYERSi++) 
    { 
        
Kick(i);
    }
    return 
1;

Reply


Messages In This Thread
HELP - by DeStRoY232 - 22.09.2017, 10:25
Re: HELP - by FuNkYTheGreat - 22.09.2017, 10:39
Re: HELP - by pollo97 - 22.09.2017, 10:40
Re: HELP - by DeStRoY232 - 22.09.2017, 11:14
Re: HELP - by pollo97 - 22.09.2017, 11:51
Re: HELP - by Sew_Sumi - 22.09.2017, 11:59
Re: HELP - by dominik523 - 22.09.2017, 12:20
Re: HELP - by Kampott - 22.09.2017, 12:35
Re: HELP - by DeStRoY232 - 22.09.2017, 12:40
DeStRoY232 - by Sew_Sumi - 23.09.2017, 10:42

Forum Jump:


Users browsing this thread: 2 Guest(s)