PDA

View Full Version : Stats. money and score wont work (please help me)


ImJaak
20/01/2015, 05:33 AM
Hello!

I edited "Don_pepe ( Badboy )" stats thing, added score and money.
But it wont add score and dont show money there.. even if i got any.

http://www.upload.ee/image/4473879/statsscore.jpg
http://www.upload.ee/image/4473878/Stats.jpg

Here i all thing http://pastebin.com/uSE6gYPn Please help me.



(Sorry for bad english, i hope you can understand me)

Sascha
20/01/2015, 06:29 AM
I'm not seeing you assigned anything to the Scores and Money variable actually
try this maybe:

public StatsInfromation() {
new str[128];
for(new i=0;i<MAX_PLAYERS;i++)
{
if (IsPlayerConnected(i))
{
PlayerData[i][Scores] = GetPlayerScore(i);//THIS AND THE LINE BELOW
PlayerData[i][Money] = GetPlayerMoney(i);
format(str, sizeof(str), "~r~kills: ~w~%d ~n~~r~deaths: ~w~%d ~n~~r~score: ~w~%d ~n~~g~Money: ~w~%d" , PlayerData[i][Kills], PlayerData[i][Deaths], PlayerData[i][Scores], PlayerData[i][Money]);
TextDrawSetString(PlayerStats[i],str);
}
}
return 1;
}

ImJaak
20/01/2015, 07:42 AM
Thank you, works!