Raised This Month: $150 Target: $400
 37% 

[CS:S] Resetscore


Post New Thread Reply   
 
Thread Tools Display Modes
Author
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Plugin ID:
969
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    338 
    Plugin Description:
    You can reset your score by typing !resetscore
    Old 07-02-2009 , 20:59   [CS:S] Resetscore
    Reply With Quote #1



    Reset Score



    [IMG]http://img196.**************/img196/4317/about1q.jpg[/IMG]
    Description:

    This 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.




    [IMG]http://img20.**************/img20/2184/settings3.png[/IMG] Cvars:

    - sm_resetscore: 0 - disable / 1 - enable plugin




    [IMG]http://img20.**************/img20/2184/settings3.png[/IMG] Commands:

    Say or SayTeam:

    - !resetscore - reset your score to 0
    - !restartscore -
    reset your score to 0



    .
    Attached Files
    File Type: sp Get Plugin or Get Source (Resetscore.sp - 36158 views - 2.3 KB)
    __________________
    All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx


    Last edited by tuty; 07-08-2009 at 06:15.
    tuty is offline
    Send a message via ICQ to tuty Send a message via AIM to tuty
    fezh
    Veteran Member
    Join Date: Dec 2008
    Location: BANNED
    Old 07-02-2009 , 21:02   Re: [CS:S] Resetscore
    Reply With Quote #2

    Code:
            SetClientFrags( id, 0 );
            SetClientFrags( id, 0 );
            SetClientDeaths( id, 0 );
            SetClientDeaths( id, 0 );
    Why two times? o.o
    __________________
    "There is no knowledge, that is not power"
    fezh is offline
    tuty
    Veteran Member
    Join Date: Jul 2008
    Location: Romania
    Old 07-02-2009 , 21:04   Re: [CS:S] Resetscore
    Reply With Quote #3

    These both NEED to be done twice, otherwise your frags wont be reseted until the next round
    __________________
    All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx

    tuty is offline
    Send a message via ICQ to tuty Send a message via AIM to tuty
    Greyscale
    SourceMod Plugin Approver
    Join Date: Dec 2007
    Location: strYoMommasHouse[you];
    Old 07-03-2009 , 04:16   Re: [CS:S] Resetscore
    Reply With Quote #4

    Quote:
    Originally Posted by tuty View Post
    These both NEED to be done twice, otherwise your frags wont be reseted until the next round
    I've never seen that happen.. weird.
    __________________
    Greyscale is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 07-03-2009 , 11:12   Re: [CSS] Resetscore
    Reply With Quote #5

    Something like this was included in my savescores plugin with using clientprefs menu but I am glad to see this as separate plugin.
    __________________
    For admins: My plugins

    For developers: Colors library
    exvel is offline
    Send a message via ICQ to exvel
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 07-03-2009 , 11:21   Re: [CS:S] Resetscore
    Reply With Quote #6

    Quote:
    Originally Posted by Greyscale View Post
    I've never seen that happen.. weird.
    I think this is because for some reason changes are not networked. The clearest way is to rewrite this default functions with using SetEntData and setting changeState=true.
    __________________
    For admins: My plugins

    For developers: Colors library

    Last edited by exvel; 07-03-2009 at 11:23.
    exvel is offline
    Send a message via ICQ to exvel
    nematu
    Junior Member
    Join Date: Mar 2009
    Old 07-26-2009 , 15:32   Re: [CS:S] Resetscore
    Reply With Quote #7

    this plugin needs announcement
    nematu is offline
    tuty
    Veteran Member
    Join Date: Jul 2008
    Location: Romania
    Old 07-31-2009 , 08:52   Re: [CS:S] Resetscore
    Reply With Quote #8

    Quote:
    Originally Posted by nematu View Post
    this plugin needs announcement
    what do you mean?
    __________________
    All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx

    tuty is offline
    Send a message via ICQ to tuty Send a message via AIM to tuty
    nematu
    Junior Member
    Join Date: Mar 2009
    Old 07-31-2009 , 20:54   Re: [CS:S] Resetscore
    Reply With Quote #9

    Quote:
    Originally Posted by tuty View Post
    what do you mean?
    i mean that at the round start it ciuld announce that you can reset your score and on css server if you are dead it says: "[SM] You can't use this command then dead" and still resets your score
    nematu is offline
    BeG
    Senior Member
    Join Date: Jan 2009
    Location: Germany
    Old 09-29-2009 , 08:40   Re: [CS:S] Resetscore
    Reply With Quote #10

    hi works perfectly for me... but i wish to chance the colours of the chatsau with multiple colours in one string

    i have change it for my liking and recomplie it with the newest complier...

    can any1 say me where is the error?

    Code:
    #include <sourcemod>
    #include <sdktools>
    
    #define PLUGIN_AUTHOR    "tuty"
    #define PLUGIN_VERSION    "1.1"
    #pragma semicolon 1
    
    new Handle:gPluginEnabled = INVALID_HANDLE;
    
    public Plugin:myinfo =
    {
        name = "Resetscore",
        author = PLUGIN_AUTHOR,
        description = "Type !resetscore in chat to reset your score.",
        version = PLUGIN_VERSION,
        url = "www.ligs.us"
    };
    public OnPluginStart()
    {
        RegConsoleCmd( "say", CommandSay );
        RegConsoleCmd( "say_team", CommandSay );
        
        gPluginEnabled = CreateConVar( "sm_resetscore", "1" );
        CreateConVar( "resetscore_version", PLUGIN_VERSION, "Reset Score", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY );
    }
    public Action:CommandSay( id, args )
    {
        decl String:Said[ 128 ];
        GetCmdArgString( Said, sizeof( Said ) - 1 );
        StripQuotes( Said );
        TrimString( Said );
        
        if( StrEqual( Said, "!retry" ) || StrEqual( Said, "!resetmyscore" ) )
        {
            if( GetConVarInt( gPluginEnabled ) == 0 )
            {
                PrintToChat( id, "\x03[SM Resetscore] The plugin is disabled." );
                PrintToConsole( id, "[SM Resetscore] You can't use this command when plugin is disabled!" );
            
                return Plugin_Continue;
            }
        
            if( !IsPlayerAlive( id ) )
            {
                PrintToChat( id, "\x05[\x01ResetMyScore\x05]\x01: \x04Du kannst diesen Befehl nicht benutzen wenn du tot bist." );
                PrintToConsole( id, "[ResetMyScore]: Du kannst diesen Befehl nicht benutzen wenn du tot bist." );
            
                return Plugin_Continue;
            }
    
            if( GetClientDeaths( id ) == 0 && GetClientFrags( id ) == 0 )
            {
                PrintToChat( id, "\x05[\x01ResetMyScore\x05]\x01: \x04Dein Score ist bereits auf 0!" );
                PrintToConsole( id, "[ResetMyScore]: Dein Score ist bereits auf 0!" );
                
                return Plugin_Continue;
            }
                    
            SetClientFrags( id, 0 );
            SetClientDeaths( id, 0 );
        
            decl String:Name[ 32 ];
            GetClientName( id, Name, sizeof( Name ) - 1 );
        
            PrintToChat( id, "\x05[\x01ResetMyScore\x05]\x01: \x04Dein Score wurde erfolgreich zurückgesetzt!" );
            PrintToChatAll( "\x05[\x01ResetMyScore\x05]\x01: \x02% \x01hat seinen Score resettet.", Name );
            PrintToConsole( id, "[ResetMyScore]: Dein Score wurde erfolgreich zurückgesetzt!" );
        }
        
        return Plugin_Continue;
    }     
    stock SetClientFrags( index, frags )
    {
        SetEntProp( index, Prop_Data, "m_iFrags", frags );
        return 1;
    }
    stock SetClientDeaths( index, deaths )
    {
        SetEntProp( index, Prop_Data, "m_iDeaths", deaths );
        return 1;
    }
    it would be nice when someone change the code so that it works with my colours ;D

    thx
    __________________
    !!!SRY FOR BAD ENGLISH!!!
    Our Clanhomepage:

    Visit Us!
    BeG 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 23:02.


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