12.07.2015, 12:23
Basically I want the command /gas to work like this.
You can /gas create, which works fine.
Also when you type /gas delete, it will ask you for an ID so it would be /gas delete 1 for example.
However /gas delete [id] is not working
You can /gas create, which works fine.
Also when you type /gas delete, it will ask you for an ID so it would be /gas delete 1 for example.
However /gas delete [id] is not working
PHP код:
CMD:gas(playerid, params[])
{
if(pInfo[playerid][Admin] < 6) return No(playerid);
new item[70];
new stringe[128];
if(sscanf(params, "s[70]", item)){
m(playerid, -1, "{A3A1A0}Usage: /gas [operation]");
m(playerid, -1, "{A3A1A0}Operations: create, delete");
return 1;
}
if(strcmp(item, "create", true, strlen(item)) == 0)
{
// This works
}
else if(strcmp(item, "delete", true, strlen(item)) == 0)
{
new id;
if(sscanf(params, "d", id)) return m(playerid, -1, "{A3A1A0}Usage: /gas delete [id]");
// this doesnt work
}
return 1;
}