Help me, please /a chat
#4

sscanf have isnull in-build code.

pawn Code:
CMD:kick(playerid,params[])
{
    new id,name1[MAX_PLAYER_NAME]name2[MAX_PLAYER_NAME];
    if(!PlayerInfo[playerid][pAdmin] >= 1) return SCM(playerid, COLOR_GREY,"  you are not authorized to use this command");
    if(sscanf(params,"us[128]",id,params)) return SCM(playerid, COLOR_WHITE,"USAGE: /kick [playerid/partofname] [reason]");
    if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_WHITE,"Player is not connected");
    GetPlayerName(playerid,name1,sizeof(name1));
    GetPlayerName(id,name2,sizeof(name2));
    format(params,129, "AdmCmd: %s was kicked by %s, reason: %s",name2,name1,params);
    SendClientMessageToAll(COLOR_LIGHTRED,params);
    Kick(id);
    return 1;
}
Reply


Messages In This Thread
Help me, please /a chat - by Jafet_Macario - 24.08.2011, 10:19
Re: Help me, please /a chat - by =WoR=Varth - 24.08.2011, 10:32
Re: Help me, please /a chat - by Jafet_Macario - 24.08.2011, 10:39
Re: Help me, please /a chat - by =WoR=Varth - 24.08.2011, 10:48
Re: Help me, please /a chat - by Jafet_Macario - 24.08.2011, 11:06

Forum Jump:


Users browsing this thread: 1 Guest(s)