Error help rep+
#4

Works but i can't see textdraw when player capturing

Код:
new Text:CountText[MAX_PLAYERS];
Код:
OnPlayerConnect

	CountText[playerid] = TextDrawCreate(192.000000, 416.000000, "0/25 seconds left to capture");
	TextDrawBackgroundColor(CountText[playerid], 255);
	TextDrawFont(CountText[playerid], 1);
	TextDrawLetterSize(CountText[playerid], 0.460000, 1.900000);
	TextDrawColor(CountText[playerid], -1);
	TextDrawSetOutline(CountText[playerid], 1);
	TextDrawSetProportional(CountText[playerid], 1);
Код:
forward CountDown();
public CountDown()
{
	foreach(Player, playerid)
	{
		if(IsPlayerInDynamicCP(playerid, CP[CAPZONE]) && UnderAttack[CAPZONE] == 1 && IsPlayerCapturing[playerid][CAPZONE] == 1)
		{
			CountVar[playerid][CAPZONE]--;
			new str1[124];
			TextDrawShowForPlayer(playerid, CountText[playerid]);
			format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][CAPZONE]);
			TextDrawSetString(CountText[playerid], str1);
		}
		if(IsPlayerInDynamicCP(playerid, CP[SNAKE]) && UnderAttack[SNAKE] == 1 && IsPlayerCapturing[playerid][SNAKE] == 1)
		{
			CountVar[playerid][SNAKE]--;
			new str1[124];
			TextDrawShowForPlayer(playerid, CountText[playerid]);
			format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][SNAKE]);
			TextDrawSetString(CountText[playerid], str1);
		}
		if(IsPlayerInDynamicCP(playerid, CP[OLD]) && UnderAttack[OLD] == 1 && IsPlayerCapturing[playerid][OLD] == 1)
		{
			CountVar[playerid][OLD]--;
			new str1[124];
			TextDrawShowForPlayer(playerid, CountText[playerid]);
			format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][OLD]);
			TextDrawSetString(CountText[playerid], str1);
		}
		if(IsPlayerInDynamicCP(playerid, CP[Town]) && UnderAttack[Town] == 1 && IsPlayerCapturing[playerid][Town] == 1)
		{
			CountVar[playerid][Town]--;
			new str1[124];
			TextDrawShowForPlayer(playerid, CountText[playerid]);
			format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][Town]);
			TextDrawSetString(CountText[playerid], str1);
		}
 }
		return 1;
		}
Reply


Messages In This Thread
Error help rep+ - by Mijata - 12.01.2017, 23:28
Re: Error help rep+ - by BrianFaria - 12.01.2017, 23:44
Re: Error help rep+ - by TPD - 13.01.2017, 00:01
Re: Error help rep+ - by Mijata - 13.01.2017, 00:18
Re: Error help rep+ - by darkdrago - 13.01.2017, 03:08
Re: Error help rep+ - by Mijata - 13.01.2017, 08:11
Re: Error help rep+ - by darkdrago - 13.01.2017, 12:57

Forum Jump:


Users browsing this thread: 2 Guest(s)