Error help rep+ - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error help rep+ (
/showthread.php?tid=626277)
Error help rep+ -
Mijata - 12.01.2017
Код:
(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);
Re: Error help rep+ -
BrianFaria - 12.01.2017
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);
}
Re: Error help rep+ -
TPD - 13.01.2017
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
Create it as a PlayerText - there's an example on the wiki page I linked above
Re: Error help rep+ -
Mijata - 13.01.2017
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;
}
Re: Error help rep+ -
darkdrago - 13.01.2017
It shouldn't be a textdraw problem, it probably doesn't even check something in your conditions
Re: Error help rep+ -
Mijata - 13.01.2017
What can be?
Re: Error help rep+ -
darkdrago - 13.01.2017
You can put a debug message to see if the condition works, like
Cause i don't see any problem in your textdraw