[Ajuda] TextDraw
#8

Quote:
Originally Posted by LucasDias
Посмотреть сообщение
Obrigado, a textdraw apareceu, porйm nгo estб trocando a cor, mas sу uma duvida, tem como eu fazer com format ?

tipo assim?

pawn Код:
format(newtext, sizeof(newtext), "~y~Meu~g~Texto ~w~[RPG]~g~ [0.3b]     );
Trocar++;
TextDrawSetString(Textdraw18[i], newtext);


format(newtext, sizeof(newtext), "
~y~Meu~g~Texto~w~[RPG]~g~ [0.3b]   );
Trocar = 1;
TextDrawSetString(Textdraw18[i], newtext);
ele ir trocando apenas algumas letras desse modo? com " ~w~ , ~y~, ~g~ "
Vi em uma gamemode que baixei a um tempo, achei interessante e procurei o sistema, mas nгo o entendi, muito menos consegui fazer ficar aparecendo!
Simples:
PHP код:
forward RandomTD();
new 
Text:TextDraw;
new 
Cores[][] = {
 
"~w~"//Branco
 
"~b~"//Azul
 
"~r~"//Vermelho
 
"~y~"//Amarelo
 
"~g~" //Verde
};
public 
OnGameModeInit()
{
    
TextDrawTextDrawCreate(7.000000427.000000"textdraw");
    
TextDrawBackgroundColor(TextDraw255);
    
TextDrawFont(TextDraw1);
    
TextDrawLetterSize(TextDraw0.3799991.499999);
    
TextDrawColor(TextDraw, -1);
    
TextDrawSetOutline(TextDraw1);
    
TextDrawSetProportional(TextDraw1);
    
SetTimer("RandomTD",3000 ,1);
   return 
1;
}
public 
RandomTD()
{
 new 
String[150];  //Variavel
 /*
  No Format, ele pegarб cores aleatуrias
  Sintaxe: [Cores[random(Numero_MAXIMO)] ou Cores[random(sizeof(Cores))];
 */
 
format(String,sizeof(String),"%sIntel%sG%spics%s",Cores[random(4)],Cores[random(4)],Cores[random(4)],Cores[random(4)]);
 
TextDrawSetString(TextDraw,String);  //Seta a String na TextDraw !
 
return 1;
}
public 
OnPlayerConnect(playerid//Chamada quando player connecta
{
 
TextDrawShowForPlayer(playeridTextDraw); //Mostra a TextDraw
 
return 1;
}
public 
OnPlayerSpawn(playerid)  //Chamada quando entra em Spawn
{
  
TextDrawHideForPlayer(playeridTextDraw); //Oculta TextDraw
  
return 1;

Reply


Messages In This Thread
TextDraw - by LucasDias - 30.11.2014, 23:26
Re: TextDraw - by ReyMysterio - 30.11.2014, 23:27
Re: TextDraw - by higorklein - 30.11.2014, 23:45
Re: TextDraw - by focaximubh - 30.11.2014, 23:56
Re: TextDraw - by LucasDias - 01.12.2014, 11:29
Re: TextDraw - by PedexM - 01.12.2014, 13:38
Re: TextDraw - by LucasDias - 01.12.2014, 14:41
Re: TextDraw - by IntelGrapics - 01.12.2014, 15:15
Re: TextDraw - by LucasDias - 01.12.2014, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)