27.10.2014, 18:44
I'm trying to make a command that when you type in /i(nventory), it will give you a prompt saying "Command Usage: /i [use/discard]"
However, I have no clue how to have the script detect when someone typed in "use" or "discard", at the moment, it just says "Command Usage: /i use [inventory slot]", no matter what I type in for /i
It'd be real great if anyone could help me with this.
//Unneeded here
}
However, I have no clue how to have the script detect when someone typed in "use" or "discard", at the moment, it just says "Command Usage: /i use [inventory slot]", no matter what I type in for /i
pawn Код:
CMD:i(playerid, params[])
{
if(GetPVarInt(playerid, "LoggedIn") == 0) return SendClientMessage(playerid, -1, "ERROR: You are not logged in.");
new string[128], use[4], discard[8], slot, Float: HP;
if(sscanf(params, "")) return SendClientMessage(playerid, -1, "Command Usage: /i [use/discard]");
if(!strcmp(use, "use"))
{
if(sscanf(params, "i", slot)) return SendClientMessage(playerid, -1, "Command Usage: /i use [inventory slot]");
//Unneeded here
}