AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO/CSS] AbNeR ResetScore *UPDATED V1.5.1* 01/08/2023 (https://forums.alliedmods.net/showthread.php?t=205492)

AbNeR_CSS 01-11-2013 05:27

[CS:GO/CSS] AbNeR ResetScore *UPDATED V1.5.1* 01/08/2023
 
Plugin to reset your score in CSS/CS:GO with many funny features.

Cvars

Edit this in abner_resetscore.cfg that will
automatically created in [cfg/sourcemod/] after the first run, if you have installed an older version delete your abner_resetscore.cfg and reload the plugin or change the map.

sm_resetscore 1/0 - Enable or disable the plugin
sm_resetscore_public 1/0 - Enable or disable public messages when player reset.
sm_resetscore_savescores 1/0 - Save scores when players retry.
sm_resetscore_cost "amount" - If you want charge money by reset, 0 to disable.

Player Commands

!rs or !resetscore:
Reset your score (/rs and /resetscore works too).

Admin Fun Commands


sm_setscore <name or #userid> <Kills> <Deaths><Stars>: Set a custom score to a player (CSS)
sm_setscore <name or #userid> <Kills> <Deaths><Assists><Stars><Points>: S
et a custom score to a player (CSGO)
sm_resetplayer
<name or #userid>: Resetscore of a player.
sm_setpoints<name or #userid><points>: Set a custom number of points to a player. (CSGO)
sm_setstars
<name or #userid><stars>: Set a custom number of MVP stars to a player.
sm_setassists<name or #userid><assists>: Set a custom number of assists to a player (CS:GO).

Old releases stats:
AbNeR_ResetScore_V1.4 -
(5183 views)
AbNeR_ResetScore_v1.5 - (1364 views)
AbNeR_ResetScore_v1.5.zip (15086 views)

Source Code / Support / Suggestions
Direct Download

krispx 01-11-2013 05:32

Re: [CS:GO/CSS] AbNeR ResetScore
 
Hi, this plugins reset MVP and assists for csgo ?

MasterOfTheXP 01-11-2013 05:46

Re: [CS:GO/CSS] AbNeR ResetScore
 
Looks useful.

Your indentation, though, is...well...all over the place. :P Dunno how else to describe it.
PHP Code:

public Action:CommandResetScore(idargs)
{                        
                
decl String:theFolder[40];
                
GetGameFolderName(theFoldersizeof(theFolder)); 

That's a lot of spacing you've got, there.
PHP Code:

new target FindTarget(clientarg1);
    if (
target == -1)
    {
          
PrintToChat(client"\x01[ResetScore] Invalid Player."); 
              return 
Plugin_Handled;
    }

        if (!
IsClientInGame(target))
        {
              
PrintToChat(client"\x01[ResetScore] Invalid Player.");   
              return 
Plugin_Handled;
        } 

A few indentation inconsistencies there.

If you're using Notepad++, hit TextFX in the menu bar -> TextFX Edit -> Reindent C++ code, and it'll all be neatened up for you.

Also, in the CommandResetPlayer command, you ought to steal a ProcessTargetString snippet from another plugin (like fire.sp in funcommands, for instance) and use that instead of FindTarget. That way you can also avoid using GetClientName, and instead use a target_name variable which it fills out. Also, ShowActivity2 instead of PrintToChatAll is preferred, especially for servers with admin names hidden or activity messages disabled.

One "gameplay"-related thing I'd like to point out: if players can just die without getting any kills, then reset their deaths (from 0:1 to 0:0) isn't that...bad?

AbNeR_CSS 01-11-2013 06:22

Re: [CS:GO/CSS] AbNeR ResetScore
 
Quote:

Originally Posted by krispx (Post 1871414)
Hi, this plugins reset MVP and assists for csgo ?

No, i will try to make this

Quote:

Originally Posted by MasterOfTheXP (Post 1871420)
Looks useful.

Your indentation, though, is...well...all over the place. :P Dunno how else to describe it.
PHP Code:

public Action:CommandResetScore(idargs)
{                        
                
decl String:theFolder[40];
                
GetGameFolderName(theFoldersizeof(theFolder)); 

That's a lot of spacing you've got, there.
PHP Code:

new target FindTarget(clientarg1);
    if (
target == -1)
    {
          
PrintToChat(client"\x01[ResetScore] Invalid Player."); 
              return 
Plugin_Handled;
    }

        if (!
IsClientInGame(target))
        {
              
PrintToChat(client"\x01[ResetScore] Invalid Player.");   
              return 
Plugin_Handled;
        } 

A few indentation inconsistencies there.

If you're using Notepad++, hit TextFX in the menu bar -> TextFX Edit -> Reindent C++ code, and it'll all be neatened up for you.

Also, in the CommandResetPlayer command, you ought to steal a ProcessTargetString snippet from another plugin (like fire.sp in funcommands, for instance) and use that instead of FindTarget. That way you can also avoid using GetClientName, and instead use a target_name variable which it fills out. Also, ShowActivity2 instead of PrintToChatAll is preferred, especially for servers with admin names hidden or activity messages disabled.

One "gameplay"-related thing I'd like to point out: if players can just die without getting any kills, then reset their deaths (from 0:1 to 0:0) isn't that...bad?

I didnīt make the plugin in the notepad++, i made in the normal notepad, tks for the tips, I'll rearrange the structure of the plugin and release a version 1.1

AbNeR_CSS 01-11-2013 10:26

Re: [CS:GO/CSS] AbNeR ResetScore *Updated V1.1*
 
Code:

Updated V1.1
-Added sm_setstars command
-Added sm_setassists command (Only for CS:GO)
-ResetScore now resets MVP Stars (CSS/CS:GO) and Assists (CS:GO)


away000 01-11-2013 17:01

Re: [CS:GO/CSS] AbNeR ResetScore *Updated V1.1*
 
Can u make it to save scores too? with a cvar to set for permanent save, map save or disable?

PsyGaming 01-15-2013 20:15

Re: [CS:GO/CSS] AbNeR ResetScore *Updated V1.1*
 
Hi,

look at the screenshot please. The user "Hunterstick" had the best scores at CT and reseted his score, but he is then not at the bottom of the CTs. Can you fix this? Otherwise the complete scoreboard is weird, because he should be moved to the bottom of the CT list.

http://www10.pic-upload.de/thumb/16....w4wyp8zzl3.jpg

Sheepdude 01-22-2013 04:10

Re: [CS:GO/CSS] AbNeR ResetScore *Updated V1.1*
 
For CS:GO, if you're using SourceMod 1.5.0-hg3706 or above, cstrike.inc has CS_SetClientContributionScore, which can reset that last Score column to 0.

away000 01-22-2013 08:40

Re: [CS:GO/CSS] AbNeR ResetScore *Updated V1.1*
 
Quote:

Originally Posted by away000 (Post 1871756)
Can u make it to save scores too? with a cvar to set for permanent save, map save or disable?

Can u make these things?

AbNeR_CSS 01-26-2013 05:13

Re: [CS:GO/CSS] AbNeR ResetScore *Updated V1.1*
 
Quote:

Originally Posted by PsyGaming (Post 1874130)
Hi,

look at the screenshot please. The user "Hunterstick" had the best scores at CT and reseted his score, but he is then not at the bottom of the CTs. Can you fix this? Otherwise the complete scoreboard is weird, because he should be moved to the bottom of the CT list.

http://www10.pic-upload.de/thumb/16....w4wyp8zzl3.jpg

Tkx for the bug report i will update do V1.2 soon

Quote:

Originally Posted by Sheepdude (Post 1877883)
For CS:GO, if you're using SourceMod 1.5.0-hg3706 or above, cstrike.inc has CS_SetClientContributionScore, which can reset that last Score column to 0.

Tkx for the help i will update do V1.2 soon


All times are GMT -4. The time now is 23:46.

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