Error help rep+
#1

Код:
(1464) : error 017: undefined symbol "playerid"
(1465) : error 017: undefined symbol "playerid"
(1466) : error 017: undefined symbol "playerid"
(1467) : error 017: undefined symbol "playerid"
(1468) : error 017: undefined symbol "playerid"
(1469) : error 017: undefined symbol "playerid"
(1470) : error 017: undefined symbol "playerid"
Код:
new Text:CountText[MAX_PLAYERS];
Код:
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);
Reply
#2

Try this.

Код:
for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
	{
	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);
}
Reply
#3

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw

Create it as a PlayerText - there's an example on the wiki page I linked above
Reply
#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
#5

It shouldn't be a textdraw problem, it probably doesn't even check something in your conditions
Reply
#6

What can be?
Reply
#7

You can put a debug message to see if the condition works, like
Код:
printf("ItWorks");
Cause i don't see any problem in your textdraw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)