SA-MP Forums Archive
~HELP~ TextDrawSetString problem - 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: ~HELP~ TextDrawSetString problem (/showthread.php?tid=310488)



~HELP~ TextDrawSetString problem - theinformer - 12.01.2012

for(new playerid; playerid < MAX_PLAYERS; playerid ++) {
format(BoardStr,sizeof(BoardStr),"~b~( ~b~~h~%s ~r~| ~w~%d~y~/~w~%d ~r~| ~y~HP~w~: ~w~%d ~b~) ~g~( ~g~~h~%s ~r~| ~w~%d~y~/~w~%d ~r~| ~y~HP~w~: ~w~%d ~g~) ~n~ ~n~ ~n~ ~r~TIME: ~y~ UNLIMITED ~r~ARENA~w~:~y~ %s" ,TeamInfo[Blue][Name],TeamInfo[Blue][Members],TeamInfo[Blue][Total],TeamInfo[Blue][Health],TeamInfo[Green][Name],TeamInfo[Green][Members],TeamInfo[Green][Total],TeamInfo[Green][Health],ArenaSTR);
Site[playerid] = TextDrawCreate(140.000000, 390.000000, "~b~( ~b~~w~ ~b~~h~Alive ~w~: ~w~ ~y~/~w~ ~y~HP~w~: ~w~ ~b~) ~g~( ~g~ ~g~~h~ Alive ~w~: ~w~ ~y~/~w~ ~y~HP~w~: ~w~~g~ ) ~n~ ~n~ ~r~ARENA~w~:~y~ ");
TextDrawBackgroundColor(Site[playerid], 255);
TextDrawFont(Site[playerid], 1);
TextDrawLetterSize(Site[playerid], 0.500000, 1.10000);
TextDrawColor(Site[playerid], -1);
TextDrawSetOutline(Site[playerid], 0);
TextDrawSetProportional(Site[playerid], 1);
TextDrawSetShadow(Site[playerid], 1);
TextDrawSetString(Site[playerid], BoardStr);
TextDrawShowForPlayer(playerid, Site[playerid]);


// I am very confused at this point because the script creates double textdraws one from format itself and the other from the textdrawcreate...

Also, at the textdraw the variables are constants, I'd like them to change as in format where it updates and changes. Any Idea please?

Thanks!