SA-MP Forums Archive
Stats. money and score wont work (please help me) - 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)
+--- Thread: Stats. money and score wont work (please help me) (/showthread.php?tid=558956)



Stats. money and score wont work (please help me) - ImJaak - 20.01.2015

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.




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



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


Re: Stats. money and score wont work (please help me) - Sascha - 20.01.2015

I'm not seeing you assigned anything to the Scores and Money variable actually
try this maybe:
pawn Код:
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;
}



Re: Stats. money and score wont work (please help me) - ImJaak - 20.01.2015

Thank you, works!