[Help]: Kick command!
#4

Here is my command:

pawn Код:
CMD:kick(playerid, params)
{
    new targetid;
    new reason[70];
    new string[200];
    if(gPlayerInfo[playerid][pAdminLevel] < gCommands[KICK])return SCM(playerid, COLOR_RED, "[ERROR]: You can't use this command!");
    if(sscanf(params, "us[70]", targetid, reason))return SCM(playerid, COLOR_GREY, "[USAGE]: /kick [playerid] [reason]");
    if(IsPlayerConnected(targetid))return SCM(playerid, COLOR_RED, "[ERROR]: This player is not connected!");
    if(gPlayerInfo[playerid][pAdminLevel] == gPlayerInfo[targetid][pAdminLevel]) return SCM(playerid, COLOR_YELLOW, "[WARNING]: You can't Kick an Admin with a same Level then you!");
    if(gPlayerInfo[playerid][pAdminLevel] < gPlayerInfo[targetid][pAdminLevel]) return SCM(playerid, COLOR_YELLOW, "[WARNING]: You can't Kick an Higher Admin then you!");
    format(string, sizeof(string), "[Kick]: %s has Kicked %s from the Server!||Reason: %s", GetName(playerid), GetName(targetid), reason);
    SCMToAll(COLOR_YELLOW, string);
    Kick(targetid);
    return 1;
}
Reply


Messages In This Thread
[Help]: Kick command! - by Areax - 25.05.2013, 10:05
Re: [Help]: Kick command! - by DaRk_RaiN - 25.05.2013, 10:09
Re: [Help]: Kick command! - by Areax - 25.05.2013, 10:11
Re: [Help]: Kick command! - by Areax - 25.05.2013, 10:13
Re: [Help]: Kick command! - by Areax - 25.05.2013, 10:30
Re: [Help]: Kick command! - by Apenmeeuw - 25.05.2013, 10:44
Re: [Help]: Kick command! - by Areax - 25.05.2013, 12:57
Re: [Help]: Kick command! - by Apenmeeuw - 25.05.2013, 13:37

Forum Jump:


Users browsing this thread: 1 Guest(s)