SSCANF
#4

Wouldn't be easier Stigned's way but without a custom specifier?

pawn Код:
new id, tmp;
if (params[0] == '[' && (tmp = strfind(params, "]")) != -1)
{
    if (sscanf(params[tmp + 1], "u", id)) return SendClientMessage(playerid, -1, "usage..");
}
else
{
    if (sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "usage..");
}

if (id == INVALID_PLAYER_ID) return ... // error..

// code..
Reply


Messages In This Thread
SSCANF - by Spenker - 04.08.2016, 17:22
Re: SSCANF - by diego200052 - 04.08.2016, 17:44
Re: SSCANF - by Stinged - 04.08.2016, 17:54
Re: SSCANF - by Konstantinos - 04.08.2016, 18:08

Forum Jump:


Users browsing this thread: 2 Guest(s)