A /heal command.
#6

Код:
CMD:heal(playerid, params[])
{
	new pID, money, Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME], string[86];
	GetPlayerName(playerid, name, sizeof(name));
	{
		if(sscanf(params, "ui", pID, money)) return SendClientMessage(playerid, 0x83827AFF, "USAGE: /heal [playerid] [charge($)]");
		{
		GetPlayerPos(playerid, x, y, z);
		if(IsPlayerInRangeOfPoint(pID, 15, x, y, z))
		{
		SetPlayerHealth(pID, 100);
		GivePlayerMoney(pID, -money);
                GiverPlayerMoney(playerid, money);
		format(string, sizeof(string), "NOTE: You've been charged $%i for a heal by: %s.", money, name);
		SendClientMessage(pID, 0xFC2203FF, string);
		}
		else SendClientMessage(playerid, 0xFC2203FF, "ERROR: You're not in-range of the specified playerid.");
		}
	
	}
	return 1;
}
Untested, should work.
Reply


Messages In This Thread
A /heal command. - by Sting. - 16.11.2012, 19:17
Re: A /heal command. - by Lean - 16.11.2012, 19:22
Re: A /heal command. - by Konstantinos - 16.11.2012, 19:26
Re: A /heal command. - by Lean - 16.11.2012, 19:30
Re: A /heal command. - by Abreezy - 16.11.2012, 19:36
Re: A /heal command. - by Anthony © - 16.11.2012, 19:48
Re : Re: A /heal command. - by Konstantinos - 16.11.2012, 19:56
Re: A /heal command. - by MatZZPL - 16.11.2012, 20:12
Re: Re : Re: A /heal command. - by Anthony © - 16.11.2012, 21:14
Re: A /heal command. - by Sting. - 17.11.2012, 03:28

Forum Jump:


Users browsing this thread: 2 Guest(s)