Raised This Month: $66 Target: $400
 16% 

Advanced ResetScore 0.2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical        Approver:   Hawk552 (427)
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 09-15-2009 , 08:11   Advanced ResetScore 0.2.0
Reply With Quote #1

ResetScore
0.2.0
A simple but usefull plugin: players can reset their score and money (controled by a cvar). There's a limit for score reseting and an interval between resets. Players can't reset their score if it's 0 - 0 (already reseted). Admins have a command to reset players score.

Changelog
0.2.0 :
- optimizated a bit
- added ML support
- added feature: player won't get more money than curent amount when reseting (if you have 100$ and resetscore_money cvar seted to 800, you won't receive 800$, you'll have 100$)
- added feature: if you set resetscore_max cvar to 0 there will be no limit to score reseting

0.1.0 : first released

Wich commands will reset the score
PHP Code:
new const gs_Commands[ ][ ] =
{
    
"say /resetscore",
    
"say /restartscore"
}; 
Cvars
resetscore_max
- how many times players can reset their score (default: 5)
- if you set this cvar to 0 there is no limit to score reseting

resetscore_interval - how many minutes must pass before players can reset theirs score again (default: 3)
resetscore_money
  • -2 = don't set
  • -1 = set at mp_startmoney value
  • another number will set to that value (e.g 0)
(default: -1)

Admin command
amx_resetscore <target> - reset player's score

Modules : Cstrike & Fun
Attached Files
File Type: sma Get Plugin or Get Source (resetscore.sma - 27249 views - 5.0 KB)
File Type: txt resetscore.txt (2.9 KB, 13774 views)
__________________


Last edited by anakin_cstrike; 10-03-2009 at 21:29.
anakin_cstrike is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-15-2009 , 08:33   Re: Adanced ResetScore
Reply With Quote #2

So nicely coded plugin, all looks so nice

Where is plugin it self ?
__________________
xPaw is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 09-15-2009 , 08:36   Re: Adanced ResetScore
Reply With Quote #3

Quote:
Originally Posted by xPaw View Post
So nicely coded plugin, all looks so nice

Where is plugin it self ?
I added a small info text at the top of the source, reuploaded.
__________________

anakin_cstrike is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-15-2009 , 08:38   Re: Adanced ResetScore
Reply With Quote #4

Hello. Here some suggestions you could/should change :

- Don't hook "say" if the command is simple meaning without arguments. Use register_clcmd(). It's most efficient and it will avoid unnecessary calls.
- Use the define PLUGIN_HANDLED and PLUGIN_CONTINUE, not 0 and 1. It's more readable.
- Why do you set twice the frags/deaths ? If it's because the scoreboard is not updated right away, I would prefer to use ScoreInfo event which makes more sense.
- Using ML.
__________________
Arkshine is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 09-15-2009 , 08:46   Re: Adanced ResetScore
Reply With Quote #5

"- Why do you set twice the frags/deaths ? If it's because the scoreboard is not updated right away, I would prefer to use ScoreInfo event which makes more sense." I've tried using ScoreInfo but when i spawn again it show the last score before reseting...

If I use ML i have to modify the messages at "minute" / "minutes"..not all languages follow this rule. I have an idea how to change them, let's see yours.

EDIT: Updated a bit.
__________________


Last edited by anakin_cstrike; 09-15-2009 at 08:51.
anakin_cstrike is offline
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 09-15-2009 , 09:29   Re: Adanced ResetScore
Reply With Quote #6

Adanced or Advanced ?
__________________
Javivi is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-15-2009 , 09:33   Re: Adanced ResetScore
Reply With Quote #7

Quote:
Originally Posted by Javivi View Post
Adanced or Advanced ?
Danced.
__________________
xPaw is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 09-15-2009 , 10:02   Re: Advanced ResetScore
Reply With Quote #8

Opssy ^^ 10x
__________________

anakin_cstrike is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-15-2009 , 10:55   Re: Advanced ResetScore
Reply With Quote #9

This plugin has been made it... but this have more features, and player can't resetscore ALL the time...

Now... ppl don't have to do retry/reconnect ><

Good job, i will use it this.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-15-2009 , 11:28   Re: Advanced ResetScore
Reply With Quote #10

Quote:
another number will set to that value (e.g 0)
(default: -1)
Wait a second, if I put this to 16000 then if I say /resetscore I will have 16000 money? o.O
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Reply


Thread Tools
Display Modes

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 01:49.


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