[Ajuda] TextDraw
#6

pawn Код:
forward RandomTD();
new Text:TextDraw;

new Cores[4][1] = {
    0xFF0000FF,//Vermelho
    0xFFFF00FF,//Amarelo
    0x0000FFFF,//Azul
    0x00FFFFFF,//Azul Marinho

};

OnGameModeInit()
{
    TextDraw= TextDrawCreate(7.000000, 427.000000, "textdraw");
    TextDrawBackgroundColor(TextDraw, 255);
    TextDrawFont(TextDraw, 1);
    TextDrawLetterSize(TextDraw, 0.379999, 1.499999);
    TextDrawColor(TextDraw, -1);
    TextDrawSetOutline(TextDraw, 1);
    TextDrawSetProportional(TextDraw, 1);
}
     SetTimer("RandomTD",3000 ,1);// bota essa linha aonde vai comeзar a mudar a textdraw 3000 = 3segundos

public RandomTD()
{
    new rand = random(sizeof(Cores));
    TextDrawColor(TextDraw, Cores[rand][0]);
    return 1;
}

public OnPlayerConnect(playerid)
{
     TextDrawShowForPlayer(playerid, TextDraw);
     return 1;
}
public OnPlayerSpawn(playerid)
{
    TextDrawHideForPlayer(playerid, TextDraw);
    return 1;
}
Use [pawn][/*pawn] sem o "*" para colocar cуdigos, a forma de cima й um exemplo apenas.
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)