SA-MP Forums Archive
Sscanf on command. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Sscanf on command. (/showthread.php?tid=600908)



Sscanf on command. - Bruker - 14.02.2016

Код 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.)


Re: Sscanf on command. - Bruker - 14.02.2016

Anyone?


Re: Sscanf on command. - Joron - 14.02.2016

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


Re: Sscanf on command. - Adeon - 14.02.2016

it works fine for me