Loops + Textdraws
#1

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 ).

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]);
        }
    }
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!
Reply


Messages In This Thread
Loops + Textdraws - by [L3th4l] - 04.10.2011, 01:19
Re: Loops + Textdraws - by [HiC]TheKiller - 04.10.2011, 05:48
Re: Loops + Textdraws - by John_Cooper - 04.10.2011, 05:59
Re: Loops + Textdraws - by Basicz - 04.10.2011, 09:23
Re: Loops + Textdraws - by [HiC]TheKiller - 04.10.2011, 09:54
Re: Loops + Textdraws - by [L3th4l] - 04.10.2011, 15:40

Forum Jump:


Users browsing this thread: 5 Guest(s)