SA-MP Forums Archive
[AJUDA] Texts Draws Nao Aparece - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Texts Draws Nao Aparece (/showthread.php?tid=281021)



[AJUDA] Texts Draws Nao Aparece - rene20 - 03.09.2011

Se ligem o o CODIGO


PHP код:
new Text:relogio;
new 
Text:relogio2
PHP код:
 forward relogio(playerid); 
PHP код:
    TextDrawShowForAll(relogio);
    
TextDrawShowForPlayer(playeridrelogio1);
    
TextDrawShowForAll(relogio2);
    
TextDrawShowForPlayer(playeridrelogio2); 
PHP код:
TextDrawShowForAll(relogio);
    
TextDrawShowForPlayer(playeridrelogio);
    
TextDrawShowForAll(relogio2);
    
TextDrawShowForPlayer(playeridrelogio2); 
PHP код:
 TextDrawDestroy(relogio);
                    
TextDrawDestroy(relogio2);
                       
TextDrawHideForAll(relogio);
                       
TextDrawHideForAll(relogio); 
PHP код:
 SetTimer("relogio",1000,1);
    
relogioTextDrawCreate(496.000000,6.000000,"--");
    
relogio2 TextDrawCreate(550.000000,23.000000,"--");
    
Informacaoplayer TextDrawCreate(4.4433.0,"~y~ -> evolutionsamp.forumeiros.com - Acesse<-");
    
TextDrawAlignment(Informacaoplayer,0);
    
TextDrawBackgroundColor(Informacaoplayer,0x000000ff);
    
TextDrawFont(Informacaoplayer,1);
    
TextDrawLetterSize(Informacaoplayer,0.279999,1.300000);
    
TextDrawColor(Informacaoplayer,0xffffffff);
    
TextDrawSetOutline(Informacaoplayer,1);
    
TextDrawSetProportional(Informacaoplayer,1);
    
TextDrawSetShadow(Informacaoplayer,1);
    
TextDrawAlignment(relogio,0);
    
TextDrawAlignment(relogio2,0);
    
TextDrawBackgroundColor(relogio,0x000000FF);
    
TextDrawBackgroundColor(relogio2,0x000000FF);
    
TextDrawFont(relogio,2);
    
TextDrawLetterSize(relogio,0.399999,2.000000);
    
TextDrawFont(relogio2,2);
    
TextDrawLetterSize(relogio2,0.399999,2.000000);
    
TextDrawColor(relogio,0xCCCCFFFF);
    
TextDrawColor(relogio2,0xCCCCFFFF);
    
TextDrawSetProportional(relogio,1);
    
TextDrawSetProportional(relogio2,1);
    
TextDrawSetShadow(relogio,1);
    
TextDrawSetShadow(relogio2,1);
    
TextDrawSetOutline(relogio,1);
    
TextDrawSetOutline(rrelogio2,1);
    
TextDrawShowForAll(relogio);
    
TextDrawShowForAll(relogio); 



Re: [AJUDA] Texts Draws Nao Aparece - StrondA_ - 04.09.2011

Cara, cade a public relogio? affz, apenas coloque da seguinte forma em seu Game Mode!
pawn Код:
// Topo do GM!
new Text:relogio;
new Text:relogio2;
forward relogio(playerid);

public OnFilterScriptInit() // Ou OnGameModeInit!
{
    SetTimer("relogio",1000,1);
    relogio= TextDrawCreate(496.000000,6.000000,"--");
    relogio2 = TextDrawCreate(550.000000,23.000000,"--");
    Informacaoplayer = TextDrawCreate(4.4, 433.0,"~y~VADIAGEM EVOLUTION GAMES OWNED!");
    TextDrawAlignment(Informacaoplayer,0);
    TextDrawBackgroundColor(Informacaoplayer,0x000000ff);
    TextDrawFont(Informacaoplayer,1);
    TextDrawLetterSize(Informacaoplayer,0.279999,1.300000);
    TextDrawColor(Informacaoplayer,0xffffffff);
    TextDrawSetOutline(Informacaoplayer,1);
    TextDrawSetProportional(Informacaoplayer,1);
    TextDrawSetShadow(Informacaoplayer,1);
    TextDrawAlignment(relogio,0);
    TextDrawAlignment(relogio2,0);
    TextDrawBackgroundColor(relogio,0x000000FF);
    TextDrawBackgroundColor(relogio2,0x000000FF);
    TextDrawFont(relogio,2);
    TextDrawLetterSize(relogio,0.399999,2.000000);
    TextDrawFont(relogio2,2);
    TextDrawLetterSize(relogio2,0.399999,2.000000);
    TextDrawColor(relogio,0xCCCCFFFF);
    TextDrawColor(relogio2,0xCCCCFFFF);
    TextDrawSetProportional(relogio,1);
    TextDrawSetProportional(relogio2,1);
    TextDrawSetShadow(relogio,1);
    TextDrawSetShadow(relogio2,1);
    TextDrawSetOutline(relogio,1);
    TextDrawSetOutline(rrelogio2,1);
    TextDrawShowForAll(relogio);
    TextDrawShowForAll(relogio);
    return true;
}
//Depois a public farб o resto jб que vc nгo postou, й desnecessбrio algumas coisas ali >
Explicando:

