31.08.2015, 10:09
I have made a main command called /item, which can do few things, if i do like /item id, it works, if i type /item put it says /item put [id], but when i put an id, it doesnt say anything, it doesnt even send the text that says that command works, i tried two ways and nothing worked, the problem is here but i dont know where, in the main command i use sscanf and check if types the tmp which is a string
I also tried:
They both didnt
pawn Код:
if(strcmp(tmp, "put", true) == 0)
{
new id;
SendClientMessage(playerid, -1, "Command before sscanf.");
if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_GREY, "/item put [id]");
SendClientMessage(playerid, -1, "Command works.");
}
pawn Код:
if(strcmp(tmp, "put", true) == 0)
{
new id;
SendClientMessage(playerid, -1, "Command before sscanf.");
if(sscanf(params, "s[24]d", tmp, id)) return SendClientMessage(playerid, COLOR_GREY, "/item put [id]");
SendClientMessage(playerid, -1, "Command works.");
}