Raised This Month: $51 Target: $400
 12% 

Load & Save Stats.


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-01-2012 , 11:52   Load & Save Stats.
Reply With Quote #1

  • Description
This plugins saves the Kills and Deaths which have been ever made in the server. You can reset your kills & deaths of your current sesion, but the saved stats will always be saved and cannot be removed. At the start of choosing a team, it asks if you want to load your stats of total kills and deaths ever made. If yes, it will set your frags and deaths at the scoreboard, if not, it will reset your stats to 0.


  • Commands
/rk - Resets all kills of your current sesion (With a nice menu)
/mykills - Show your total kills
/mydeaths - Show your total deaths
/rd - Resets all deaths of your current sesion (With a nice menu)
/sm - Show the Stats menu.

sm_enable "1/0" - Enables the plugin if on 1.
sm_resetkills "1/0" - Enables ability to reset kills if on 1.
sm_resetdeaths "1/0" - Enables ability to reset deaths if on 1.


  • Credits
Bugsy - TeamInfo Hook.

  • Installation
  1. Download LoadScoreStats.amxx
  2. Put it in your addons/amxmodx/plugins/ folder
  3. open your users.ini located at configs folder
  4. Type in "LoadScoreStats.amxx" (Without quotes)

  • Requirements
AMX Mod X 1.8.1 or higer
colorchat.inc
Cstrike Module enabled
nvault Module.
Fun Module.


  • nVault Information
nVault saves using STEAM ID which means that this plugin only supports steam. It's saving on disconnect and loading on connect.

  • To do
  • Top 15 of Kills and Deaths [0%]
  • Reset Total Stats [0%]
  • Cvar to enable/disable plugin [100%]
  • Cvar to enable/disable reset kills/deaths [100%]
  • Reset scoreboard automaticly after reset/load stats [100%]
Attached Files
File Type: inc colorchat.inc (2.8 KB, 129 views)
File Type: sma Get Plugin or Get Source (LoadScoreStats.sma - 890 views - 5.9 KB)
__________________

Last edited by Napoleon_be; 05-01-2012 at 13:30.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-01-2012 , 11:54   Re: Load & Save Stats.
Reply With Quote #2

  • Changelog
Code:
Version 1.0.0: - First release
Version 1.0.1: - Added pcvars.
Version 1.0.2: - Added Refresh scoreboard after loading/resetting stats.
__________________

Last edited by Napoleon_be; 05-01-2012 at 13:26.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-01-2012 , 12:01   Re: Load & Save Stats.
Reply With Quote #3

PHP Code:
public Cmd_ResetDeaths(id) {
public 
Cmd_ResetKills(id) { 
Could be optimzed into 1 menu.

After resetting / putting deads or kills.
You should update Scoreboard to.

Else it won't be updated directly (in scoreboard)
__________________
Retired.
Xalus is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-01-2012 , 12:11   Re: Load & Save Stats.
Reply With Quote #4

You could've used the CSStats natives to get the stored user stats instead of saving them yourself.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-01-2012 , 13:15   Re: Load & Save Stats.
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
You could've used the CSStats natives to get the stored user stats instead of saving them yourself.
Mhh, i'll take a look at that.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-01-2012 , 13:26   Re: Load & Save Stats.
Reply With Quote #6

https://forums.alliedmods.net/showthread.php?p=784573
__________________
xPaw is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-01-2012 , 13:31   Re: Load & Save Stats.
Reply With Quote #7

Quote:
Originally Posted by Xalus View Post
After resetting / putting deads or kills.
You should update Scoreboard to.

Else it won't be updated directly (in scoreboard)
Done. Thanks for the suggestion.

@xPaw, never seen this plugin before and i've searched for a regular plugin like that before making mine. Also, i guess mine has a bit more features.
__________________

Last edited by Napoleon_be; 05-01-2012 at 13:32.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-02-2012 , 17:43   Re: Load & Save Stats.
Reply With Quote #8

Redundant, unapproved.
__________________
Arkshine is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode