17.03.2018, 22:42
Use something similar to this.
Код:
COMMAND:give(playerid, params[])
{
new targetid, option[14], param[32], amount;
if(sscanf(params, "us[14]S()[32]", targetid, option, param))
{
SendClientMessage(playerid, -1, "[Usage]: /give [playerid] [option]");
SendClientMessage(playerid, -1, "List of options: Weapon, Cash.");
return 1;
}
if(!strcmp(option, "weapon", true))
{
// Give the weapon the player is currently holding...
}
else if(!strcmp(option, "cash", true))
{
if(sscanf(param, "i", amount))
{
return SendClientMessage(playerid, -1, "[Usage]: /give [playerid] [cash] [amount]");
}
// Give the player some cash..
}
return 1;
}

