SA-MP Forums Archive
TextDraw - 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: TextDraw (/showthread.php?tid=569869)



TextDraw - Brys - 03.04.2015

I made some TextDraw for my server, i want those TextDraws view just on the logging menu, like :

Welcome to my server :
Код:
MainMenu[5] = TextDrawCreate(87 ,40 , "Welcome To My Server!");
	TextDrawFont(MainMenu[5] , 1);
	TextDrawLetterSize(MainMenu[5] , 1, 7);
	TextDrawColor(MainMenu[5] , 0x2072d6FF);
	TextDrawSetOutline(MainMenu[5] , true);
	TextDrawSetProportional(MainMenu[5] , true);
	TextDrawSetShadow(MainMenu[5] , 1);
This code is already from the server, i've made new one :

Код:
MainMenu[5] = TextDrawCreate(95 ,51 , "ServerWebsite.com");
	TextDrawFont(MainMenu[5] , 2);
	TextDrawLetterSize(MainMenu[5] , 1, 7);
	TextDrawColor(MainMenu[5] , 0x2072d6FF);
	TextDrawSetOutline(MainMenu[5] , true);
	TextDrawSetProportional(MainMenu[5] , true);
	TextDrawSetShadow(MainMenu[5] , 1);
When i put the second one with the first, it's get bugged and the website "for example" views.. any help ?


Re : TextDraw - AlexBlack - 03.04.2015

you have put the same definition to the second textdraw "MainMenu[5]"

create a new variable

PHP код:
new myvariable
PHP код:
    myvariable TextDrawCreate(95 ,51 "ServerWebsite.com");
    
TextDrawFont(myvariable 2);
    
TextDrawLetterSize(myvariable 17);
    
TextDrawColor(myvariable 0x2072d6FF);
    
TextDrawSetOutline(myvariable true);
    
TextDrawSetProportional(myvariable true);
    
TextDrawSetShadow(myvariable 1); 
good luck.


Re: TextDraw - Brys - 03.04.2015

Thank you, i'll +REP If it worked

But are you sure that will view only on the login screen ? and, i want to make another one, so i'll make for example :
Код:
new myvariable2;
?


Re : TextDraw - AlexBlack - 03.04.2015

yes use myvariable2 ( you can name it what you want ), and if you want to make it just on the loggin screen , you need to show the textdraw in the callback "OnPlayerConnect"

Quote:

TextDrawShowForPlayer(playerid, myvariable);

and hide it when the player spawn "OnPlayerSpawn"

Quote:

TextDrawHideForPlayer(playerid, myvariable);