What I did wrong? :S
#1

I was trying to make /kick [id] [Reason] command with zcmd but i failed,I wish someone will help me...

pawn Код:
COMMAND:kick(playerid,params[] )
{
    new name[MAX_PLAYER_NAME];
    new giveplayerid;
    GetPlayerName(playerid, name, sizeof(name)); // pretty self-explanatory
    if (PlayerInfo[playerid][pAdminLevel] >=2 || IsPlayerAdmin(playerid))
            {
            if(giveplayerid != INVALID_PLAYER_ID)  // if the player is online
                {
                new string[128];
                GetPlayerName(playerid, name, sizeof(name));
                format(string,sizeof(string),"%s has been kicked by %s, Reason: %s ");
                SendClientMessageToAll(0xFFFFFFF,string);
                return Kick(playerid); // returns the command to kick the player
                }
            }
            else
                SendClientMessage(playerid, COLOR_RED, "[ERROR:] Invalid ID.");
    else
        SendClientMessage(playerid, COLOR_RED, "[ERROR:] You are not an admin!");
    return 1;
}
Reply


Messages In This Thread
What I did wrong? :S - by Audi_Quattrix - 20.05.2012, 20:10
Re: What I did wrong? :S - by Infinitas - 20.05.2012, 20:14
Re: What I did wrong? :S - by Audi_Quattrix - 20.05.2012, 20:26
Re: What I did wrong? :S - by jessejanssen - 21.05.2012, 03:49
Re: What I did wrong? :S - by Audi_Quattrix - 21.05.2012, 18:18
Re: What I did wrong? :S - by Jeroen52 - 21.05.2012, 20:58

Forum Jump:


Users browsing this thread: 1 Guest(s)