04.08.2011, 19:54
lo que quiero hacer es que el texdraw1 aparesca unos 10 segundos y despues desaparesca depues que pase 1 o 2 minutos vuelva a aparecer pero el otro texdraw2 y obviamente que tambien desaparecalos hice haci pero no me queda bien que estoy fallando??
pawn Код:
new Timer;
forward AutoAnuncios();
new Text:anuncios;
new TextAnuncios[][] =
{
"hey el mensaje mas largo mostar1",
"hey el mensaje mas largo mostar2",
"hey el mensaje mas largo mostar3"
};
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, anuncios);
return 1;
}
public OnGameModeInit()
{
anuncios = TextDrawCreate(230.000000, 303.000000, " ");
TextDrawAlignment(anuncios,0);
TextDrawBackgroundColor(anuncios, 255);
TextDrawFont(anuncios, 3);//1
TextDrawLetterSize(anuncios, 0.4998, 2.1500000);
TextDrawColor(anuncios, -1677961);//-1
TextDrawSetOutline(anuncios, 1);
TextDrawSetProportional(anuncios, 1);
SetTimer("AutoAnuncios",60000,1);
Timer = SetTimer("ShowMessage",61000,1);
return 1;
}
public OnFilterScriptExit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
TextDrawHideForPlayer(i, anuncios);
TextDrawHideForAll(anuncios);
TextDrawDestroy(anuncios);
KillTimer(Timer);
return 1;
}
public AutoAnuncios()
{
TextDrawSetString(anuncios, TextAnuncios[random(sizeof(TextAnuncios))]);
return 1;
}
forward ShowMessage( );
public ShowMessage( )
{
TextDrawShowForAll(anuncios);
SetTimer("HideMessage",30000,1);
forward HideMessage( );
public HideMessage( )
{
TextDrawHideForAll(anuncios);
}