Top list.
#1

So yeah, i want a quick method to save and load and check the , for example, kills, deaths and online time.
To make a top of players, let's say, top 15.

I want to save them into a file and received data, can i possibly see a quick method of this? I don't have an exact idea how to store the name and the value for later to get them.
Reply
#2

http://forum.sa-mp.com/showthread.ph...light=Register try that one
Reply
#3

Quote:
Originally Posted by AlexzzPro
Посмотреть сообщение
You kiddin' me right? I bet you have no clue this thread is about ..
Reply
#4

Use sql
Reply
#5

Quote:
Originally Posted by Jefff
Посмотреть сообщение
Use sql
I know about that, but in fact, i think it's a good idea, i run my admin system with Y_Ini for the moment, so i could be using SQL only for the top list!
Reply
#6

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
You kiddin' me right? I bet you have no clue this thread is about ..
To save stats, you probably need a register system.
Before you can make a top15.

And if you want SQL, use this https://sampforum.blast.hk/showthread.php?tid=159785
Reply
#7

Quote:
Originally Posted by AlexzzPro
Посмотреть сообщение
To save stats, you probably need a register system.
Before you can make a top15.

And if you want SQL, use this https://sampforum.blast.hk/showthread.php?tid=159785
You are annoying, really annoying, i know what a register system is, i know what SQL is what MySQL is.

Stop acting like I'm the idiot and you are the smartass.
Reply
#8

Or you can put names to IP ranges, and start a top15 from there. SQL would be the way to go if you want to display stats on a webpage or something...
Reply
#9

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
So yeah, i want a quick method to save and load and check the , for example, kills, deaths and online time.
To make a top of players, let's say, top 15.

I want to save them into a file and received data, can i possibly see a quick method of this? I don't have an exact idea how to store the name and the value for later to get them.
Try something like.
pawn Код:
for(new i; i < 15; i++)
    {
        if(TopPlayers[i] == 0)//YOUR VAR
        {
            format(string,sizeof(string),"%d. None yet",i + 1);
        }
        else
        {
            format(string,sizeof(string),"STATS_STRING",i + 1,PLAYER_NAME,STATS);//BLAH BLAH
        }
        SendClientMessage(playerid,COLOUR,string);
    }
Reply
#10

You really should use SQL for this, it's the wisest choice.

Anyhow, I'd say when a player logins, have a few global variables which store the largest current scores/online time along with a playerid allocated to it, then if someone logs back in with a higher statistic, update the global variables, and so forth.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)