SA-MP Forums Archive
TextDraw instead of GameTextForPlayer - 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)
+--- Thread: TextDraw instead of GameTextForPlayer (/showthread.php?tid=648761)



TextDraw instead of GameTextForPlayer - LI0LIKAS - 28.01.2018

Whats up,

How to make TextDraw instead of GameTextForPlayer in this case?

Код:
forward HospitalTimeLeft(playerid);
public HospitalTimeLeft(playerid)
{
	hpTimeLeft[playerid] = hpTimeLeft[playerid] - 1;
	format(hpString,sizeof(hpString),"%d",hpTimeLeft[playerid]);
	GameTextForPlayer(playerid, hpString,1000, 4);
	return 1;
}

public RespawnHospital(playerid)
{
		SetSpawnInfo(playerid,GetPlayerTeam(playerid),GetPlayerSkin(playerid),322.197998,302.497985,999.148437,275.7301,0,0,0,0,0,0);
		GetGender(playerid);
		SetPlayerInterior(playerid, 5);
		SetTimerEx("DEAD1", 60000, false, "i", playerid);

		hpTimeLeft[playerid] = 60;
		hpTimer[playerid] = SetTimerEx("HospitalTimeLeft", 1000, true, "i", playerid);

   		SpawnPlayer(playerid);
  		return 1;
}

public DEAD1(playerid)
{
		SetPlayerHealth(playerid,100);
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1242.1780,328.2336,19.7555);
 		ligonineje[playerid] = false;
		SendClientMessage(playerid,WHITE,"* Pasveikai.");
		KillTimer(hpTimer[playerid]);
 		return 1;
}



Re: TextDraw instead of GameTextForPlayer - Wanheda - 28.01.2018

Just create a player textdraw, show it to the player and set the textdraw string to the wanted value. Should be easy.