SA-MP Forums Archive
Textdraw shutdown other texdraw gamemodinit - 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: Textdraw shutdown other texdraw gamemodinit (/showthread.php?tid=534625)



Textdraw shutdown other texdraw gamemodinit - Last_Shadow - 30.08.2014

Hello guys
I use couple of textdraw in my gamemode but this part makes all the other ones not to work
now i tryed to remove this to see if that what cause the problem and it is.

Ongamemodeinit

the script:

for(new p=0; p < MAX_PLAYERS; p++){


Stats2[p] = TextDrawCreate(146.000000, 434.000000, "Level: 01");
TextDrawBackgroundColor(Stats2[p], 255);
TextDrawFont(Stats2[p], 1);
TextDrawLetterSize(Stats2[p], 0.360000, 1.000000);
TextDrawColor(Stats2[p], -1);
TextDrawSetOutline(Stats2[p], 1);
TextDrawSetProportional(Stats2[p], 1);
TextDrawSetSelectable(Stats2[p], 0);

}

why would it do this?


Re: Textdraw shutdown other texdraw gamemodinit - Rodney Francalim - 30.08.2014

Why are you creating a loop that goes from 0 to MAX_PLAYERS - 1?

I mean, it has to be showed to players, right?

So, use CreatePlayerTextDraw, not TextDrawCreate.


Re: Textdraw shutdown other texdraw gamemodinit - M0HAMMAD - 30.08.2014

First: Are You Iranian ?
And In The OnPlayerConnect Write "LoadPlayerTD(playerid);"
And Create Stock :
pawn Код:
stock LoadPlayerTD(playerid)
{
// Put Your Stats2 TD And Replace playerid for P
// Example : Stats2[playerid] = TextDrawCreate(146.000000, 434.000000, "Level: 01");
}
sorry for my bad english
don't forget +rep


Re: Textdraw shutdown other texdraw gamemodinit - Last_Shadow - 30.08.2014

M0HAMMAD
tnx you helped me alot!
+rep