SendClientMessage mixes up
#3

Yea, thought about that..

I just wrote the following code, do you think that this would be the best method to bypass the problem?

Код:
forward msgOutput(playerid, index);
public msgOutput(playerid, index)
{
	switch(index++)
	{
		case 0: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________1________________________________________");
		case 1: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________2________________________________________");
		case 2: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________3________________________________________");
		case 3: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________4________________________________________");
		case 4: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________5________________________________________");
		case 5: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________6________________________________________");
		case 6: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________7________________________________________");
		case 7: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________8________________________________________");
		case 8: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________9________________________________________");
		case 9: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________10________________________________________");
		case 10: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________11________________________________________");
		case 11: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________12________________________________________");
		case 12: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________13________________________________________");
		case 13: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________14________________________________________");
		case 14: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________15________________________________________");
		case 15: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________16________________________________________");
		case 16: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________17________________________________________");
		case 17: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________18________________________________________");
		case 18: SendClientMessage(playerid, BANKMSG2_COLOR, "___________________________________19________________________________________");
		case 19: SendClientMessage(playerid, BANKMSG3_COLOR, "___________________________________20________________________________________");
	}
	
	if(index >= 1 && index <= 19) SetTimerEx("msgOutput", 20, 0, "ii", playerid, index);
	
	
	printf("idx %d", index);
}
And of course, msgOutput gets initially called when the CMD is typed in.
Reply


Messages In This Thread
SendClientMessage mixes up - by MaddDogg14 - 01.09.2009, 21:25
Re: SendClientMessage mixes up - by brett7 - 01.09.2009, 21:26
Re: SendClientMessage mixes up - by MaddDogg14 - 01.09.2009, 21:44

Forum Jump:


Users browsing this thread: 1 Guest(s)