View Single Post
Old 24/08/2011, 10:48 AM   #4
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 1,988
Reputation: 133
Default Re: Help me, please /a chat

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;
}
__________________
(RETIRED)
=WoR=Varth is offline