SA-MP Forums Archive
EMT Heal Command Need Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: EMT Heal Command Need Help (/showthread.php?tid=257248)



EMT Heal Command Need Help - Angel- - 24.05.2011

Код:
		//------------------------------------------EMT AFTER DEATH COMMAND------------------------------------------//
		if(strcmp(cmd, "/EMT", true) == 0)
		{
    	 if (PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
		 {
    	 SetPlayerHealth(playerid, 100.0);
     	KillTimer(deadt[playerid]);
     	PlayerInfo[playerid][pDeaths] = 0;
     	SetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
	 	SetPlayerInterior(playerid, DeadInt[playerid]);
	 	SetPlayerVirtualWorld(playerid, DeadWorld[playerid]);
     	SetCameraBehindPlayer(playerid);
     	TogglePlayerControllable(playerid, 1);
     	ClearChatbox(playerid, 10);
     	SendClientMessage(playerid, COLOR_GRAD1, "   You admin healed yourself");
    	 }
	 	return 1;
		}
		//-----------------------------------------------------------------------------------------------------------//
i need it to have a distance between player and get the players id or name


Re: EMT Heal Command Need Help - Angel- - 25.05.2011

some one please help


Re: EMT Heal Command Need Help - xalith - 25.05.2011

what do you mean by distance between player?

and as for the get name try this

Quote:

new pname[MAX_PLAYER_NAME];
string[128];
GetPlayerName(playerid,pname,sizeof(pname));
format(string,sizeof(string),"Player %s died",pname);

is that what you mean?


Re: EMT Heal Command Need Help - Angel- - 25.05.2011

Original This Is a admin command to heal them self but the medics dont have a command so i wanna make a duplicate
command that the medics can heal the dead guy on the ground


Re: EMT Heal Command Need Help - Angel- - 26.05.2011

help please