SA-MP Forums Archive
Help with score system! - 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: Help with score system! (/showthread.php?tid=386059)



Help with score system! - Majava - 18.10.2012

I have this
PHP код:
enum pInfo
{
    
pPass,
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths,
    
pTimesConnected,
    
pScore

i want that "pScore" to player score on tab list.
i tested with this
PHP код:
CMD:test(playerid,params[])
{
    
PlayerInfo[playerid][pScore]++;
    return 
1;

its adding score to (Users/playername) file but i want that score to score on tablist. help me!
its something setplayerscore... but i dont know
loading data
PHP код:
public LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_Int("TimesConnected",PlayerInfo[playerid][pTimesConnected]);
    
INI_Int("Score",PlayerInfo[playerid][pScore]);
    return 
1;




Re : Help with score system! - lelemaster - 18.10.2012

Код:
CMD:test(playerid,params[]) 
{ 
    PlayerInfo[playerid][pScore]++;
    SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); 
    return 1; 
}



Re: Re : Help with score system! - Majava - 18.10.2012

Thanks man!