Raised This Month: $51 Target: $400
 12% 

AutoResetScore: Resets to 0 if KILLS minus DEATH >= X


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Event Related        Approver:   devicenull (200)
fufu5000
Junior Member
Join Date: Apr 2004
Location: Cologne, Germany
Old 11-21-2005 , 13:09   AutoResetScore: Resets to 0 if KILLS minus DEATH >= X
Reply With Quote #1

Description: This little plugin is quite handy if u have "highskiller" players which are only going for Frags and not for TeamPlay.

Code:
// This Plugin resets the Score of Players when KILLS-DEATH >= 30. Part of the Source is from AutoKick made by V3X.  #include <amxmodx> #include <cstrike> #include <fun> public plugin_init() {     // ..     register_plugin("AutoResetScore","1.0","[TLR]Cromwell")     register_event("ResetHUD","newRound","be")     register_cvar("frags_limit","30") } public newRound(id) {     if((get_user_frags(id))-(cs_get_user_deaths(id)) >= get_cvar_num("frags_limit")) {     set_user_frags(id,0)     cs_set_user_deaths(id,0)     client_print(id, print_chat, "Your SCORE (KILLS-DEATHS) is more than 30. Your KILLS/DEATHS are resetted to ZERO")     }     return PLUGIN_HANDLED }





What it does: Automaticly (!) resets the KILLS and DEATHS to ZERO in the next Round if KILLS minus DEATH reaches 30+ and displays a little message.

You can change the FraglimitValue here:
Code:
register_cvar("frags_limit","30")

USAGE: Just put "autoresetscore.amxx" in your Plugins.ini

Part of the Source is from AutoKick made by V3X. Look there:

http://forums.alliedmods.net/showthr...p?t=12389+kick

However I wanted not to kick them, but to reset the Score so they can stay on the Server and don't have to reconnect. This is useful if the Server is quite popular and reconnecting is almost impossible.

I searched the Forum for a similiar Plugin but didn't find any, so I hope there isn't such a Plugin out there. If so, I apologize.

What to do:

1. OK, the Hud message is lightly overseen, so maybe a centered Message will do better, but if another Message intervenes , it vanishes too fast...
2. Maybe a cool SoundClip ( e.g Hot Chocolates "Every 1's a winner babe, but u don't" )
3. Trigger funny events at specified Scores... (That would lead the Plugin in a different direction, but why not make another out of it)
4. Make your suggestions....

greetz fufu5000 aka [ganya-gang]*CromWell*
Attached Files
File Type: sma Get Plugin or Get Source (autoresetscore.sma - 2931 views - 686 Bytes)
__________________
www.gamez-pool.de ---> Look there to see if my FunServer is online!
www.flug-pool.de ---> Cheap flights,hotels,vacations and more ...

Last edited by fufu5000; 05-29-2007 at 07:19.
fufu5000 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-21-2005 , 17:04  
Reply With Quote #2

Hmm.. Wouldn't it be better if you made a cvar called deaths_limit and did this?
Code:
new frags = get_user_frags(id) new deaths = cs_get_user_deaths(id) new fraglimit = get_cvar_num("frags_limit") new deathlimit = get_cvar_num("deaths_limit") if(frags >= fraglimit || deaths >= deathlimit) {
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
fufu5000
Junior Member
Join Date: Apr 2004
Location: Cologne, Germany
Old 11-21-2005 , 19:11  
Reply With Quote #3

I think I should rename the cvar "frags_limit" to "score_limit", because frags_limit is confusing and not correct.
As you see the score is calculated by the difference between Kills and Death, so e.g. if you achieve your 31th Frag and before got killed 1 time then you have a score of 30 and your Frags and your Deaths are both resetted to Zero.

Maybe like this:


Code:
// This Plugin resets the Score of Players when KILLS-DEATH >= 30. Part of the Source is from AutoKick made by V3X.  #include <amxmodx> #include <cstrike> #include <fun> public plugin_init() {     // ..     register_plugin("AutoResetScore","1.0","[TLR]Cromwell")     register_event("ResetHUD","newRound","be")     register_cvar("score_limit","30") } public newRound(id) {     if((get_user_frags(id))-(cs_get_user_deaths(id)) >= get_cvar_num("score_limit")) {     set_user_frags(id,0)     cs_set_user_deaths(id,0)     client_print(id, print_chat, "Your SCORE (KILLS-DEATHS) is more than 30. Your KILLS and DEATHS are resetted to ZERO")     }     return PLUGIN_HANDLED }

Ok, I go to bed, I will upload the changed plugin tomorrow
__________________
www.gamez-pool.de ---> Look there to see if my FunServer is online!
www.flug-pool.de ---> Cheap flights,hotels,vacations and more ...

Last edited by fufu5000; 05-29-2007 at 07:20.
fufu5000 is offline
d4rkst4r
Senior Member
Join Date: Jul 2005
Old 11-21-2005 , 23:29  
Reply With Quote #4

nice avatar v3x
d4rkst4r is offline
d4rkst4r
Senior Member
Join Date: Jul 2005
Old 11-21-2005 , 23:30  
Reply With Quote #5

nice avatar v3x
d4rkst4r is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 11-22-2005 , 03:02  
Reply With Quote #6

Lol.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Reply



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 18:09.


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