Simple Textdraw Tutorial when player enter server -
LeroyII - 24.09.2014
Introduction
Hello guys! Some of guys asked me to create textdraw for them when player login! I did it but here is tutorial for all others who don't know how to do it!
Starting
Ok, so i will show you how to create it inside gamemode! For start on top of your gamemode put this:
pawn Код:
new Text:Textdraw0; //replace Textdraw0 with your textdraw's name!
This will define textdraw's name. If you want more textdraws put it like this:
pawn Код:
new Text:Textdraw0; //replace Textdraw0 with your textdraw's name!
new Text:Textdraw1; //replace Textdraw1 with your second textdraw's name!
new Text:Textdraw2; //replace Textdraw2 with your third textdraw's name!
And you can add more if you want!
Creating Textdraw
So now we defined name now let's create textdraw! Go to
And below
Put this:
pawn Код:
Textdraw0 = TextDrawCreate(TextdrawLocationX, TextdrawLocationY, "TEXT"); //replace Textdraw0 with your textdraw's name
If you want to change except size of the letters put it below like this:
pawn Код:
Textdraw0 = TextDrawCreate(TextdrawXLocation, TextdrawYLocation, "TEXT"); //replace Textdraw0 with your textdraw's name
TextDrawLetterSize(Textdraw0, LetterSizeX, LetterSizeY); //replace textdraw 0 with your textdraw's name
And put everything you need there like box create etc.
If you want more textdraws write it like this:
pawn Код:
Textdraw0 = TextDrawCreate(TextdrawXLocation, TextdrawYLocation, "TEXT"); //replace Textdraw0 with your textdraw's name
Textdraw1 = TextDrawCreate(TextdrawXLocation, TextdrawYLocation, "TEXT"); //replace Textdraw1 with your second textdraw's name
Textdraw2 = TextDrawCreate(TextdrawXLocation, TextdrawYLocation, "TEXT"); //replace Textdraw2 with your third textdraw's name
Replace TextdrawXLocation and TextdrawYLocation with your coordinates on screen.
This could help!
Now one more thing. Go to
pawn Код:
public OnPlayerConnect(playerid)
and under
put this:
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0); //replace Textdraw0 with name of your textdraw
And if you are creating more textdraw type it like this:
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0); //replace Textdraw0 with name of your textdraw
TextDrawShowForPlayer(playerid, Textdraw1); //replace Textdraw1 with name of your second textdraw
TextDrawShowForPlayer(playerid, Textdraw2); //replace Textdraw2 with name of your third textdraw
So we created them now this will spawn when player enter. But problem is they will be there when he spawns and untill he leave server! So lets remove it when he spawns!
Hiding Textdraw
Now go to this:
pawn Код:
public OnPlayerSpawn(playerid)
and below
put this:
pawn Код:
TextDrawHideForPlayer(playerid, Textdraw0); //replace Textdraw0 with name of your textdraw
And if you are creating more textdraws create it like this:
pawn Код:
TextDrawHideForPlayer(playerid, Textdraw0); //replace Textdraw0 with name of your textdraw
TextDrawHideForPlayer(playerid, Textdraw1); //replace Textdraw1 with name of your second textdraw
TextDrawHideForPlayer(playerid, Textdraw2); //replace Textdraw2 with name of your third textdraw
And you are done! If i missed something or need any help with it please tell me!
Comment how you like it and please +rep me if it helped you!
Re: Simple Textdraw Tutorial when player enter server -
ZaBraNjeNi - 24.09.2014
Well you explained. This is good for beginners.
Re: Simple Textdraw Tutorial when player enter server -
LeroyII - 24.09.2014
Thank you!
Re: Simple Textdraw Tutorial when player enter server -
PMH - 25.09.2014
u didn't defined neither explained the positions?
Re: Simple Textdraw Tutorial when player enter server -
LeroyII - 25.09.2014
Quote:
Originally Posted by PMH
u didn't defined neither explained the positions?
|
Defined? Btw better now?