SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 08/01/2015, 10:29 PM   #1
Ciarannn
Big Clucker
 
Join Date: Feb 2014
Posts: 195
Reputation: 15
Default Textdraws *sigh*

Here are my current text draws for the vehicle stuff:

Code:
		new str[50];
		new vid = GetPlayerVehicleID(playerid);
		format(str, sizeof(str), "Vehicle: ~g~%s", CarName[GetVehicleModel(vid)-400]);
		speedo1[playerid] = TextDrawCreate(470.0, 390.0, " ");
		TextDrawSetString(speedo1[playerid], str);
		TextDrawSetShadow(speedo1[playerid], false);
		TextDrawSetOutline(speedo1[playerid], 1);
		TextDrawLetterSize(speedo1[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
		TextDrawSetProportional(speedo1[playerid], 1);
		TextDrawFont(speedo1[playerid], TEXT_DRAW_FONT);
		TextDrawShowForPlayer(playerid, speedo1[playerid]);
		
		new Float:vh;
		GetVehicleHealth(vid, vh);
		new h = floatround(vh) / 10;
		format(str, sizeof(str), "Health: ~g~%d \%", h);
		speedo2[playerid] = TextDrawCreate(470.0, 400.0, " ");
		TextDrawSetString(speedo2[playerid], str);
		TextDrawSetShadow(speedo2[playerid], false);
		TextDrawSetOutline(speedo2[playerid], 1);
		TextDrawLetterSize(speedo2[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
		TextDrawSetProportional(speedo2[playerid], 1);
		TextDrawFont(speedo2[playerid], TEXT_DRAW_FONT);
		TextDrawShowForPlayer(playerid, speedo2[playerid]);

		format(str, sizeof(str), "Fuel: ~g~%d \%", Fuel[GetPlayerVehicleID(playerid)]);
		speedo4[playerid] = TextDrawCreate(470.0, 410.0, " ");
		TextDrawSetString(speedo4[playerid], str);
		TextDrawSetShadow(speedo4[playerid], false);
		TextDrawSetOutline(speedo4[playerid], 1);
		TextDrawLetterSize(speedo4[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
		TextDrawSetProportional(speedo4[playerid], 1);
		TextDrawFont(speedo4[playerid], TEXT_DRAW_FONT);
		TextDrawShowForPlayer(playerid, speedo4[playerid]);

		new Float:s = GetSpeed(playerid);
		new ss = floatround(s);
		format(str, sizeof(str), "Speed: ~%s~%d km/h", DamageColor(h), ss);
		speedo3[playerid] = TextDrawCreate(470.0, 420.0, " ");
		TextDrawSetString(speedo3[playerid], str);
		TextDrawSetShadow(speedo3[playerid], false);
		TextDrawSetOutline(speedo3[playerid], 1);
		TextDrawLetterSize(speedo3[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
		TextDrawSetProportional(speedo3[playerid], 1);
		TextDrawFont(speedo3[playerid], TEXT_DRAW_FONT);
		TextDrawShowForPlayer(playerid, speedo3[playerid]);

		format(str, sizeof(str), "Engine: ~g~%s",EngineEngine(playerid));
                speedo5[playerid] = TextDrawCreate(470.0, 430.0, " ");
                TextDrawSetString(speedo5[playerid], str);
                TextDrawSetShadow(speedo5[playerid], false);
                TextDrawSetOutline(speedo5[playerid], 1);
                TextDrawLetterSize(speedo5[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
                TextDrawSetProportional(speedo5[playerid], 1);
                TextDrawFont(speedo5[playerid], TEXT_DRAW_FONT);
		TextDrawShowForPlayer(playerid, speedo5[playerid]);
That looks like this - [FULL IMAGE: http://imgur.com/7H3TwFZ]



I want to make it look like this [FULL IMAGE: http://i.imgur.com/wneHuxm.jpg]


I am TERRIBLE with textdraws, so it would be great if someone could do the conversion for me please.

Here is the code for the textdraw I would like:
Code:
        
        for(new i=0; i<MAX_PLAYERS; i++){
   	Zones[i] = TextDrawCreate(499.000000, 129.000000, "_");
   	TextDrawBackgroundColor(Zones[i], 255);
   	TextDrawFont(Zones[i], 1);
   	TextDrawLetterSize(Zones[i], 0.200000, 0.999999);
   	TextDrawColor(Zones[i], -1);
   	TextDrawSetOutline(Zones[i], 0);
   	TextDrawSetProportional(Zones[i], 1);
   	TextDrawSetShadow(Zones[i], 1);
   	TextDrawUseBox(Zones[i], 1);
   	TextDrawBoxColor(Zones[i], 0x00000076);
   	TextDrawTextSize(Zones[i], 606.000000, -2.000000);}
	return 1;

I'll be very greatful to anyone that might do this for me

EDIT: I forgot to mention that I'd like the new textdraws underneath the one in picture two (kinda top right) in the order they are in now thanks.

Credits to RoamPT for the textdraw above and for his Zone filterscript.
__________________
If it's stupid and it works, it ain't stupid.
Ciarannn is offline   Reply With Quote
Old 09/01/2015, 03:16 AM   #2
Th3UnKnOwN
Banned
 
Join Date: Jun 2014
Location: Inside your head
Posts: 99
Reputation: 17
Default Re: Textdraws *sigh*

Use a Textdraw editor that has the option to export to a .pwn file. Life will be much easier.
Th3UnKnOwN is offline   Reply With Quote
Old 09/01/2015, 03:16 PM   #3
Ciarannn
Big Clucker
 
Join Date: Feb 2014
Posts: 195
Reputation: 15
Default Re: Textdraws *sigh*

Any links? I can't find one.
__________________
If it's stupid and it works, it ain't stupid.
Ciarannn is offline   Reply With Quote
Old 09/01/2015, 03:34 PM   #4
CutX
Gangsta
 
CutX's Avatar
 
Join Date: Feb 2012
Location: trunk
Posts: 521
Reputation: 69
Default Re: Textdraws *sigh*

Quote:
Originally Posted by Ciarannn View Post
Any links? I can't find one.
use Zamaroht's TextDraw Editor Edited by Southclaw to include support for Player Textdraws and Font 4 sprites support
you can find it on github
__________________
a.k.a. East_Crips

My words fly up, my thoughts remain below;
Words without thoughts never to heaven go.Claudius, Act III, scene III, Hamlet
There is nothing either good or bad,
but thinking makes it so.Hamlet, Act II, scene II, Hamlet
What seest thou else
In the dark backward and abysm of time?William Shakespeare, The Tempest
CutX is offline   Reply With Quote
Old 09/01/2015, 03:54 PM   #5
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,767
Reputation: 223
Default Re: Textdraws *sigh*

You want to move vehicle details textdraws up close to the HUD or what?

edit://
Nevermind, you just want to change your layout of textdraws.
Riddick94 is offline   Reply With Quote
Old 09/01/2015, 05:11 PM   #6
Ciarannn
Big Clucker
 
Join Date: Feb 2014
Posts: 195
Reputation: 15
Default Re: Textdraws *sigh*

Quote:
Originally Posted by Riddick94 View Post
You want to move vehicle details textdraws up close to the HUD or what?

edit://
Nevermind, you just want to change your layout of textdraws.
Yeh Is that possible or will I need a textdraw editor to do it myself?
__________________
If it's stupid and it works, it ain't stupid.
Ciarannn is offline   Reply With Quote
Old 09/01/2015, 05:14 PM   #7
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,767
Reputation: 223
Default Re: Textdraws *sigh*

Use iPLEOMAX's textdraw editor to edit your textdraws. You can convert your code to the file that is supported by iTDe, but it isn't worth time and efford. Just create new ones, since it's going to be faster and easier for you.
Riddick94 is offline   Reply With Quote
Old 09/01/2015, 06:46 PM   #8
Ciarannn
Big Clucker
 
Join Date: Feb 2014
Posts: 195
Reputation: 15
Default Re: Textdraws *sigh*

Quote:
Originally Posted by Riddick94 View Post
Use iPLEOMAX's textdraw editor to edit your textdraws. You can convert your code to the file that is supported by iTDe, but it isn't worth time and efford. Just create new ones, since it's going to be faster and easier for you.
Great, thank you Riddick💪
__________________
If it's stupid and it works, it ain't stupid.
Ciarannn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigh -.- BleverCastard Scripting Help 22 23/01/2012 10:40 PM
Sigh i dont know where to put for(new i; i < MAX_PLAYERS; i++) MWhite_005 Help Archive 3 27/07/2011 12:16 AM
[help] Error AGAIN ;S ;sigh; dclaw Help Archive 2 16/01/2010 11:18 AM
[help] How fix this warning? [AGIAN] ;sigh; dclaw Help Archive 6 16/01/2010 10:55 AM
[help] Spawn's Again :sigh: dclaw Help Archive 4 15/01/2010 07:41 PM


All times are GMT. The time now is 08:01 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.