26.03.2015, 15:48
Why doesn't this work with sscanf? The command works in itself but when I put it in this column nothing happens when I type the command.
The command is /v get [id]. All the other commands without another sscanf sub-thingy works..
If I make the command like /vget [ID], it works perfectly. Anyone got any ideas?
This doesn't work.
This works.
The command is /v get [id]. All the other commands without another sscanf sub-thingy works..
If I make the command like /vget [ID], it works perfectly. Anyone got any ideas?
This doesn't work.
pawn Код:
CMD:v(playerid, params[])
{
new
command[28];
if(sscanf(params, "s[28]", command)) return SendClientMessage(playerid, COLOR_GREEN, "[Usage:] /v (lock, get, park, lights, sell, givekeys, buy, eject, ejectall, find, clearmods, trunk, trunkinfo, enter, exit)");
if(!strcmp(command, "get", true))
{
new vehicleid;
if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, COLOR_GREY, "[Usage:] /v get [ID]. Check /v list for your vehicle ID.");
// rest of the code, I assure you it works.
return 1;
}
return 1;
}
pawn Код:
COMMAND:vget(playerid, params[])
{
new vehicleid;
if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, COLOR_GREY, "[Usage:] /v get [ID]. Check /v list for your vehicle ID.");
// rest of the code
return 1;
}