In-Game Command Restrictions
#2

Код:
CMD:kick(playerid,params[])
{
    new id,reason[50];
    if(sscanf(params,"us[50]",id,reason)) return SendClientMessage(playerid,-1,"Usage : /kick [playerid/name] [reason]");
    else if(!IsPlayerConnected(id))  return SendClientMessage(playerid,-1,"Player is not connected.");
    else
    {
        if(PlayerInfo[playerid][pAdmin]>0 || IsPlayerAdmin(playerid)==1)
        {
        new str[100];
        format(str,sizeof(str),"%s has kicked %s for %s.",PlayerInfo[playerid][pName],PlayerInfo[id][pName],reason);
        SendClientMessageToAll(-1,str);
        kick(id);
        } 
    }
}
Reply


Messages In This Thread
In-Game Command Restrictions - by Krakuski - 05.01.2013, 19:44
Re: In-Game Command Restrictions - by aslan890 - 05.01.2013, 19:47

Forum Jump:


Users browsing this thread: 1 Guest(s)