SA-MP Forums Archive
TextDrawTextSize help, please? - 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: TextDrawTextSize help, please? (/showthread.php?tid=336560)



TextDrawTextSize help, please? - 2KY - 22.04.2012

Could somebody help me with TextDrawTextSize on this?

pawn Code:
startup3 = TextDrawCreate(480.000000, 110.000000, "_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~");
    TextDrawBackgroundColor(startup3, 255);
    TextDrawFont(startup3, 1);
    TextDrawLetterSize(startup3, 0.500000, 1.000000);
    TextDrawColor(startup3, -1);
    TextDrawSetOutline(startup3, 0);
    TextDrawSetProportional(startup3, 1);
    TextDrawSetShadow(startup3, 1);
    TextDrawUseBox(startup3, 1);
    TextDrawBoxColor(startup3, -1040845569);
    TextDrawTextSize(startup3, 620.000000, 0.000000);
   
    startup1 = TextDrawCreate(500.000000, 120.000000, "Login");
    TextDrawBackgroundColor(startup1, 255);
    TextDrawFont(startup1, 3);
    TextDrawLetterSize(startup1, 0.500000, 1.000000);
    TextDrawColor(startup1, -1);
    TextDrawSetOutline(startup1, 1);
    TextDrawSetProportional(startup1, 1);
    TextDrawSetSelectable(startup1, true);
   
    startup2 = TextDrawCreate(500.000000, 150.000000, "Register");
    TextDrawBackgroundColor(startup2, 255);
    TextDrawFont(startup2, 3);
    TextDrawLetterSize(startup2, 0.500000, 1.000000);
    TextDrawColor(startup2, -1);
    TextDrawSetOutline(startup2, 1);
    TextDrawSetProportional(startup2, 1);
    TextDrawSetSelectable(startup2, true);
   
    startup4 = TextDrawCreate(563.000000, 203.000000, "-/-");
    TextDrawBackgroundColor(startup4, 255);
    TextDrawFont(startup4, 3);
    TextDrawLetterSize(startup4, 0.500000, 1.000000);
    TextDrawColor(startup4, -1);
    TextDrawSetOutline(startup4, 1);
    TextDrawSetProportional(startup4, 1);
    TextDrawSetSelectable(startup4, true);
   
    startup5 = TextDrawCreate(500.000000, 180.000000, "Information");
    TextDrawBackgroundColor(startup5, 255);
    TextDrawFont(startup5, 3);
    TextDrawLetterSize(startup5, 0.500000, 1.000000);
    TextDrawColor(startup5, -1);
    TextDrawSetOutline(startup5, 1);
    TextDrawSetProportional(startup5, 1);
    TextDrawSetSelectable(startup5, true);
I have attempted to get this working for a week and a half now, but I can't seem to get it working correctly.. Could somebody assist me? (I've deleted the TextDrawTextSize lines because results seem to get worse-and-worse as I mess with them)


Re: TextDrawTextSize help, please? - Hiddos - 23.04.2012

Well obviously you need to fill in the height parameter as well.


Re: TextDrawTextSize help, please? - MadeMan - 23.04.2012

Deleting the TextDrawTextSize lines isn't going to make it better. Show us what have you tried.

As Hiddos already said, both coords (x and y) should be bigger than 0.000


Re: TextDrawTextSize help, please? - 2KY - 23.04.2012

About the norm I've seen is 2, 3.5; 2 being the X, 3.5 being the Y (height), I've tried that - and it bugs out the text size. it confuses the living hell out of me.

For example;

pawn Code:
startup1 = TextDrawCreate(500.000000, 120.000000, "Login");
    TextDrawBackgroundColor(startup1, 255);
    TextDrawFont(startup1, 3);
    TextDrawLetterSize(startup1, 0.500000, 1.000000);
    TextDrawColor(startup1, -1);
    TextDrawSetOutline(startup1, 1);
    TextDrawSetProportional(startup1, 1);
    TextDrawSetSelectable(startup1, true);
    TextDrawTextSize(startup1, 2.0, 3.5);
   
    startup2 = TextDrawCreate(500.000000, 150.000000, "Register");
    TextDrawBackgroundColor(startup2, 255);
    TextDrawFont(startup2, 3);
    TextDrawLetterSize(startup2, 0.500000, 1.000000);
    TextDrawColor(startup2, -1);
    TextDrawSetOutline(startup2, 1);
    TextDrawSetProportional(startup2, 1);
    TextDrawSetSelectable(startup2, true);
    TextDrawTextSize(startup1, 2.0, 3.5);
   
    startup4 = TextDrawCreate(563.000000, 203.000000, "-/-");
    TextDrawBackgroundColor(startup4, 255);
    TextDrawFont(startup4, 3);
    TextDrawLetterSize(startup4, 0.500000, 1.000000);
    TextDrawColor(startup4, -1);
    TextDrawSetOutline(startup4, 1);
    TextDrawSetProportional(startup4, 1);
    TextDrawSetSelectable(startup4, true);
    TextDrawTextSize(startup1, 2.0, 3.5);
   
    startup5 = TextDrawCreate(500.000000, 180.000000, "Information");
    TextDrawBackgroundColor(startup5, 255);
    TextDrawFont(startup5, 3);
    TextDrawLetterSize(startup5, 0.500000, 1.000000);
    TextDrawColor(startup5, -1);
    TextDrawSetOutline(startup5, 1);
    TextDrawSetProportional(startup5, 1);
    TextDrawSetSelectable(startup5, true);
    TextDrawTextSize(startup1, 2.0, 3.5);
Creates the same problem as if I didn't define the TextSize in the first place, and "Login" becomes completely unselectable.


Re: TextDrawTextSize help, please? - MadeMan - 23.04.2012

Enable textdraw boxes (TextDrawUseBox) to see where the TextSize area is.

And the X coord of TextSize should be bigger than the X coord of TextDraw. For example startup1 is at 500.000, so the TextSize X should be 502.000