SA-MP Forums Archive
Text Draw For Teams - 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: Text Draw For Teams (/showthread.php?tid=430838)



Text Draw For Teams - eldar7393 - 15.04.2013

I'm Interested of building 2 TDs which will show in the left side of the screen:

Team A: (Score)
Team B: (Score)

And I also want to build a command that will change the TD colors, for example /scta (setcolorteamA) will open a dialog and will show a list of colors that will change "Team A" text, same /sctb for "Team B".

I want to edit Team's Score Manually by doing a command (like /setscorea \ /setscoreb) and it will change the (Score) to a specific value which I'll choose.


Re: Text Draw For Teams - DaTa[X] - 15.04.2013

use
pawn Код:
TextDrawSetString(Text:text,string[]);



Re: Text Draw For Teams - eldar7393 - 15.04.2013

Where it belongs to? Explain more please.


Re: Text Draw For Teams - Ciandlah - 15.04.2013

Example Only:

new text Score[max_players];

score[i] = textdrawcreate

Then onplayerupdate you need to gather the scores of each team
and string it like the following

new newtext[900];
format(newtext, sizeof(newtext), "~r~Red Team: %d~n~~b~Blue Team: %d", redteamscore, blueteamscore);
TextDrawSetString(Score, newtext);
TextDrawShowForPlayer(playerid, Score);


Re: Text Draw For Teams - faiznurfaza - 15.04.2013

if(gTeam[playerid] == TEAM_USA)
{
new newtext[900];
format(team1, sizeof(team1), "~r~Red Team: %d~n~~b~Blue Team: %d", redteamscore, blueteamscore);
TextDrawSetString(Score, team1);
TextDrawShowForPlayer(playerid, Score);
return 1;
}

Easily