AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Advanced ResetScore 0.2.0 (https://forums.alliedmods.net/showthread.php?t=103669)

anakin_cstrike 09-15-2009 07:11

Advanced ResetScore 0.2.0
 
2 Attachment(s)
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

xPaw 09-15-2009 07:33

Re: Adanced ResetScore
 
So nicely coded plugin, all looks so nice

Where is plugin it self ? :mrgreen:

anakin_cstrike 09-15-2009 07:36

Re: Adanced ResetScore
 
Quote:

Originally Posted by xPaw (Post 933503)
So nicely coded plugin, all looks so nice

Where is plugin it self ? :mrgreen:

I added a small info text at the top of the source, reuploaded.

Arkshine 09-15-2009 07:38

Re: Adanced ResetScore
 
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.

anakin_cstrike 09-15-2009 07:46

Re: Adanced ResetScore
 
"- 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.

Javivi 09-15-2009 08:29

Re: Adanced ResetScore
 
Adanced or Advanced ?

xPaw 09-15-2009 08:33

Re: Adanced ResetScore
 
Quote:

Originally Posted by Javivi (Post 933545)
Adanced or Advanced ?

Danced.

anakin_cstrike 09-15-2009 09:02

Re: Advanced ResetScore
 
Opssy ^^ 10x

Alucard^ 09-15-2009 09:55

Re: Advanced ResetScore
 
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.

ot_207 09-15-2009 10:28

Re: Advanced ResetScore
 
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


All times are GMT -4. The time now is 15:02.

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