Top list. - 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: Top list. (
/showthread.php?tid=249013)
Top list. -
Zh3r0 - 16.04.2011
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.
Re: Top list. -
BizzyD - 16.04.2011
http://forum.sa-mp.com/showthread.ph...light=Register try that one
Re: Top list. -
Zh3r0 - 16.04.2011
Quote:
Originally Posted by AlexzzPro
|
You kiddin' me right? I bet you have no clue this thread is about ..
Re: Top list. -
Jefff - 16.04.2011
Use sql
Re: Top list. -
Zh3r0 - 16.04.2011
Quote:
Originally Posted by Jefff
Use sql ![Cheesy](images/smilies/biggrin.png)
|
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!
Re: Top list. -
BizzyD - 17.04.2011
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
Re: Top list. -
Zh3r0 - 17.04.2011
Quote:
Originally Posted by AlexzzPro
|
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.
Re: Top list. -
linuxthefish - 17.04.2011
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...
Re: Top list. -
Stigg - 17.04.2011
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);
}
Re: Top list. -
Calgon - 17.04.2011
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.