Help with /heal command
#1

Can you help me with my /heal cmd?
Код:
dcmd_heal(playerid, params[])
{
	if (strlen(params))
	{
		id = strval(params[0]);
		if (IsPlayerConnected(id))
		{
			if(Medic[playerid] == 1 || IsPlayerInVehicle(playerid, 416))
			{
				SetPlayerHealth(id,100);
				new pName[24];
				new string[265];
				GetPlayerName(playerid,"pName",sizeof(pName));
				format(string,sizeof(string),"MEDIC:You got healed by Medic %s",pName);
				SendClientMessage(id,0x00FF00AA,string);
			}
			else
			{
				SendClientMessage(playerid,0x00FF00AA,"SERVER:You dont have permission to this command!,or yo're ont in an Ambulance!");
			}
		}
		else
		{
			SendClientMessage(playerid, 0xFF0000AA, "Player not found");
		}
	}
	else
	{
		SendClientMessage(playerid, 0xFF0000AA, "SERVER:Usage /heal [ID]");
	}
	return 1;
I wan't it to do this, when e.x a player has 10hp and another player heals he gets 90 = equal to the hp he healed
Reply


Messages In This Thread
Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 09:13
Re: Help with /heal command - by Elorreli - 19.12.2010, 09:23
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 09:55
Re: Help with /heal command - by Elorreli - 19.12.2010, 10:05
Re: Help with /heal command - by Mean - 19.12.2010, 12:18
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 12:22
Re: Help with /heal command - by Mean - 19.12.2010, 13:10
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 13:18
Re: Help with /heal command - by Mean - 19.12.2010, 13:32
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 13:36

Forum Jump:


Users browsing this thread: 7 Guest(s)