Need help....
#6

Hmm. Some fails...
pawn Код:
Stats()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            new temp[256]; //Max client message length = 128. This is too big string. And using this in a loop? WTF
            format(temp,sizeof(temp),"%s Kills: %d Deaths: %d Ratio: %0.2f\r\n Teamkills: %d",name,PlayerData[i][Kills],
            PlayerData[i][Deaths],ratio,PlayerData[i][Tkills]);
            SendClientMessageToAll(COLOR_RED,temp); //In a loop? So it'll send the message ~ times (~ = ammount of connected players)
            TextDrawSetString(Text:DikkeDraw,temp); //Edit it ~ times for everyone? + Make a PLAYER textdraw.
            TextDrawShowForAll(Text:DikkeDraw); //See above
        }
    }
}
About the Make a PLAYEr textdraw:
That thing above is a global textdraw, I see. So, the player with the highest ID that's connected, his stats'll be displayed to everyone.
Reply


Messages In This Thread
Need help.... - by [Ha]Lommo - 30.03.2011, 20:14
Re: Need help.... - by iRemix - 30.03.2011, 20:20
Re: Need help.... - by [Ha]Lommo - 30.03.2011, 20:24
Re: Need help.... - by iggy1 - 30.03.2011, 20:28
Re: Need help.... - by [Ha]Lommo - 31.03.2011, 07:03
Re: Need help.... - by Kwarde - 31.03.2011, 19:32
Re: Need help.... - by linuxthefish - 31.03.2011, 19:34

Forum Jump:


Users browsing this thread: 1 Guest(s)