17.02.2014, 15:44
Hello there,
I'm looking for a function that can help me by making commands like:
/give [playerid] [code] [amount]
CODES:
1: Weapon
2: Armour
3: Health
etc etc.
Anyone that can help me?
What I have for now is:
I'm looking for a function that can help me by making commands like:
/give [playerid] [code] [amount]
CODES:
1: Weapon
2: Armour
3: Health
etc etc.
Anyone that can help me?
What I have for now is:
pawn Код:
CMD:give(playerid, params[])
{
new membername, amount;
if(sscanf(params, "uii", membername, params, amount))
{
SendClientMessage(playerid, COLOR_ORANGE, "[Set Player]{FFFFFF} /give[playerid] [code] [amount]");
SendClientMessage(playerid, COLOR_GREY, "1) Health 2) Armour 3) Weapon");
return 1;
}
else if(!strcmp(params, "1", true))
{
SetPlayerHealth(membername, amount);
SendClientMessage(playerid, COLOR_GREEN, "Succeed");
return 1;
}
else if(!strcmp(params, "2", true))
{
SetPlayerArmour(membername, amount);
SendClientMessage(playerid, COLOR_GREEN, "Succeed");
return 1;
}
return 1;
}