SA-MP Forums Archive
TextDraw with string. - 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 with string. (/showthread.php?tid=385977)



TextDraw with string. - AlexTm - 18.10.2012

Hi, is it possible to change this:
Код:
		if(Speedo[playerid] && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{
		    new string[64], speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
		    format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Speed: %d KM/H", speed);
			GameTextForPlayer(playerid, string,1000, 3);
To let's say... This?
Код:
         format(string,sizeof(string),"Speed: %d KM/H", speed);
        TextDrawCreate(605.000000, 140.000000, string);
	TextDrawFont(SpeedTD,1);
	TextDrawSetShadow(SpeedTD,0);
	TextDrawSetOutline(SpeedTD,1);
	TextDrawAlignment(SpeedTD,3);
	TextDrawLetterSize(SpeedTD, 0.450000, 1.300000);
	TextDrawColor(SpeedTD,0x075e11FF);
Would it work, and if it would, any way of getting it to work?


Re: TextDraw with string. - Mr.Anonymous - 18.10.2012

In you first code, it checks if the player is in a vehicle and driver. But on the second code, it doesn't. So you will face some problems I guess.


Re: TextDraw with string. - C00K13M0N$73R - 18.10.2012

TextDrawSetString


Re: TextDraw with string. - AlexTm - 18.10.2012

Thanks cookiemonster, if I wouldn't be finnish, I would bake you a box of cookies, hope this +rep will turn in to a cookie.