SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/12/2019, 08:50 PM   #1
weex
Big Clucker
 
Join Date: Dec 2016
Posts: 143
Reputation: 1
Default How to change height of this box?

Code:
        MissionTD[playerid][0] = CreatePlayerTextDraw(playerid,15.199993, 112.160011, "box");
        PlayerTextDrawLetterSize(playerid,MissionTD[playerid][0], 0.000000, 7.679999);
        PlayerTextDrawTextSize(playerid,MissionTD[playerid][0], 205.000000, 0.000000);
        PlayerTextDrawAlignment(playerid,MissionTD[playerid][0], 1);
        PlayerTextDrawColor(playerid,MissionTD[playerid][0], -1);
        PlayerTextDrawUseBox(playerid,MissionTD[playerid][0], 1);
        PlayerTextDrawBoxColor(playerid,MissionTD[playerid][0], 0x00000077);
        PlayerTextDrawSetShadow(playerid,MissionTD[playerid][0], 0);
        PlayerTextDrawBackgroundColor(playerid, MissionTD[playerid][0], 255);
        PlayerTextDrawFont(playerid, MissionTD[playerid][0] , 1);
        PlayerTextDrawSetProportional(playerid,MissionTD[playerid][0], 1);
        PlayerTextDrawUseBox(playerid, MissionTD[playerid][0], 1); // enable box 
        PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, 0.000000); // width
width is this:
PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, 0.000000);

but how to change height
weex is offline   Reply With Quote
Old 20/12/2019, 12:00 AM   #2
Mattski
Big Clucker
 
Mattski's Avatar
 
Join Date: Oct 2019
Location: Under Your Moms Bed
Posts: 143
Reputation: 1
Default Re: How to change height of this box?

Change Y to whatever hight you want

PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, Y);
__________________

MY WORK:
Player Name Tags - https://pastebin.com/xncXzr0R
Mattski is offline   Reply With Quote
Old 20/12/2019, 01:24 AM   #3
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,883
Reputation: 1321
Default Re: How to change height of this box?

Well the problem you have before even this problem is using the right textdraw this is a global not a player textdraw.
Pottus is offline   Reply With Quote
Old 20/12/2019, 02:53 AM   #4
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 284
Reputation: 6
Default Re: How to change height of this box?

Quote:
Originally Posted by Pottus View Post
Well the problem you have before even this problem is using the right textdraw this is a global not a player textdraw.
lol its player textdraw
binnyl is offline   Reply With Quote
Old 20/12/2019, 02:55 AM   #5
weex
Big Clucker
 
Join Date: Dec 2016
Posts: 143
Reputation: 1
Default Re: How to change height of this box?

Quote:
Originally Posted by Mattski View Post
Change Y to whatever hight you want

PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, Y);
Quote:
Originally Posted by Mattski View Post
Change Y to whatever hight you want

PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, Y);
PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, -100.000000); // width

or

PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, 100.000000); // width

or

PlayerTextDrawTextSize(playerid, MissionTD[playerid][0], 200.000000, 200.000000); // width

it still the same height
weex is offline   Reply With Quote
Old 20/12/2019, 04:36 AM   #6
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,883
Reputation: 1321
Default Re: How to change height of this box?

Quote:
Originally Posted by binnyl View Post
lol its player textdraw
Use your head, it is the wrong TYPE of textdraw to use in this case it would be wise to make sure you know what TYPE to use and where to use it. I should have said "should" in there maybe it would have been clearer but this has been explained so many times. You use global (regular textdraws) for textdraws that are the same for everyone and player textdraws when the textdraw is different for everyone.

Anyways use a textdraw editor you are wasting so much time on one single lousy textdraw that you could re-make in a few minutes.

Also don't do this.....

MissionTD[playerid][0] = CreatePlayerTextDraw(playerid,15.199993, 112.160011, "box"); Make sure you lock those pixels to the nearest whole numbers there is a lot of problems with the look of textdraws changing drastically between resolutions. Using whole numbers ex - 15.0 - 112.0 - helps a lot when it comes to this.
Pottus is offline   Reply With Quote
Old 20/12/2019, 02:42 PM   #7
weex
Big Clucker
 
Join Date: Dec 2016
Posts: 143
Reputation: 1
Default Re: How to change height of this box?

Quote:
Originally Posted by Pottus View Post
Use your head, it is the wrong TYPE of textdraw to use in this case it would be wise to make sure you know what TYPE to use and where to use it. I should have said "should" in there maybe it would have been clearer but this has been explained so many times. You use global (regular textdraws) for textdraws that are the same for everyone and player textdraws when the textdraw is different for everyone.

Anyways use a textdraw editor you are wasting so much time on one single lousy textdraw that you could re-make in a few minutes.

Also don't do this.....

MissionTD[playerid][0] = CreatePlayerTextDraw(playerid,15.199993, 112.160011, "box"); Make sure you lock those pixels to the nearest whole numbers there is a lot of problems with the look of textdraws changing drastically between resolutions. Using whole numbers ex - 15.0 - 112.0 - helps a lot when it comes to this.
Totally aggressive and unnecessary
but thank you to advice to use .0
weex is offline   Reply With Quote
Old 20/12/2019, 11:38 PM   #8
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,883
Reputation: 1321
Default Re: How to change height of this box?

No that is how it is done...... it is always necessary.
Pottus 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
[Help] height INKISICION Scripting Help 2 05/03/2015 04:11 AM
Time change depending on height. kevin1990 Scripting Help 9 04/05/2014 10:20 PM
Get height Iron3man Scripting Help 1 11/09/2013 05:27 PM
How to get a height map of a SA mod? Awesome™ Scripting Help 2 25/06/2013 12:53 PM
Which one out of x,y,z is the height jueix Scripting Help 3 28/05/2012 08:44 AM


All times are GMT. The time now is 12:14 AM.


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