Help me to create cmd -
Yako - 20.05.2013
I want it to be like this:
When you type
/house store it would show message like this:
USAGE: /house store [guns/money] [amount]
I have this cmd:
Код:
CMD:house(playerid, params[])
{
new choice[56];
if(strcmp(choice, "store", true) == 0)
{
WHAT TO PUT HERE?
}
return 1;
}
AW: Help me to create cmd -
HurtLocker - 20.05.2013
what do you mean [guns/money]?
Re: Help me to create cmd -
Yako - 20.05.2013
I don't know how to make command with few options such as /house store guns 100 and /house lock
AW: Help me to create cmd -
HurtLocker - 20.05.2013
If you want effective help, more details are required.
Re: Help me to create cmd -
Yako - 20.05.2013
I want to have few options in one cmd, it should be like this:
/house lock
/house store guns/money amount
/house packs
and so on, and I don't know how to make /house lock and /house store guns/money in the same cmd
Re: Help me to create cmd -
xF4Life - 20.05.2013
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /house [what ever u mean]");
add that
Re: Help me to create cmd -
Tanush123 - 20.05.2013
use sscanf
pawn Код:
CMD:house(playerid, params[])
{
new choice[56],amount;
if(sscanf(params,"si",choice,amount)) return SendClientMessage(playerid,-1,"USAGE: /housestore [guns/money] [amount]");
if(!strcmp(choice, "guns", true))
{
WHAT TO PUT HERE?
}
if(!strcmp(choice, "money", true))
{
WHAT TO PUT HERE?
}return 1;
}
Respuesta: Help me to create cmd -
JustBored - 20.05.2013
Tanush you missed up the lenght of the string. You should put s[10] or more.
Re: Help me to create cmd -
Snapptime - 21.05.2013
Hmm I don't understand what you mean.. Could you give us more information?
Re: Help me to create cmd -
chuck100 - 21.05.2013
Man , Go on Wiki and learn all the functions and about includes , Than u'll be ready for create a cmd...