Silentkick
#1

Hi. When I use /kick on someone, instead of showing him the reason, he gets server closed without showing the reason but rest of the server can see it.
PHP код:
CMD:kick(playerid,params[])
{
    if(
pInfo[playerid][pAdminLevel] >= 1)
    {
        new 
targetid,reason[105],string[180];
        if(
sscanf(params"us[105]"targetid,reason)) return SendClientMessage(playerid,-1,""COL_RED"AdmCmds: /kick [PlayerID] [Reason]");
        if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""COL_RED"Error!");
        if(!
IsPlayerNPC(targetid))
        {
            
format(stringsizeof(string), ""COL_RED"AdmCmds: %s %s has kicked %s"COL_WHITE" [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason);
            
SendClientMessageToAll(-1,string);
            
format(jQueryMAX_QUERY_LENGTH"INSERT INTO `"#sanctionlog"` (Username, Targetname, Comanda, Motivul, Data) VALUES ('%s', '%s', 'KICK', '%s', CURRENT_TIMESTAMP)",PlayerName(playerid), PlayerName(targetid), reason);
            
mysql_tquery(handlejQuery"""");
            
Kick(targetid);
        }
        else return 
SendClientMessage(playerid,-1,""COL_RED"ENPCe!");
    }
    else {
        
SendClientMessage(playerid,-1,""COL_RED"Error: Notadmin!");
    }
    return 
1;

Reply


Messages In This Thread
Silentkick - by Zeus666 - 24.10.2018, 20:03
Re: Silentkick - by NoSkillz - 24.10.2018, 20:06
Re: Silentkick - by Infin1ty - 24.10.2018, 20:08
Re: Silentkick - by Zeus666 - 24.10.2018, 20:35
Re: Silentkick - by GangstaSunny. - 24.10.2018, 20:38
Re: Silentkick - by Zeus666 - 24.10.2018, 20:53
Re: Silentkick - by Infin1ty - 24.10.2018, 20:55
Re: Silentkick - by KinderClans - 24.10.2018, 20:59
Re: Silentkick - by Infin1ty - 24.10.2018, 21:02

Forum Jump:


Users browsing this thread: 3 Guest(s)