Sscanf on command.
#1

Код HTML:
CMD:id(playerid, params[])
{
    new targetid;
    if(sscanf(params, "u", targetid)) return SendSyntaxMessage(playerid, "/id [playerid/name]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_DARKGRAY,"The player not connected.");
    if(IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_DARKGRAY,"The player connected.");
    return 1;
}
If I write: /id bruker => The player not connected. (But actually I'm online.)
If I write: /id 0 => The player connected. (0 = my id.)
Reply


Messages In This Thread
Sscanf on command. - by Bruker - 14.02.2016, 14:42
Re: Sscanf on command. - by Bruker - 14.02.2016, 16:32
Re: Sscanf on command. - by Joron - 14.02.2016, 16:58
Re: Sscanf on command. - by Adeon - 14.02.2016, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)