15.08.2013, 21:13
I use this timer to change the textdraw every 2 min. but it change only 1 time and doesn't change again
pawn Код:
SetTimer("TextDrawChange",120000,1);
public TextDrawChange()
{
new crand =random(6);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(crand == 1)
{
TextDrawHideForPlayer(i,Message1);
TextDrawHideForPlayer(i,Message2);
TextDrawHideForPlayer(i,Message3);
TextDrawHideForPlayer(i,Message4);
TextDrawHideForPlayer(i,Message5);
TextDrawHideForPlayer(i,Message6);
TextDrawShowForPlayer(i,Message1);
}
if(crand == 2)
{
TextDrawHideForPlayer(i,Message1);
TextDrawHideForPlayer(i,Message2);
TextDrawHideForPlayer(i,Message3);
TextDrawHideForPlayer(i,Message4);
TextDrawHideForPlayer(i,Message5);
TextDrawHideForPlayer(i,Message6);
TextDrawShowForPlayer(i,Message2);
}
if(crand == 3)
{
TextDrawHideForPlayer(i,Message1);
TextDrawHideForPlayer(i,Message2);
TextDrawHideForPlayer(i,Message3);
TextDrawHideForPlayer(i,Message4);
TextDrawHideForPlayer(i,Message5);
TextDrawHideForPlayer(i,Message6);
TextDrawShowForPlayer(i,Message3);
}
if(crand == 4)
{
TextDrawHideForPlayer(i,Message1);
TextDrawHideForPlayer(i,Message2);
TextDrawHideForPlayer(i,Message3);
TextDrawHideForPlayer(i,Message4);
TextDrawHideForPlayer(i,Message5);
TextDrawHideForPlayer(i,Message6);
TextDrawShowForPlayer(i,Message4);
}
if(crand == 5)
{
TextDrawHideForPlayer(i,Message1);
TextDrawHideForPlayer(i,Message2);
TextDrawHideForPlayer(i,Message3);
TextDrawHideForPlayer(i,Message4);
TextDrawHideForPlayer(i,Message5);
TextDrawHideForPlayer(i,Message6);
TextDrawShowForPlayer(i,Message5);
}
if(crand == 6)
{
TextDrawHideForPlayer(i,Message1);
TextDrawHideForPlayer(i,Message2);
TextDrawHideForPlayer(i,Message3);
TextDrawHideForPlayer(i,Message4);
TextDrawHideForPlayer(i,Message5);
TextDrawHideForPlayer(i,Message6);
TextDrawShowForPlayer(i,Message6);
}
}
}
}