18.01.2014, 19:58
(
Последний раз редактировалось SuperChock; 18.01.2014 в 20:29.
)
Hello, I want a command like this:
However, the command I did above does not work. Could someone fix for me?
Thank you very much!
pawn Код:
YCMD:sell(playerid, params[], pHELPS)
{
new Fun[12];
if(sscanf(params, "s[12]", Fun))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USE: /sell [drug/medicament]");
return 1;
}
if(!strcmp(Fun, "drug"))
{
new qnt, vlr;
if(sscanf(params, "dd", qnt, vlr))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USE: /sell [drug] [amount] [price]");
return 1;
}
SendPlayerMessage(playerid, 0xFFFFFFFF, "test %d - %d :D", qnt, vlr);
return 1;
}
if(!strcmp(Fun, "medicament"))
{
new qnt, vlr;
if(sscanf(params, "dd", qnt, vlr))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USE: /sell [medicament] [amount] [price]");
return 1;
}
SendPlayerMessage(playerid, 0xFFFFFFFF, "test %d - %d uhuuuu", qnt, vlr);
return 1;
}
return 1;
}
Thank you very much!