Okay Whats wrong - 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: Okay Whats wrong (
/showthread.php?tid=534642)
Okay Whats wrong -
Gogeta101 - 30.08.2014
I have made new some global variables
pawn Код:
new PlayerText:RussiaTextdraw[MAX_PLAYERS];
new PlayerText:UkrianeTextdraw[MAX_PLAYERS];
Then i wrote my player textdraws OnPlayerConnect.
pawn Код:
//Russia Textdraw
RussiaTextdraw[playerid] = CreatePlayerTextDraw(playerid, 52.799995, 421.119934, "Russia");
PlayerTextDrawLetterSize(playerid, RussiaTextdraw[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, RussiaTextdraw[playerid], 1);
PlayerTextDrawColor(playerid, RussiaTextdraw[playerid], -16776961);
PlayerTextDrawSetShadow(playerid, RussiaTextdraw[playerid], 0);
PlayerTextDrawSetOutline(playerid, RussiaTextdraw[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, RussiaTextdraw[playerid], 51);
PlayerTextDrawFont(playerid, RussiaTextdraw[playerid], 2);
PlayerTextDrawSetProportional(playerid, RussiaTextdraw[playerid], 1);
//End of Russia Textdraw.
//Ukraine textdraw
UkrianeTextdraw[playerid] = CreatePlayerTextDraw(playerid, 52.000007, 424.106781, "UKRAINE");
PlayerTextDrawLetterSize(playerid, UkrianeTextdraw[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, UkrianeTextdraw[playerid], 1);
PlayerTextDrawColor(playerid, UkrianeTextdraw[playerid], 65535);
PlayerTextDrawSetShadow(playerid, UkrianeTextdraw[playerid], 0);
PlayerTextDrawSetOutline(playerid, UkrianeTextdraw[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, UkrianeTextdraw[playerid], 51);
PlayerTextDrawFont(playerid, UkrianeTextdraw[playerid], 1);
PlayerTextDrawSetProportional(playerid, UkrianeTextdraw[playerid], 1);
//End of UkraineTextdraw
Now im trying to give a player a textdraw if his team is 1 or 0
but im getting errors.
pawn Код:
if(Player[playerid][pTeam] == 1)
{
SetPlayerPos(playerid,-250.8406,2598.8433,62.8582);
SetPlayerColor(playerid,0x0000FFFF);
SetPlayerTeam(playerid,1);
PlayerTextDrawHide(playerid,PlayerText:UkraineTextdraw);
{
error 017: undefined symbol "UkraineTextdraw"
Re: Okay Whats wrong -
ThePhenix - 30.08.2014
It shouldn't be:
Код:
PlayerTextDrawHide(playerid,PlayerText:UkraineText draw);
It should be:
PHP код:
PlayerTextDrawHide(playerid,UkrianeTextdraw[playerid]);
You are mistyping:
PHP код:
UkrianeTextdraw[playerid] = CreatePlayerTextDraw(playerid, 52.000007, 424.106781, "UKRAINE");
Ukriane, it's Ukraine!
Re: Okay Whats wrong -
Gogeta101 - 30.08.2014
Where should i write the third one