a bit problem with text draw, plz help me - 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: a bit problem with text draw, plz help me (
/showthread.php?tid=330186)
a bit problem with text draw, plz help me -
mineralo - 31.03.2012
ok, I made a bar of health and money but when is more than 1 player online the textdraw changing,maybe I should make a individual text draw for each player online?
pawn Код:
public OnGameModeInit()
{
TextDrawHealth1 = TextDrawCreate(525.0, 126.0,": 100 ");
TextDrawMoney = TextDrawCreate(525.0, 150.0, ":0 GCash");
return 1;
}
public OnPlayerUpdate(playerid)
{
new string[200],strg[6],Float:health1;
GetPlayerHealth(playerid,health1);
format(strg,6,"%f",health1);
format(string,200,"~r~: %s %",strg);
TextDrawSetString(TextDrawHealth1,string);
TextDrawColor(TextDrawMoney,0xff0000);
TextDrawFont(TextDrawHealth1, 1);
TextDrawLetterSize(TextDrawHealth1, 0.44, 1.0);
TextDrawSetOutline(TextDrawHealth1, 1);
TextDrawSetShadow(TextDrawHealth1, 0);
TextDrawShowForPlayer(playerid,TextDrawHealth1);
format(string,200,": %d GCash",GetPlayerGCash(playerid));
TextDrawSetString(TextDrawMoney,string);
TextDrawColor(TextDrawMoney,0xFFFF00FF);
TextDrawFont(TextDrawMoney, 1);
TextDrawLetterSize(TextDrawMoney, 0.38, 1.1);
TextDrawSetOutline(TextDrawMoney, 1);
TextDrawSetShadow(TextDrawMoney, 0);
TextDrawShowForPlayer(playerid,TextDrawMoney);
return 1;
}
any idea?
Re: a bit problem with text draw, plz help me -
mineralo - 31.03.2012
any one?
Re: a bit problem with text draw, plz help me -
Manuel_P - 31.03.2012
If you're using 0.3e you need to use PlayerTextDraws. Any lower version requires you to make 1 textdraw per player.
Re: a bit problem with text draw, plz help me -
mineralo - 31.03.2012
lol, ok, I thought already about it, I'll do it thanks for reply