Need help on making textdraw appear like announcement
#1

Hi, i need help in creating announcement using textdraw, but it not working.
I want it to appear one after another but not in random.

Here the code:
Код:
new Msg;
forward MessageTimer();

new aMessage[12][128] =
{
  {"Want to go ~b~somewhere cool? ~w~Type ~b~/teles~w~!"},
  {"Buy a ~g~VIP ~w~Account ~b~Today! ~w~To access lot of new ~y~features~w~!"},
  {"Always Respect ~b~This server ~y~Rules!"},
  {"Welcome to ~b~Example!"},
  {"Use the new ~y~/carmenu ~w~and ~y~/tunemenu~w~!"},
  {"Suspect of ~r~Cheaters? ~w~Use ~y~/report [id] [Reason]"},
  {"Want to be an ~r~Admin? ~w~Head ~w~to example!"},
  {"Type ~y~/jumps ~w~for a list of Stunts."},
  {"Wish to change your ~b~fighting styles? ~w~Type ~y~/fs ~w~for more ~b~Info."},
  {"Wish to ~p~Speed up the little engine? ~w~Type ~y~/sb."},
  {"Any Things you want to ~p~add ~w~head to our ~r~Website now~w~!"},
  {"We Have Added some new ~b~Stunts. Use ~y~/new ~w~to see what new."}
};

public OnPlayerSpawn(playerid)
{
	SetTimer("MessageTimer", 4000, true);
	return 1;
}

public MessageTimer() //SetTimer OnGameModeInit
{
		switch (Msg)
	{
	case 0: {TextDrawSetString(Text:TMessage, aMessage[0]); Msg++;} // first message
 	case 1: {TextDrawSetString(Text:TMessage, aMessage[1]); Msg++;}
	case 2: {TextDrawSetString(Text:TMessage, aMessage[2]); Msg++;}
    case 3: {TextDrawSetString(Text:TMessage, aMessage[3]); Msg++;}
   	case 4: {TextDrawSetString(Text:TMessage, aMessage[4]); Msg++;}
   	case 5: {TextDrawSetString(Text:TMessage, aMessage[5]); Msg++;}
    	case 6: {TextDrawSetString(Text:TMessage, aMessage[6]); Msg++;}
    case 7: {TextDrawSetString(Text:TMessage, aMessage[7]); Msg++;}
    case 8: {TextDrawSetString(Text:TMessage, aMessage[8]); Msg++;}
    case 9: {TextDrawSetString(Text:TMessage, aMessage[9]); Msg++;}
    case 10: {TextDrawSetString(Text:TMessage, aMessage[10]); Msg++;}
    	case 11: {TextDrawSetString(Text:TMessage, aMessage[11]); Msg = 0;}
 	}
 		return 1;
}
Please help me to finish this code.
Thanks in advance.
Reply


Messages In This Thread
Need help on making textdraw appear like announcement - by GamerZPro - 28.05.2010, 19:18
Re: Need help on making textdraw appear like announcement - by MadeMan - 28.05.2010, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)