View Single Post
Old 24/08/2011, 10:39 AM   #3
Jafet_Macario
Huge Clucker
 
Jafet_Macario's Avatar
 
Join Date: Jul 2011
Posts: 439
Reputation: 67
Default Re: Help me, please /a chat

Damn thanks, noticed that I got the same problem on this command:
pawn Code:
CMD:kick(playerid, params[])
{
    new id, sendername[MAX_PLAYER_NAME], string[128], reason[128];
    if(!PlayerInfo[playerid][pAdmin] >= 1) return SCM(playerid, COLOR_GREY,"  you are not authorized to use this command");
    if(sscanf(params,"us[128]",id, reason)) return SCM(playerid, COLOR_WHITE,"USAGE: /kick [playerid/partofname] [reason]");
    if(id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_WHITE,"Player is not connected");
    else
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", id, sendername, reason);
        SendClientMessageToAll(COLOR_LIGHTRED,string);
        Kick(id);
    }
    return 1;
}
But I think I can't check if is null because there are 2 parameters? How to make here?
__________________
Jafet_Macario is offline