Level/exp Textdraw Bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Level/exp Textdraw Bug (
/showthread.php?tid=120422)
Level/exp Textdraw Bug -
RenisiL - 11.01.2010
Solved
Re: Level/exp Textdraw Bug -
RenisiL - 11.01.2010
Please help me
Re: Level/exp Textdraw Bug -
Joe Staff - 11.01.2010
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;
}
Re: Level/exp Textdraw Bug -
Jefff - 11.01.2010
Код:
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
}
}
}