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

Reset Score


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical       
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 07-14-2008 , 00:33   Reset Score
Reply With Quote #1

*Last Updated Post: Saturday, November 11, 2011* - no longer will it display "/resetscore" in the chat when you type the commend and '/rs' is now a chat command to reset the score
This is my first plugin that I am posting up, its a small plugin but I think the idea isnt too bad and somewhat original (the fact that I dont think anyone else has done it yet) and can be useful.

Description
This small plugin allows a player to reset their score back to 0 kills and 0 deaths, this saves them the trouble of reconnecting to your server to reset their score. It makes it easier on them because its a simple command that they would type, and helps your server by not having another person reconnecting and possibly lagging your server.

Client Commands
"say /resetscore" OR "say /restartscore" - This will reset their kills and deaths back to 0

Cvars/Server Commands
(These commands should be put in server.cfg if you want to change them from their defaults)
sv_rsdisplay - (Default 0) If this is set to 1 it will show who resets their score when they reset it
sv_rsadvertise - (Default 0) If this is set to 1 then it will show that this is in your server and tell people how to use it every 10 minuites and when they connect to your server

If you find any bugs please post it or if you have any suggestions feel free to post those too and ill do my best to fix/add them.

*Found a spelling error, and I reposted the fixed version as of Monday July 14 2008*

:: Changelog ::
Version 1.0 ( Monday July 13 2008 )
- Released
Included:
  • Fully working and tested score resetting with counter strike
  • Display cvar (sv_rsdisplay) to turn on/off displaying who uses it and when
  • Advertise cvar (sv_rsadvertise) to turn on/off the advertising of it to let people in the server know its in use and how to use it

Version 1.1 ( Monday July 14 2008 )
- Changed a bit of coding (cvars to pcvars)
- Fixed a spelling error

:: To Do ::
  • Add in an command that allows admins to manually change a players score and then have the addition/deduction of the players score added/removed from their overall server rank - Not Complete
Attached Files
File Type: sma Get Plugin or Get Source (resetscore.sma - 115989 views - 2.5 KB)

Last edited by silentt; 11-19-2011 at 12:04.
silentt is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 07-15-2008 , 17:20   Re: Reset Score
Reply With Quote #2

Good Job, although I'm fully against resetting any scores. I wouldnt doubt many people would use this tho.
__________________
bmann_420 is offline
Bojangles
Senior Member
Join Date: Sep 2007
Location: Over there
Old 07-15-2008 , 17:25   Re: Reset Score
Reply With Quote #3

Seems solid.

Not something I would use personally but I am sure there are users that would.
Bojangles is offline
Send a message via AIM to Bojangles
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 07-16-2008 , 07:21   Re: Reset Score
Reply With Quote #4

thanks, I don't think many people will use it too. But its nice to use if your one that doesnt like to see bad scores and constantly retries everytime he dies when he didn't want to
silentt is offline
JFeldon
Member
Join Date: Feb 2007
Location: United Kingdom
Old 07-16-2008 , 15:39   Re: Reset Score
Reply With Quote #5

True.

I'm all for, +karma

It's not badly coded either. The only thing is that if you only have a one liner, you don't need brackets.
PHP Code:
if(is_user_connected(id))
    {
    
client_print(idprint_chat"By typing /resetscore at any time during the game, you can reset your deaths and kills back to 0 (rather than reconnecting)")
    } 
is the same as

PHP Code:
if(is_user_connected(id))
        
client_print(idprint_chat"By typing /resetscore at any time during the game, you can reset your deaths and kills back to 0 (rather than reconnecting)"

It doesn't make much difference, it's just a tip if you want to make future plugins even more concise and smaller

Nice work though
__________________
+Karma if I helped! ;)

Last edited by JFeldon; 07-16-2008 at 15:42.
JFeldon is offline
Send a message via MSN to JFeldon
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-16-2008 , 16:26   Re: Reset Score
Reply With Quote #6

JFeldon: That's all a coder's preference

silentt: Please use pcvars and I will approve
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
JFeldon
Member
Join Date: Feb 2007
Location: United Kingdom
Old 07-17-2008 , 02:53   Re: Reset Score
Reply With Quote #7

I know, that's why I said it's just a tip IF you want to do that but eh
__________________
+Karma if I helped! ;)
JFeldon is offline
Send a message via MSN to JFeldon
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 07-20-2008 , 04:28  
Reply With Quote #8

I switched to pcvar's not sure if I did them right because I never use them. But I re-tested it and it worked so I guess i did. So is the difference that pcvars use variables?
silentt is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 07-20-2008 , 08:23   Re: Reset Score
Reply With Quote #9

Hmm...interesting.
__________________

anakin_cstrike is offline
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 07-21-2008 , 15:43  
Reply With Quote #10

Thank you
silentt 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 16:45.


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