AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Resetscore (https://forums.alliedmods.net/showthread.php?t=96270)

tuty 07-02-2009 20:59

[CS:S] Resetscore
 
1 Attachment(s)


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



.

fezh 07-02-2009 21:02

Re: [CS:S] Resetscore
 
Code:

        SetClientFrags( id, 0 );
        SetClientFrags( id, 0 );
        SetClientDeaths( id, 0 );
        SetClientDeaths( id, 0 );

Why two times? o.o

tuty 07-02-2009 21:04

Re: [CS:S] Resetscore
 
These both NEED to be done twice, otherwise your frags wont be reseted until the next round

Greyscale 07-03-2009 04:16

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by tuty (Post 862868)
These both NEED to be done twice, otherwise your frags wont be reseted until the next round

I've never seen that happen.. weird.

exvel 07-03-2009 11:12

Re: [CSS] Resetscore
 
Something like this was included in my savescores plugin with using clientprefs menu but I am glad to see this as separate plugin. :)

exvel 07-03-2009 11:21

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by Greyscale (Post 863014)
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.

nematu 07-26-2009 15:32

Re: [CS:S] Resetscore
 
this plugin needs announcement :)

tuty 07-31-2009 08:52

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by nematu (Post 882368)
this plugin needs announcement :)

what do you mean?

nematu 07-31-2009 20:54

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by tuty (Post 886533)
what do you mean?

i mean that at the round start it ciuld announce that you can reset your score :roll: and on css server if you are dead it says: "[SM] You can't use this command then dead" and still resets your score :o

BeG 09-29-2009 08:40

Re: [CS:S] Resetscore
 
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

rautamiekka 11-21-2009 00:22

Re: [CS:S] Resetscore
 
[ Thread bumped for the unanswered post of BeG's ]

Jabiroca 05-02-2010 13:58

Re: [CS:S] Resetscore
 
Hello.

I've tried to change the language of the in-game announcements, on the "resetscore.sp" file, to my language (Portuguese) (like, for example, "[SM] You have just reset your score!" ---> "[SM] Voce resetou seu score!"). But in-game, the language continues in english. Why? How can I change it to my language?

Thanks .

@edit

There's no other file that I can change anything, because there's no file related to resetscore on the translations folder, and the file "resetscore.smx" contains many strange codes and letters that I can't read.

stone newbie 10-29-2010 17:46

Re: [CS:S] Resetscore
 
doesn't work,i installed the plugin -> open server.cfg and past (sm_resetscore 1) -> switch the map -> type in chat (!resetscore) -> the plugin say (Your score is already 0!) -> but the stats don't reset

reset at next round-NO
reset at next map-NO

pls help me

mfg

Bacardi 10-30-2010 00:46

Re: [CS:S] Resetscore
 
1 Attachment(s)
@BeG #10
Code:


        PrintToChatAll( "\x05[\x01ResetMyScore\x05]\x01: \x02% \x01hat seinen Score resettet.", Name );
        PrintToChatAll( "\x05[\x01ResetMyScore\x05]\x01: \x02%s \x01hat seinen Score resettet.", Name );

But have to done different way to get team_name color
Yak's FAQs on Scripting


So try this, I attach it txt file. rename file to *.sp if you want compile it.
I'm not sure would it show right color. If you are CT, can you see player T name as red in chat...

bobbobagan 11-06-2010 10:39

Re: [CS:S] Resetscore
 
PHP Code:

PrintToChatid"\x03[SM Resetscore] You have successfully reseted your score!" );
        
PrintToChatAll"\x03[SM Resetscore] %s has just reseted his score."Name );
        
PrintToConsoleid"[SM Resetscore] You have successfully reseted your score." ); 

Should be:
PHP Code:

PrintToChatid"\x03[SM Resetscore] You have successfully reset your score!" );
        
PrintToChatAll"\x03[SM Resetscore] %s has just reset his score."Name );
        
PrintToConsoleid"[SM Resetscore] You have successfully reset your score." ); 

Reseted isn't an English word :P

DoPe^ 03-04-2011 07:51

Re: [CS:S] Resetscore
 
would be awesome if there also was a admin command so you could reset a players score

like sm_resetplayerscore <#userid | Steamid | name>

Aion 04-19-2011 04:06

Re: [CS:S] Resetscore
 
Can anybody translate this plugin?

rautamiekka 04-20-2011 08:28

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by Aion (Post 1453417)
Can anybody translate this plugin?

First the support for translations should be coded. I'm well capable of quality Finnish translation.

Aion 04-20-2011 15:26

Re: [CS:S] Resetscore
 
2 Attachment(s)
My version of plugin with Bacardi's translation code and file including Russian translation.

ResetScore v1.2
1) Added announce when player connecting to server
2) Added team color announce when player reset his score
3) Change chat command to !rs and /resetscore

Great thanks to Bacardi for translation code and file. :)

Bacardi 04-20-2011 16:16

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by rautamiekka (Post 1454091)
First the support for translations should be coded. I'm well capable of quality Finnish translation.

Harmi vain että OB-päivityksen jälkeen, pelaajat jonka steam asetuksista kieli on joku muu kuin englanti, niillä kaatuu peli aika usein HL2.exe virheeseen. :cry:

*
Too bad that when there came OB-update, players who have set their language to other than english in steam settings, they get most HL2.exe crash.

Don't know have they fix this yeat, or do this problem occurs only finnish language :P
Have to test.

nightrider 04-20-2011 18:29

Re: [CS:S] Resetscore
 
Great idea for a plugin.
We have so many players that disconnect and reconnect in order to reset there score.
This will help.

ygor.almeida 04-21-2011 14:35

Re: [CS:S] Resetscore
 
