24.09.2014, 21:39
(
Последний раз редактировалось LeroyII; 25.09.2014 в 08:35.
)
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:
This will define textdraw's name. If you want more textdraws put it like this:
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:
If you want to change except size of the letters put it below like this:
And put everything you need there like box create etc.
If you want more textdraws write it like this:
Replace TextdrawXLocation and TextdrawYLocation with your coordinates on screen. This could help!
Now one more thing. Go to
and under
put this:
And if you are creating more textdraw type it like this:
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:
and below
put this:
And if you are creating more textdraws create it like this:
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!
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!
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!
Creating Textdraw
So now we defined name now let's create textdraw! Go to
pawn Код:
public OnGamemodeInit()
pawn Код:
{
pawn Код:
Textdraw0 = TextDrawCreate(TextdrawLocationX, TextdrawLocationY, "TEXT"); //replace Textdraw0 with your textdraw's name
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
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
Now one more thing. Go to
pawn Код:
public OnPlayerConnect(playerid)
pawn Код:
{
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0); //replace Textdraw0 with name of your textdraw
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
Hiding Textdraw
Now go to this:
pawn Код:
public OnPlayerSpawn(playerid)
pawn Код:
{
pawn Код:
TextDrawHideForPlayer(playerid, Textdraw0); //replace Textdraw0 with name of your textdraw
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
Comment how you like it and please +rep me if it helped you!