TextDraw
#1

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 ?
Reply
#2

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.
Reply
#3

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;
?
Reply
#4

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);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)