Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: CurryWurst on June 24, 2009, 01:16:17 pm

Title: Server Visits
Post by: CurryWurst on June 24, 2009, 01:16:17 pm
Script Name: ServerVisits
Script Description Keeps track of daily/weekly/over-all server visits. This script is powered by MySSQL.
Author: CurryWurst (http://forums.soldat.pl/index.php?action=profile;u=10539)
Compile Test: (http://soldatcentral.com/images/pass.gif) Passed
Core Version: 2.6.5

Full Description:
(http://dualcorepower.du.funpic.de/ServerVisits.png)

You may change the weekday when the weekly visits statistic will be set to zero by opening your database and replacing the default weekday with your favorite weekday. The default weekday is always the day when you first started the script on your server. For instance if my weekday is set to Friday all weekly stats will be set to zero on Fridays. Weekdays have to be written in the language of the operating system the soldat server runs on.

Server visits will be displayed all 5 minutes. Edit the interval by changing the following line in the code:

if (Ticks mod (3600 * 5) = 0) then

Visit EnEsCe's help page (http://enesce.com/help/) to understand how ticks are calculated.

The basic idea has been stolen from Curt`s Number of Visits (http://forums.soldat.pl/index.php?topic=18968.0) script.

(http://reauq.com/misc/soldat/sf/buynow.gif) (http://reauq.com/misc/soldat/scripts/ServerVisits+v1.1.zip)
Title: Re: Server Visits
Post by: Irlandec on June 24, 2009, 02:35:08 pm
Quote
The basic idea has been stolen from Curt`s Number of Visits script.
Cheeky one  [retard]

Nice script man, esspecially I like the look of message :)

Title: Re: Server Visits
Post by: Gizd on June 24, 2009, 03:55:04 pm
Quote
Server visits will be displayed all 5 minutes. Edit the interval by changing the following line in the code:

if (Ticks mod (3600 * 5) = 0) then
Lazy b****  :P You should make const so ppl would have better access. Don't say them to dig through your script looking for the right line...
Title: Re: Server Visits
Post by: DorkeyDear on June 25, 2009, 12:11:37 am
Nice :) thx for the mention

Quote
Server visits will be displayed all 5 minutes. Edit the interval by changing the following line in the code:

if (Ticks mod (3600 * 5) = 0) then
Lazy b****  :P You should make const so ppl would have better access. Don't say them to dig through your script looking for the right line...
lol your right :P i suggest at least putting a constant up top for how often (in ticks) to show it; if you wan't to get complex, create a parser function that can parse something like "5m 4s 49t" or "1h 10m 5s 850ms" and possibly put it in an ini file.
Title: Re: Server Visits
Post by: y0uRd34th on June 25, 2009, 06:47:37 am
Good work as like all your sripts you release!
You may put a variable which saves the time left until the last visit. ;)
Title: Re: Server Visits
Post by: CurryWurst on June 25, 2009, 11:28:02 am
Nice :) thx for the mention

Quote
Server visits will be displayed all 5 minutes. Edit the interval by changing the following line in the code:

if (Ticks mod (3600 * 5) = 0) then
Lazy b****  :P You should make const so ppl would have better access. Don't say them to dig through your script looking for the right line...
lol your right :P i suggest at least putting a constant up top for how often (in ticks) to show it; if you wan't to get complex, create a parser function that can parse something like "5m 4s 49t" or "1h 10m 5s 850ms" and possibly put it in an ini file.

Hehe, that was a 5 minutes script throwing some functions from previous scripts I made together and mix'em up :) I'll definitely improve that, but I doubt I'll implement some kind of time parser. I or rather we got much other stuff to do, remember that :P


Good work as like all your sripts you release!
You may put a variable which saves the time left until the last visit. ;)


Not 100 % certain what you mean, but there's no problem to create a var saving the last time a guy visit the server. I guess you think the script is saving data about each player, but that's not the case.
Title: Re: Server Visits
Post by: afx on January 15, 2010, 04:42:41 pm
For me this script is not working. I am using server v2.6.5 ?
Title: Re: Server Visits
Post by: y0uRd34th on January 16, 2010, 05:56:20 am
Did you enable scripting=1 in server.ini?
Title: Re: Server Visits
Post by: afx on January 17, 2010, 04:30:03 pm
yes i enable it from console when starting the server. Script creates database file bet when i join to server the script not show info about visits.
Title: Re: Server Visits
Post by: y0uRd34th on January 18, 2010, 08:50:13 am
Enable it in server.ini not through console, Im pretty sure it does not work (Hope i understand you what you mean with "console")
Title: Re: Server Visits
Post by: CurryWurst on August 09, 2013, 01:49:36 pm
Small update.

Code: [Select]
--------------------------------------------------------------------
- [Version 1.1] - 2013-08-09 => Update #1
--------------------------------------------------------------------
~ Replaced all occurrences of FloatToStr with FormatFloat to prevent trailing zeroes
- Removed redundant variable i in the ActivateServer event
- Removed obsolete reference to EnEsCe's Soldat Central website

--------------------------------------------------------------------
- [Version 1.0] - 2009-06-24 => Initial release
--------------------------------------------------------------------

Check the first post (http://forums.soldat.pl/index.php?topic=35003.msg420064#msg420064) for the download link please.
Title: Re: Server Visits
Post by: KoGAi on August 11, 2013, 10:47:03 pm
Thank you, sir. ;)
Danke schön.
Title: Re: Server Visits
Post by: CurryWurst on August 13, 2013, 11:29:19 am
Thank you, sir. ;)
Danke schön.

You are welcome :)
Title: Re: Server Visits
Post by: Akinaro on April 04, 2014, 03:21:42 am
Attachment for database