command(drop, playerid, params[])
command(help, playerid, params[])
{
new cat[128];
new defaultinteger;
if(sscanf(params, "s[128]D(default)", cat))
{
SendClientMessage(playerid, 0x66666666, "Usage: /drop [Category]");
SendClientMessage(playerid, 0x66666666, "Categories: Clothes");
return 1;
}
else
{
if(strfind("Clothes", cat, true) != -1)
{
//
}
}
return 1;
}
if(Value == 1)
{
//code
}
else if(Value == 2)
{
//code
}
else if(Value == 3)
{
//code
}
else SendClientMessage(playerid, WHITE, "Only 1 - 3.");
Cheers mate. Not done one of these commands in ages.
Also, do you know how I can do this? How to check what the "Value" is, I tried: pawn Код:
![]() |
if(Value < 1 || Value > 3) return SendClientMessage(playerid, COLOUR_PINK, "Error: THe command does not go below 1 or above 3.");
command(drop, playerid, params[])
{
new
item[20];
if(isnull(params))
{
return SendClientMessage(playerid, -1, "USAGE: /drop [item]");
}
else if(!strcmp(item, "clothes", true)
{
new
slot;
if(sscanf(params, "s[20]d", item, slot))
{
return SendClientMessage(playerid, -1, "USAGE: /drop clothes [slot]");
}
if(slot < 1 || slot > 3)
{
return SendClientMessage(playerid, -1, "Don't go below 1 or over 3.");
}
// code here
return 1;
}
return 1;
}