SA-MP Forums Archive
how to make this? - 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: how to make this? (/showthread.php?tid=603943)



how to make this? - keyvanik - 29.03.2016

Hi how can i make Box like this photo just i want make a black Box




Re: how to make this? - Mencent - 29.03.2016

Hi!

You can use this textdraw editor to realize your box.
=> https://sampforum.blast.hk/showthread.php?tid=406833

Try this! When you need help you can feel free to ask. Good luck!


Re: how to make this? - keyvanik - 29.03.2016

i use :
TextDrawUseBox(Textdraw0[playerid], 1);
TextDrawBoxColor(Textdraw0[playerid], 0x00000066)

but see pic:


i want finish somewhere i use with pen how?


Re: how to make this? - Mencent - 29.03.2016

You need this:
https://sampwiki.blast.hk/wiki/TextDrawTextSize


Re: how to make this? - keyvanik - 29.03.2016

i use this but
see

TextDrawTextSize(Textdraw0[playerid], 1.0, 1.0);


Re: how to make this? - Skimmer - 29.03.2016

That's because you have only one line. The box wraps its content.

The solution is to add ~n~ after your text many times how long you want.


Re: how to make this? - keyvanik - 29.03.2016

this is my code can you edit ?tnx

PHP код:
    Textdraw0[playerid] = TextDrawCreate(495.444885130.471000"PING: %i");
    
TextDrawLetterSize(Textdraw0[playerid], 0.3219991.430755);
    
TextDrawAlignment(Textdraw0[playerid], 1);
    
TextDrawColor(Textdraw0[playerid], -1);
    
TextDrawSetShadow(Textdraw0[playerid], 1);
    
TextDrawSetOutline(Textdraw0[playerid], 1);
    
TextDrawBackgroundColor(Textdraw0[playerid], 255);
    
TextDrawFont(Textdraw0[playerid], 2);
    
TextDrawSetProportional(Textdraw0[playerid], 1);
    
TextDrawUseBox(Textdraw0[playerid], 1);
    
TextDrawBoxColor(Textdraw0[playerid], 0x00000066)
    
TextDrawTextSize(Textdraw0[playerid], 1.01.0); 



Re: how to make this? - Skimmer - 29.03.2016

You can add more ~n~ to make bigger or remove to make smaller.

pawn Код:
Textdraw0[playerid] = TextDrawCreate(495.444885, 130.471000, "PING: %i~n~~n~~n~~n~~n~~n~");
TextDrawLetterSize(Textdraw0[playerid], 0.321999, 1.430755);
TextDrawAlignment(Textdraw0[playerid], 1);
TextDrawColor(Textdraw0[playerid], -1);
TextDrawSetShadow(Textdraw0[playerid], 1);
TextDrawSetOutline(Textdraw0[playerid], 1);
TextDrawBackgroundColor(Textdraw0[playerid], 255);
TextDrawFont(Textdraw0[playerid], 2);
TextDrawSetProportional(Textdraw0[playerid], 1);
TextDrawUseBox(Textdraw0[playerid], 1);
TextDrawBoxColor(Textdraw0[playerid], 0x00000066);



Re: how to make this? - keyvanik - 29.03.2016

im adding your code and remove ~n~ but not work like this pic




Re: how to make this? - Mencent - 29.03.2016

PHP код:
TextDrawTextSize(Textdraw0[playerid], 570.010.0); 
When it's too short then you have to increase 570.0.

=> EDIT:
PHP код:
Textdraw0[playerid] = TextDrawCreate(495.444885130.471000"PING: %i");
TextDrawLetterSize(Textdraw0[playerid], 0.3219991.430755);
TextDrawAlignment(Textdraw0[playerid], 1);
TextDrawColor(Textdraw0[playerid], -1);
TextDrawSetShadow(Textdraw0[playerid], 1);
TextDrawSetOutline(Textdraw0[playerid], 1);
TextDrawBackgroundColor(Textdraw0[playerid], 255);
TextDrawFont(Textdraw0[playerid], 2);
TextDrawSetProportional(Textdraw0[playerid], 1);
TextDrawUseBox(Textdraw0[playerid], 1);
TextDrawBoxColor(Textdraw0[playerid], 0x00000066)
TextDrawTextSize(Textdraw0[playerid], 570.010.0); 
This.

The ~n~ put a new row, so that the box becomes bigger. So you needn't ~n~.