[Ajuda] TextDraw
#1

Estou tentando criar um text draw e nn ta dando certo nn cara :c

pawn Код:
new text:Textdraw23
new text:Textdraw23
pawn Код:
Textdraw23 = TextDrawCreate(634.000122, 386.192626, "BRASIL PLAY LEGENDS");
    TextDrawLetterSize(Textdraw23, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw23, 3);
    TextDrawColor(Textdraw23, 0x21DD00FF);
    TextDrawBoxColor(Textdraw23, 0);
    TextDrawSetShadow(Textdraw23, 0);
    TextDrawSetOutline(Textdraw23, 1);
    TextDrawBackgroundColor(Textdraw23, 51);
    TextDrawFont(Textdraw23, 1);
    TextDrawSetProportional(Textdraw23, 1);

    Textdraw24 = TextDrawCreate(492.666595, 400.711151, "www.brasilplaylegend.com");
    TextDrawLetterSize(Textdraw24, 0.282333, 1.226666);
    TextDrawAlignment(Textdraw24, 1);
    TextDrawColor(Textdraw24, 0xFFF8F8AA);
    TextDrawSetShadow(Textdraw24, 0);
    TextDrawSetOutline(Textdraw24, 1);
    TextDrawBackgroundColor(Textdraw24, 51);
    TextDrawFont(Textdraw24, 1);
    TextDrawSetProportional(Textdraw24, 1);
coloco ela nгo da erro algum... porйm nгo aparece in-game
Reply
#2

PHP код:
 TextDrawShowForPlayer(playeridTextdraw23);
   
TextDrawShowForPlayer(playeridTextdraw24);; 
aqui no meu ta no ongamemodeinit coloca ai e testa
Reply
#3

(EXEMPLOS...)
Код:
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw23);
TextDrawShowForPlayer(playerid, Textdraw24);
return 1;
}
public OnPlayerDisconnect(playerid)
{
TextDrawHideForPlayer(playerid, Textdraw23);
TextDrawHideForPlayer(playerid, Textdraw24);
return 1; 
}
Estude:

https://sampwiki.blast.hk/wiki/TextDrawHideForPlayer

https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer
Reply
#4

Jб colocou para elas Aparecer?
Quote:

TextDrawShowForPlayer(playerid, textid);

Reply
#5

PHP код:
new text:Textdraw23
new text:Textdraw24
    Textdraw23 
TextDrawCreate(634.000122386.192626"BRASIL PLAY LEGENDS");
    
TextDrawLetterSize(Textdraw230.4499991.600000);
    
TextDrawAlignment(Textdraw233);
    
TextDrawColor(Textdraw230x21DD00FF);
    
TextDrawBoxColor(Textdraw230);
    
TextDrawSetShadow(Textdraw230);
    
TextDrawSetOutline(Textdraw231);
    
TextDrawBackgroundColor(Textdraw2351);
    
TextDrawFont(Textdraw231);
    
TextDrawSetProportional(Textdraw231);
    
Textdraw24 TextDrawCreate(492.666595400.711151"www.brasilplaylegend.com");
    
TextDrawLetterSize(Textdraw240.2823331.226666);
    
TextDrawAlignment(Textdraw241);
    
TextDrawColor(Textdraw240xFFF8F8AA);
    
TextDrawSetShadow(Textdraw240);
    
TextDrawSetOutline(Textdraw241);
    
TextDrawBackgroundColor(Textdraw2451);
    
TextDrawFont(Textdraw241);
    
TextDrawSetProportional(Textdraw241);
    
public 
OnPlayerSpawn(playerid)
{
    
TextDrawShowForPlayer(playeridTextdraw23);
    
TextDrawShowForPlayer(playeridTextdraw24); 
Reply
#6

Essa textdraw й para quando o player spawmar no servidor? se sim, utilize da seguinte maneira(se nгo, adapte vocк mesmo).

Код:
/*Inнcio*/ -- Definiзгo.

new Text:Textdraw[1][MAX_PLAYERS];

/*OnPlayerSpawn*/ -- Chama elas meu parзa, se nгo, nгo aparece mesmo. 

TextDrawShowForPlayer(playerid, Textdraw[0][playerid]);
TextDrawShowForPlayer(playerid, Textdraw[1][playerid]);

/*OnGameModeInit*/ -- Crie elas no lugar correto ou crie uma callback para suas textdraws.

for(new i=0; i<MAX_PLAYERS; i++)
{
	Textdraw[0][i] = TextDrawCreate(634.000122, 386.192626, "BRASIL PLAY LEGENDS");
	TextDrawLetterSize(Textdraw[0][i]3, 0.449999, 1.600000);
	TextDrawAlignment(Textdraw[0][i], 3);
	TextDrawColor(Textdraw[0][i], 0x21DD00FF);
	TextDrawBoxColor(Textdraw[0][i], 0);
	TextDrawSetShadow(Textdraw[0][i], 0);
	TextDrawSetOutline(Textdraw[0][i], 1);
	TextDrawBackgroundColor(Textdraw[0][i], 51);
	TextDrawFont(Textdraw[0][i], 1);
	TextDrawSetProportional(Textdraw[0][i], 1);

	Textdraw[1][i] = TextDrawCreate(492.666595, 400.711151, "www.brasilplaylegend.com");
	TextDrawLetterSize(Textdraw[1][i], 0.282333, 1.226666);
	TextDrawAlignment(Textdraw[1][i], 1);
	TextDrawColor(Textdraw[1][i], 0xFFF8F8AA);
	TextDrawSetShadow(Textdraw[1][i], 0);
	TextDrawSetOutline(Textdraw[1][i], 1);
	TextDrawBackgroundColor(Textdraw[1][i], 51);
	TextDrawFont(Textdraw[1][i], 1);
	TextDrawSetProportional(Textdraw[1][i], 1);
}

/*Caso queira esconder essas textdraw's use:*/
TextDrawHideForPlayer(playerid, Textdraw[0][playerid]);
TextDrawHideForPlayer(playerid, Textdraw[1][playerid]);
Trabalhar com cуdigos й como tratar uma mulher, com calma, carinho e sabedoria. Se nгo tens paciкncia para conquistar o dom, nгo terб resultados com reciprocidade.
Espero ter ajudado...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)