TextDrawShowForAll(relogio); Irб fazer o textdraw aparecer para todos os jogadores conectados!

TextDrawShowForPlayer(playerid, relogio); Irб fazer o textdraw aparecer somente ao player.

Ou seja, vocк estava executando as duas funзхes ao mesmo tempo, entгo nгo й preciso, somente coloque da seguinte forma que sitei que vai aparecer, lembrando, й necessбrio ter a public no Game Mode, caso nгo tenha, nгo vai funcionar !
hб, as funзхes: TextDrawDestroy(relogio); & TextDrawHideForAll(relogio); iriam apaga-los!




Re: [AJUDA] Texts Draws Nao Aparece - rene20 - 04.09.2011

Continuo a nao aparecer


Re: [AJUDA] Texts Draws Nao Aparece - StrondA_ - 04.09.2011

Cara, nгo existe isso, vocк nгo coloco corretamente, ou sua public " relogio " nгo existe!


Re: [AJUDA] Texts Draws Nao Aparece - rene20 - 04.09.2011

mas o informaзao player tambem nao vai. e ele so ta la o on game mode init


Re: [AJUDA] Texts Draws Nao Aparece - StrondA_ - 04.09.2011

pawn Код:
public OnFilterScriptInit() // Ou OnGameModeInit!
{
    SetTimer("relogio",1000,1);
    relogio= TextDrawCreate(496.000000,6.000000,"--");
    relogio2 = TextDrawCreate(550.000000,23.000000,"--");
    Informacaoplayer = TextDrawCreate(4.4, 433.0,"~y~VADIAGEM EVOLUTION GAMES OWNED!");
    TextDrawAlignment(Informacaoplayer,0);
    TextDrawBackgroundColor(Informacaoplayer,0x000000ff);
    TextDrawFont(Informacaoplayer,1);
    TextDrawLetterSize(Informacaoplayer,0.279999,1.300000);
    TextDrawColor(Informacaoplayer,0xffffffff);
    TextDrawSetOutline(Informacaoplayer,1);
    TextDrawSetProportional(Informacaoplayer,1);
    TextDrawSetShadow(Informacaoplayer,1);
    TextDrawAlignment(relogio,0);
    TextDrawAlignment(relogio2,0);
    TextDrawBackgroundColor(relogio,0x000000FF);
    TextDrawBackgroundColor(relogio2,0x000000FF);
    TextDrawFont(relogio,2);
    TextDrawLetterSize(relogio,0.399999,2.000000);
    TextDrawFont(relogio2,2);
    TextDrawLetterSize(relogio2,0.399999,2.000000);
    TextDrawColor(relogio,0xCCCCFFFF);
    TextDrawColor(relogio2,0xCCCCFFFF);
    TextDrawSetProportional(relogio,1);
    TextDrawSetProportional(relogio2,1);
    TextDrawSetShadow(relogio,1);
    TextDrawSetShadow(relogio2,1);
    TextDrawSetOutline(relogio,1);
    TextDrawSetOutline(rrelogio2,1);
    TextDrawShowForAll(relogio);
    TextDrawShowForAll(relogio2);
    TextDrawShowForAll(Informacaoplayer);    
    return true;
}
Nгo estou intendendo direito, mais acho que й isso, tenta ai!


Re: [AJUDA] Texts Draws Nao Aparece - Vai_Besta - 04.09.2011

vc poderia ter explicado melhor onde ta cada parte do codigo


Re: [AJUDA] Texts Draws Nao Aparece - rene20 - 04.09.2011

nada adianta , nao aparece .


Re: [AJUDA] Texts Draws Nao Aparece - StrondA_ - 04.09.2011

Serб que vou ter que fazer os textdraws novamente para vocк ? ¬¬ '
VOCК TEM A " PUBLIC " RELУGIO NO FINAL DO GM ?