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
#2

Anyone?
Reply
#3

i dont understand.whats this command to do? get the id of someone?
Reply
#4

it works fine for me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)