AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Advanced Score Handler v1.1 [9/19/09] (https://forums.alliedmods.net/showthread.php?t=104117)

BOYSplayCS 09-19-2009 22:19

Advanced Score Handler v1.1 [9/19/09]
 
1 Attachment(s)
Advanced Score Handler v1.1
BOYSplayCS


description
Now with more options and editing, admins or players can choose to reset kills, deaths or both at the same time. Depending on cvars, only admins can reset kills and deaths, or everyone can. Also depending on a cvar, the server will globally reset kills and deaths every 600.0 seconds, which can easily be edited to your likings.


admin commands
ash_set_kills <target> <kills> - Set players kills.
Required: ADMIN_KICK

ash_set_deaths <target> <deaths> - Set players deaths.
Required: ADMIN_KICK

ash_reset_score <target> - Reset players kills and deaths.
Required: ADMIN_KICK


player commands
/resetkills - Resets player kills back to 0.
Required: NONE

/resetdeaths - Resets player deaths back to 0.
Required: NONE

/resetall - Resets player kills and deaths back to 0.
Required: NONE

/ashmenu - Opens up the ASH Menu for quicker editing.
Required: NONE

+ashmenu - Opens up the ASH Menu for quicker editing.
Required: NONE


cvars
ash_enable <#> - Enable / Disable the plugin.
Default: 1

ash_time_enable <#> - Enable / Disable global resetting every 600.0 seconds.
Default: 1

ash_reset_enable <#> - Allow / Disallow player score resetting.
Default: 0

ash_reset_advertise <#> - Allow / Disallow advertising for commands regarding resetting.
Default: 0

ash_menu_enable <#> - Allow / Disallow the menu for players and admins.
Default: 1


editing help
If you want to change the global reset timer from 600.0 to your own personal setting simply, click the Get Source link under the download options and open up the .sma file with a text editor. From here, go to the top of the source code and change

PHP Code:

#define cTime 600.0 

to
PHP Code:

#define cTime YOUR_TIME_HERE 

After setting your own time, in seconds, save the source code. Normally, you can do this by pressing CTRL + S and it will automatically overwrite the previous file. Once saved, go to amxmodx.org and recompile the plugin and grab the .amxx file for proper use.


changelog
  • Version 1.0
    • Initial Release
  • Version 1.1
    • Fixed bug with setting kills
    • Added menu for quicker editing
    • Added new cvar for enabling/disabling menu use

BOYSplayCS 09-19-2009 22:20

Re: Advanced Score Handler v1.0 [9/19/09]
 
Space reserved.

Alucard^ 09-19-2009 22:31

Re: Advanced Score Handler v1.0 [9/19/09]
 
Good, about suggestions emm... i think:

Quote:

ash_set_kills <target> <kills> - Set players kills.
Required: ADMIN_KICK

ash_set_deaths <target> <deaths> - Set players deaths.
Required: ADMIN_KICK

ash_reset_score <target> - Reset players kills and deaths.
Required: ADMIN_KICK
Can be:

Quote:

ash_reset_score <target> <value> - 0: Reset frags & deaths 1: Reset only Frags 2: Reset only Deaths
Required: ADMIN_KICK

ash_set_score <target> <mode> <value> <value if you used "all" mod> - "frags": Set frags "deaths": Set deaths "all": Set frags & deaths
Required: ADMIN_KICK
But now, i see what i said... and, i am not sure :E

BOYSplayCS 09-19-2009 22:38

Re: Advanced Score Handler v1.0 [9/19/09]
 
Alucard^: Thanks for the suggestion, I will add this in the coming updates.

SoDD 09-19-2009 23:45

Re: Advanced Score Handler v1.0 [9/19/09]
 
Tested, works, good job! +k

BOYSplayCS 09-19-2009 23:48

Re: Advanced Score Handler v1.1 [9/19/09]
 
Updated: Version 1.1 uploaded and ready for download.

New Features: ASH Menu and more.

SoDD 09-19-2009 23:50

Re: Advanced Score Handler v1.1 [9/19/09]
 
Sweet!

Alucard^ 09-20-2009 02:26

Re: Advanced Score Handler v1.1 [9/19/09]
 
PHP Code:

set_user_frags(00);
cs_set_user_deaths(00); 

-->

PHP Code:

for(new 1<= g_MaxPlayersi++)
{
    if(
is_user_connect(i)
    {
        
set_user_frags(i0)
        
cs_set_user_deaths(i0)
    }


Maybe with index 0... will reset frags and deaths of all players but... don't know if is correct... i think, no.

-------------------------------

PHP Code:

        case 3:
        {
            return 
PLUGIN_HANDLED;
        } 

Why this?

Exolent[jNr] 09-20-2009 02:38

Re: Advanced Score Handler v1.1 [9/19/09]
 
Quote:

Originally Posted by Alucard^ (Post 938263)
PHP Code:

set_user_frags(00);
cs_set_user_deaths(00); 

-->

PHP Code:

for(new 1<= g_MaxPlayersi++)
{
    if(
is_user_connect(i)
    {
        
set_user_frags(i0)
        
cs_set_user_deaths(i0)
    }


Maybe with index 0... will reset frags and deaths of all players but... don't know if is correct... i think, no.

You are right. I checked the module code and it must use player indexes and not 0.

crazyeffect 09-20-2009 03:08

Re: Advanced Score Handler v1.1 [9/19/09]
 
Also nice!


All times are GMT -4. The time now is 11:09.

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