10.01.2012, 11:37
Hello all,
I am using sscanf 2 and zcmd lib.
My problem is when im using the "u" modifier it gives me a high numeric int instead of a proper id.
Example:
when i send the command /giveuser 5 it returns 185 and the same when i send the command /giveuser sircumz.
it should return always id 5 because in my test server i am id 5 (i got 5 bots).
whats wrong! plz help me
I am using sscanf 2 and zcmd lib.
My problem is when im using the "u" modifier it gives me a high numeric int instead of a proper id.
Example:
Код:
COMMAND:giveuser(playerid, params[])
{
new id;
if (!sscanf(params, "u", id))
{
new string[128];
format(string, 128, "%d", id);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, 128, "%s", id);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveuser [id]");
}
return 0;
}
it should return always id 5 because in my test server i am id 5 (i got 5 bots).
whats wrong! plz help me


