01.12.2014, 13:38
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;
}