Hi
Its possible to allow user to reset score while dead instead of only alive ??

I've already see this on some server, and didn't find how they did it !

Aion 04-21-2011 16:22

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by ygor.almeida (Post 1454953)
I've already see this on some server, and didn't find how they did it !

maybe you've seen this plugin: http://addons.eventscripts.com/addon.../CountRemoving
It's very simple and yes, it reset score when player are dead

Bacardi 04-21-2011 16:42

Re: [CS:S] Resetscore
 
I don't get it.
Why people offer Mattie's EventScripts plugins when this forum is for SourceMod plugins and usual, if ask some plugins from SourceMod section then he try find plugin for he SM !!
God dammed.

It's not hard try edit and compile plugin for that.
remove this part from code and voi'la
PHP Code:

        if( !IsPlayerAliveid ) )
        {
            
PrintToChatid"\x03[SM Resetscore] You can't use this command while you are dead." );
            
PrintToConsoleid"[SM Resetscore] Only alive players can use this command." );
        
            return 
Plugin_Continue;
        } 


ygor.almeida 04-21-2011 16:58

Re: [CS:S] Resetscore
 
Thanks Bacardi

I will send (attach) ASAP the Portuguese (Brazilian) Version.

ygor.almeida 04-21-2011 18:23

Re: [CS:S] Resetscore
 
Wow,

It looks like its not working anymore !? - I've tried the original on topic, the one posted with the phrases .... and the one i recompiled.

None of them work. no messages no errors.

I've updated my server 5 minutes ago with all the plugins metamode sourced etc ...

nightrider 04-21-2011 20:07

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by Bacardi (Post 1455027)
It's not hard try edit and compile plugin for that.
remove this part from code and voi'la
PHP Code:

        if( !IsPlayerAliveid ) )
        {
            
PrintToChatid"\x03[SM Resetscore] You can't use this command while you are dead." );
            
PrintToConsoleid"[SM Resetscore] Only alive players can use this command." );
        
            return 
Plugin_Continue;
        } 


Nice thanks Bacardi

Aion 04-22-2011 15:51

Re: [CS:S] Resetscore
 
2 Attachment(s)
ResetScore v1.3

Changes:
- Player can reset score when he is dead

p.S Bacardi, I just wanted to understand what plugin he saw ;)
p.p.S ygor.almeida, try this version and better you restart the server.

DHJ 04-22-2011 16:13

Re: [CS:S] Resetscore
 
Hello can you please add a console command for reset af players score, e.g. sm_resetplayerscore <#userid | Steamid | name> , and if u can and will a console command for reset all scores :).

Thx.

rautamiekka 04-22-2011 16:49

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by Bacardi (Post 1455027)
[...]
PHP Code:

[...] 


Only if -everyone- was AGA you ... What you speak of reminds me of Nazism.

ygor.almeida 04-22-2011 20:05

Re: [CS:S] Resetscore
 
It worked perfectly, thanks.

lokok 06-13-2011 10:21

Re: [CS:S] Resetscore
 
Quote:

Originally Posted by Aion (Post 1455618)
ResetScore v1.3

Changes:
- Player can reset score when he is dead

p.S Bacardi, I just wanted to understand what plugin he saw ;)
p.p.S ygor.almeida, try this version and better you restart the server.

THANK YOU :D

nikedu45 06-16-2011 09:25

Re: [CS:S] Resetscore
 
Hello, instead of displaying the message in the chat resetscore there would be no way to put it into the top left?

Aion 06-16-2011 13:00

Re: [CS:S] Resetscore
 
nikedu45
Advertisements 0.5.5 - with autoexec file for top left message
Advertisements 0.5.6 - without autoexec file, but with supporting olive color in messages

And in resetrank.sp version 1.3 delete following lines with code (open in notepad), save and recompile:
PHP Code:

public OnClientPutInServer(client)
{
    
CreateTimer(15.0TimerAnnounceclient);
}
public 
Action:TimerAnnounce(Handle:timerany:client)
{
    if(
IsClientInGame(client))
    {
        
PrintToChat(client"\x04[ResetScore]\x01 %t""announce_chat");
    }



nikedu45 06-17-2011 08:45

Re: [CS:S] Resetscore
 
Thank you for your answer!
But I speak of the sentence when the player achieve resetscore.
Quote:

PrintToChatAll( "\x03[SM Resetscore] %s has just reseted his score.", Name );
There would not be a command like "PrintToChatAll" to display the text at the top left?

Aion 06-17-2011 10:35

Re: [CS:S] Resetscore
 
nikedu45
Heh, if it will be so simple there wouldn't be a separate plugin for this.

Use my previous advice what I post. It's simply and more convenient :)

NeTBuS 09-27-2011 11:53

Re: [CS:S] Resetscore
 
how to install?

altex 10-22-2011 07:55

Unofficial release 1.1.otstrel.2
 
1 Attachment(s)
Unofficial release 1.1.otstrel.2
* now dead players can reset score too
* added colors, thanks to EXVEL (http://forums.alliedmods.net/showthread.php?t=96831)
* added translations
* added translation to russian
* added !rs alias

nightrider 10-22-2011 22:38

Re: [CS:S] Resetscore
 
Thank you altex

Lucky_luck 10-23-2011 08:17

Re: Unofficial release 1.1.otstrel.2
 
Quote:

Originally Posted by altex (Post 1581070)
Unofficial release 1.1.otstrel.2
* now dead players can reset score too
* added colors, thanks to EXVEL (http://forums.alliedmods.net/showthread.php?t=96831)
* added translations
* added translation to russian
* added !rs alias

Thx :) working fine!


All times are GMT -4. The time now is 18:21.

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