TD Color changer
#3

Try this
Код:
new Text:firstcolor;
new Text:secondcolor;
new Text:thirdcolor;
new havecolor[MAX_PLAYERS] = 0;

public OnGameModeInit()
{
	firstcolor = TextDrawCreate(251.000000, 0.000000, "_");
	TextDrawBackgroundColor(firstcolor, 255);
	TextDrawFont(firstcolor, 1);
	TextDrawLetterSize(firstcolor, 0.490000, 1.400000);
	TextDrawColor(firstcolor, -1);
	TextDrawSetOutline(firstcolor, 0);
	TextDrawSetProportional(firstcolor, 1);
	TextDrawSetShadow(firstcolor, 1);
	TextDrawUseBox(firstcolor, 1);
	TextDrawBoxColor(firstcolor, 100);
	TextDrawTextSize(firstcolor, 370.000000, 0.000000);

	secondcolor = TextDrawCreate(251.000000, 0.000000, "_");
	TextDrawBackgroundColor(secondcolor, 255);
	TextDrawFont(secondcolor, 1);
	TextDrawLetterSize(secondcolor, 0.490000, 1.400000);
	TextDrawColor(secondcolor, -1);
	TextDrawSetOutline(secondcolor, 0);
	TextDrawSetProportional(secondcolor, 1);
	TextDrawSetShadow(secondcolor, 1);
	TextDrawUseBox(secondcolor, 1);
	TextDrawBoxColor(secondcolor, 100);
	TextDrawTextSize(secondcolor, 370.000000, 0.000000);
	
	thirdcolor = TextDrawCreate(251.000000, 0.000000, "_");
	TextDrawBackgroundColor(thirdcolor, 255);
	TextDrawFont(thirdcolor, 1);
	TextDrawLetterSize(thirdcolor, 0.490000, 1.400000);
	TextDrawColor(thirdcolor, -1);
	TextDrawSetOutline(thirdcolor, 0);
	TextDrawSetProportional(thirdcolor, 1);
	TextDrawSetShadow(thirdcolor, 1);
	TextDrawUseBox(thirdcolor, 1);
	TextDrawBoxColor(thirdcolor, 100);
	TextDrawTextSize(thirdcolor, 370.000000, 0.000000);
	return 1;
}
public OnPlayerConnect(playerid)
{
	havecolor[playerid] = 1;
	SetTimerEx("changingcolor", 3000, true, "i", playerid);r
	return 1;
}
forward changingcolor(playerid);
public changingcolor(playerid)
{
	if(havecolor[playerid] == 1)
	{
	    TextDrawHideForPlayer(playerid, thirdcolor);
	    TextDrawShowForPlayer(playerid, firstcolor);
		havecolor[playerid] = 2;
	}
	else if(havecolor[playerid] == 2)
	{
 	    TextDrawHideForPlayer(playerid, firstcolor);
	    TextDrawShowForPlayer(playerid, secondcolor);
	    havecolor[playerid] = 3;
	}
	else if(havecolor[playerid] == 3)
	{
 		TextDrawHideForPlayer(playerid, secondcolor);
	    TextDrawShowForPlayer(playerid, thirdcolor);
		havecolor[playerid] = 1;
	}
	return 1;
}
Reply


Messages In This Thread
TD Color changer - by ivndosos - 19.02.2018, 13:00
Re: TD Color changer - by RogueDrifter - 19.02.2018, 13:11
Re: TD Color changer - by AstroPoid - 19.02.2018, 13:16
Re: TD Color changer - by RogueDrifter - 19.02.2018, 13:36
Re: TD Color changer - by Mugala - 19.02.2018, 17:53
Re: TD Color changer - by GRiMMREAPER - 19.02.2018, 19:18

Forum Jump:


Users browsing this thread: 2 Guest(s)