TextDraw HitList ! - 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 HitList ! (
/showthread.php?tid=595181)
TextDraw HitList ! -
TuFF12 - 29.11.2015
Hello i got a problem with the hitlist i made a textdraw for the hitlist but it shows only one player whoo has hit not all the players
here is my /hits command
CMD:hits(playerid, params[])
{
new string[256];
new count = 0;
if(gTeam[playerid] != TEAM_HITMAN)return SCM(playerid, COLOR_RED, "You are not a HitMan!");
{
foreach(Player, i)
{
if(HasHit[i] > 0)
{
format(string, sizeof(string), "Player: %s(%d) Price: $%d~n~", GetName(i), i, HasHit[i]);
TextDrawSetString(name12, string);
TextDrawShowForPlayer(playerid, name12);
TextDrawShowForPlayer(playerid, usebox);
TextDrawShowForPlayer(playerid, hits);
TextDrawShowForPlayer(playerid, lmb);
count++;
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_RED, "[ HIT LIST: There are currently no hit contracts at the moment. ]");
}
}
return 1;
}
Re: TextDraw HitList ! -
ATGOggy - 29.11.2015
Try this:
pawn Код:
format(string, sizeof(string), "%sPlayer: %s(%d) Price: $%d~n~", string, GetName(i), i, HasHit[i]);
Re: TextDraw HitList ! -
TuFF12 - 29.11.2015
Thanks man it worked +Rep