healing if in ambulance
#2

Quote:
Originally Posted by [LCG
TANKER ]
ive been thinking about this, would it be posible to heal a player if they are near or in a ambulance?

here is what i have so far

Код:
	if(strcmp(cmd, "/med", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1) // faction id 1 (medic)
			{
			  tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USAGE:] /med [playerid]");
					return 1;
				}
				giveplayerid = ReturnUser(tmp);
			  if(IsPlayerConnected(giveplayerid))
				{
				  if(giveplayerid != INVALID_PLAYER_ID)
				  {
					new Float:HP;
				    GetPlayerHealth(playerid,HP);
                    if(HP < 100
					  {
					    SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] That person is already healed");
					    return 1;
					  }
					// something here
						{
						  if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You can't heal yourself"); return 1; }
    					format(string, sizeof(string), "[INFO:] Healed by %s.", GetPlayerNameEx(playerid));
							SendClientMessage(giveplayerid, COLOR_LIGHTYELLOW2, string);
							format(string, sizeof(string), "[INFO:] %s successfully Healed.", GetPlayerNameEx(giveplayerid));
							SendClientMessage(playerid, COLOR_WHITE, string);
							PlayerPlayerActionMessage(playerid,giveplayerid,15.0,"has just Healed");
						}
						else
						{
						  SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] That player is not near you!");
						  return 1;
						}
					}
				}
				else
				{
				  SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Invalid ID.");
				  return 1;
				}
			}
im not sure if im even close to be right atm anyone help?
/FACEPALM...

Ask in the Carlito RP Script....

God.. Now its not going to be Ask in the GodFather thread, its gonna be Ask in the Carlito RP script...
Reply


Messages In This Thread
healing if in ambulance - by [LCG]TANKER - 16.04.2009, 22:43
Re: healing if in ambulance - by Snyper18 - 16.04.2009, 22:45
Re: healing if in ambulance - by [LCG]TANKER - 16.04.2009, 22:51
Re: healing if in ambulance - by DMSOrg - 16.04.2009, 22:56
Re: healing if in ambulance - by RobertGraham - 16.04.2009, 22:59
Re: healing if in ambulance - by [LCG]TANKER - 16.04.2009, 23:01
Re: healing if in ambulance - by [LCG]TANKER - 17.04.2009, 02:41

Forum Jump:


Users browsing this thread: 1 Guest(s)