[Tutorial] --: Creating Textdraw's In The Easiest Way :-- [Helpful for textdraw creators]
#1

Click Here To Download TextDraw Editor


Today i am going to show a tutorial how to create Permanent Textdraws in the easiest way.

The Textdraw will only disappear upon when a player disconnects.

so to start off with download the textdraw editor i forgot the name of its creator sorry.

place the textdraws in your positions go to your scriptfiles folder and get the codes copy them and paste

it in your script.But i am going to show what each variable works with.

Step 1

create a variable to make the textdraw suppost i give the variable

Code:
new Text:Textdraw0;
so now you have finally created the variable we are done with it.

Step 2

go to
Code:
OnPlayerConnect
function and as i said said before to take the codes from scriptfiles

suppose these are my codes

Code:
 Textdraw0 = TextDrawCreate(487.000000, 7.000000, "gtasamp.smfnew.com");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 0);
    TextDrawLetterSize(Textdraw0, 0.679999, 1.500000);
    TextDrawColor(Textdraw0, -16776961);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawShowForPlayer(playerid, Textdraw0);
now you are thinking what does this codes have to do with??

ok now listen carefully
Code:
Textdraw0 = TextDrawCreate(487.000000, 7.000000, "gtasamp.smfnew.com");
remember we named a variable with TextDraw0; so this is the work of it we put in the variable name to define

the textdraw we are creating in this line.

Code:
TextDrawFont(Textdraw0, 0);
this is the font style of the textdraw there are 3 styles you can

choose your own and give this function makes the style of the textdraw.

Code:
TextDrawLetterSize(Textdraw0, 0.679999, 1.500000);
this is the function we use to make the

size of the letter as we already got the codes in scriptfiles we can just paste it here for letter size.

Code:
TextDrawColor(Textdraw0, -16776961);
this is the color of textdraw just copy it from scriptfiles

and paste it after the textdraw0 to get your own color of choice but remember don't mess up with other

codes or it will be a total mess.

Code:
TextDrawSetOutline(Textdraw0, 0);
this is the function we are using for defining the outline

of the textdraw so we get a nice outline there are many outlines you can choose for yourselves when editing

a textdraw.

finally these three codes left.

Code:
TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawShowForPlayer(playerid, Textdraw0);
while editing you will see in settings that you can set this so in the settings go and edit and get the codes

in scriptfiles and at last of everything show the textdraw for player so players can see and to mention onething

i did not give OnPlayerDisconnect code because when player disconnects it will automatically go away and this

is a Permanent code not the changing code like others.

then go to on player gamemode init to destroy the textdraw to prevent bugs put

Code:
TextDrawDestroyForPlayer(playerid, Textdraw0);
Thanks for watching my tutorial.

+Rep if it helped you or you liked it!
Reply
#2

You MUST destroy the TextDraw when the player gets disconnected

OT: Good work..
Reply
#3

Thanks guys and i wanted to say i did not destroy the textdraw because its a permanent one no needs of destroying

it and Thanks for the comments
Reply
#4

Nice btw the name of creator is Zamaroht.
Reply
#5

Quote:

Thanks for watching my tutorial

We did not watch we read
Reply
#6

Thanks for the comment +rep for you rep me back if you can and Zamaroht is the creator your right!
Reply
#7

Well, what the fuck?
Why are you creating a global textdraw on the OnPlayerConnect callback?
Reply
#8

Man your maybe a bit unpatient see the tutorial carefully that new global thing everyone knows has to be over

gamemode init man
Reply
#9

Quote:
Originally Posted by Nirzor
View Post
Man your maybe a bit unpatient see the tutorial carefully that new global thing everyone knows has to be over

gamemode init man
Well, then why did you put
pawn Code:
Textdraw0 = TextDrawCreate(487.000000, 7.000000, "gtasamp.smfnew.com");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 0);
    TextDrawLetterSize(Textdraw0, 0.679999, 1.500000);
    TextDrawColor(Textdraw0, -16776961);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
under OnPlayerConnect? Just put all of them under OnGameModeInit and put TextDrawShowForPlayer under OnPlayerConnect.
Reply
#10

Well yes, the text wil disappear automatically when the player disconnect, but what about destroying it? The fact that the player can't see the text don't mean it doesn't exists. After having a lot of textdraws created the textdraws will not work fine as they did worked for you following your own steps.

Also, you need to notice the global variable defined in OnPlayerConnect as everyone pointed.

Before calling your tutorial "the easiest way" and also "helpful" you should check it well! Checking it on a server only by yourself and not on a real server would just get you understand things with the wrong way, just as you got the textdraws thing.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)