08.12.2011, 18:35
Hello,
Today my friend scripted a command for me ( Heal ) for a job. Now after I thought about it, it's like /heal playerid amount. It can be bugged and spammed on people ... So, I decided to make a command that accepts the command heal ( /acceptheal ). But I am stuck in it, here is my command:
How can I make the /acceptheal command?
Thanks a lot!
Today my friend scripted a command for me ( Heal ) for a job. Now after I thought about it, it's like /heal playerid amount. It can be bugged and spammed on people ... So, I decided to make a command that accepts the command heal ( /acceptheal ). But I am stuck in it, here is my command:
pawn Код:
CMD:heal(playerid, params[])
{
if(PlayerInfo[playerid][Job] == 1)
{
new targetid,
string[128],
amount;
if( sscanf ( params, "ii", targetid, amount)) return SendClientMessage(playerid, -1,"/heal [PlayerID/PlayerName] [Amount]"); // This will actually do it - I is a interget and that's a targetid.
format(string, sizeof(string), "[Medic]Your patient have been healed for %d",amount);
SetPlayerHealth(targetid, 100);
GivePlayerMoney(playerid, amount);
GivePlayerMoney(targetid, amount);
} else return SendClientMessage(playerid, 0xFFFFFFFF, ".:: Error: You need to be a m3dic to use this command! ::.");
return 1;
}
Thanks a lot!