31.03.2011, 19:32
Hmm. Some fails...
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.
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
}
}
}
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.