01.08.2016, 18:46
PHP код:
new action[5], quantity;
if(!sscanf(params, "s[5]i", action, quantity)) {
if(!strcmp(action, "take")) {
// /trunk take /quantitity/
}
else if(!strcmp(action, "put")) {
// /trunk put /quantitity/
}
else
SendClientMessage(playerid, 0xCC0000FF, "Usage: /trunk [take/put] [quantity]");
}
else if(!sscanf(params, "s[5]", action)) {
if(!strcmp(action, "take")) {
SendClientMessage(playerid, 0xCC0000FF, "Usage: /trunk take [quantity]");
}
else if(!strcmp(action, "put")) {
SendClientMessage(playerid, 0xCC0000FF, "Usage: /trunk put [quantity]");
}
else if(!strcmp(action, "show")) {
// /trunk show
}
else
SendClientMessage(playerid, 0xCC0000FF, "Usage: /trunk[ put/take/show]");
}