Command not working correct!
#5

Quote:
Originally Posted by XBrianX
View Post
Use my code.
PHP Code:
CMD:kick(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 1)
    {
        new 
string[128], giveplayeridreason[64];
        if(
sscanf(params"us[64]"giveplayeridreason)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /kick [playerid/partofname] [reason]");
        if(
AntiAdv(playeridparams)) return 1;
        if(
IsPlayerConnected(giveplayerid))
        {
            if(
PlayerInfo[giveplayerid][pAdmin] < PlayerInfo[playerid][pAdmin]) {
                new 
playerip[32];
                
GetPlayerIp(giveplayeridplayeripsizeof(playerip));
                
format(stringsizeof(string), "AdmCmd: %s (IP:%s) was kicked by %s, reason: %s"GetPlayerNameEx(giveplayerid), playeripGetPlayerNameEx(playerid), reason);
                
Log("logs/kick.log"string);
                
format(stringsizeof(string), "AdmCmd: %s was kicked by %s, reason: %s"GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
                
SendClientMessageToAllEx(COLOR_LIGHTREDstring);
                
Kick(giveplayerid);
            }
            return 
1;
        } else 
SendClientMessage(playeridCOLOR_GRAD1"Invalid player specified.");
    }
    return 
1;

is that copy + past :c?
Code:
 if(AntiAdv(playerid, params)) return 1;
Reply


Messages In This Thread
Command not working correct! - by andreistalker - 08.08.2015, 16:58
Re: Command not working correct! - by andreistalker - 08.08.2015, 17:02
Re: Command not working correct! - by jlalt - 08.08.2015, 17:26
Re: Command not working correct! - by XBrianX - 09.08.2015, 21:37
Re: Command not working correct! - by jlalt - 09.08.2015, 21:39
Re: Command not working correct! - by XBrianX - 09.08.2015, 21:43
Re: Command not working correct! - by jlalt - 09.08.2015, 21:45
Re: Command not working correct! - by XBrianX - 09.08.2015, 21:47

Forum Jump:


Users browsing this thread: 1 Guest(s)