Level/exp Textdraw Bug
#1

Solved
Reply
#2

Please help me
Reply
#3

Pretty obvious problem.

pawn Код:
public StatsInfromation(playerid)
{
  new str[256];//--Should be here
  for(new i=0;i<MAX_PLAYERS;i++)
  {
    if (IsPlayerConnected(i))
    {
      //new str[256]; --Shouldn't be here
      //TextDrawHideForPlayer(i,LVL); -- Not Needed
      format(str, sizeof(str), "~r~Lygis:~w~ %d~n~~r~ EXP: ~w~%d/800" ,PlayerData[i][Lygis],PlayerData[i][exp] = GetPlayerScore(i)); //You were using PlayerData[playerid], it should have been PlayerData[i]
      TextDrawSetString(LVL[playerid],str);
      //TextDrawShowForPlayer(i,LVL[playerid] ); -- Not Needed
    }
  }
  return 1;
}
Reply
#4

Код:
public StatsInfromation()
{
	new str[256];
	for(new i=0;i<MAX_PLAYERS;i++)
	{
		if(IsPlayerConnected(i))
		{
			format(str, sizeof(str), "~r~Lygis:~w~ %d~n~~r~ EXP: ~w~%d/800" ,PlayerData[i][Lygis],PlayerData[i][exp] = GetPlayerScore(i));
			TextDrawSetString(LVL[i],str);
			//TextDrawShowForPlayer(playerid,LVL[playerid]); to OnPlayerConnect
		}
	}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)