04.10.2011, 01:19
When a round starts, 2 TDs are created for each player in the (ATT & DEF) teams. I want to show every player from both teams the created textdraws, but it's only showing the textdraws on your screen. It should show every created textdraw in every player's screen ( Not only yours ).
I'm pretty sure I must do another loop or something. I tried a lot of diff ways to get it working, its always showing only your textdraws on your screen!
pawn Код:
foreach(Player, i)
{
if(PVar[i][InRound] && PVar[i][Team] != T_BUM && PVar[i][Team] != T_AWAY && PVar[i][Team] != SUB_ATT && PVar[i][Team] != SUB_DEF)
{
if(PVar[i][Team] == T_ATT)
{
Line[i] = TextDrawCreate(566.00, AttStartY, "_");
Name[i] = TextDrawCreate(561.00, AttNameStartY, "_");
format(AttNameStr, sizeof(AttNameStr), "~r~%s", pName(i));
TextDrawSetString(Name[i], AttNameStr);
AttStartY += 6.40;
AttNameStartY += 6.40;
//TextDrawShowForPlayer(i, Name[i]);
}
else if(PVar[i][Team] == T_DEF)
{
Line[i] = TextDrawCreate(5.00, DefStartY, "_");
Name[i] = TextDrawCreate(74.00, DefNameStartY, "_");
format(DefNameStr, sizeof(DefNameStr), "~r~%s", pName(i));
TextDrawSetString(Name[i], DefNameStr);
DefStartY += 6.40;
DefNameStartY += 6.40;
//TextDrawShowForPlayer(i, Name[i]);
}
TextDrawShowForPlayer(i, Name[i]);
}
}