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

Efficiency & Accuracy Modification


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
feren02
Senior Member
Join Date: Mar 2012
Old 03-26-2021 , 03:58   Efficiency & Accuracy Modification
Reply With Quote #1

Hello everyone! Hope you are coping with the pandemic.

Can anyone help me for an Auto Disconnect Plugin when players has 50% to 100% Efficiency Hitting and 20% to 0% Accuracy Hitting that can be seen in /top15 via classic StatsX plugin?

Efficiency and Accuracy in my uploaded photo via /top15:
https://ibb.co/CvFH4vk

**The Idea**
- The plugin disconnects a Player when there stats has the values above.
- The plugin disconnects Players with client echo message.
- When a player is disconnected, the Eff. & Acc. stats will be reset
- When the disconnected player connects again, his Eff. & Acc is ZERO

(So what will happen, when they login again, their EFF. and ACC. is back to zero. In the event when server computed AGAIN their EFF to be 50% or greater with corresponding 20% ACC. and lower, they will be disconnected again and EFF + ACC is reset once they connect to the server.)


Thank you and looking forward! Blessed 2021! Hello everyone! Hope you are coping with the pandemic.

This scenario are voted by players in my server. They approved it and want us to implement this strategy. Please see .sma below:


***TRIED TO TWEAK STATSX.SMA, NOT SURE ON WHAT I AM DOING***

PHP Code:
// Stats formulas
Float:accuracyizStats[8] ) {
    if( !
izStats[STATS_SHOTS] ) return ( 0.0 );
    return ( 
100.0 floatizStats[STATS_HITS] ) / floatizStats[STATS_SHOTS] ) );

=========>if (
izStats [8] = 20% )
=========>
server_cmd(disconnect)
=========>
client_cmd(id"echo ^"Please cool-down from your killing-spree!^"")
=========>
client_cmd(id"echo ^"PM any admin for any complain about this.^"")
=========>
resetstats
}

Float:effecizStats[8] ) {
    if( !
izStats[STATS_KILLS] ) return ( 0.0 );
    return ( 
100.0 floatizStats[STATS_KILLS] ) / floatizStats[STATS_KILLS] + izStats[STATS_DEATHS] ) );

=========>if (
izStats [8] = 50% )
=========>
server_cmd(disconnect)
=========>
client_cmd(id"echo ^"Please cool-down from your killing-spree!^"")
=========>
client_cmd(id"echo ^"PM any admin for any complain about this.^"")
=========>
resetstats


Thank you and looking forward! Blessed 2021!
feren02 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-26-2021 , 23:03   Re: Efficiency & Accuracy Modification
Reply With Quote #2

If you are ok to not use the native stats then this is doable. The plugin itself would track efficiency/accuracy. This means, the stats would be different that what /top15 etc reports, since it's not possible to reset stats (for a single player) with the native stats system.
__________________

Last edited by Bugsy; 03-26-2021 at 23:46.
Bugsy is offline
feren02
Senior Member
Join Date: Mar 2012
Old 03-26-2021 , 23:49   Re: Efficiency & Accuracy Modification
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
If you are ok to not use the native stats then this is doable. The plugin itself would track efficiency/accuracy. This means, the stats would be different that what /top15 etc reports, since it's not possible to reset stats with the native stats system.
If I got it right, top15 will be disabled? We will be using a different StatsX plugin?

The default StatsX plugin is accurate in terms of Eff. and Acc. upon my observation, the legitimate players in my server does not register 50% and up Eff and 20% below Acc. guaranteed. We can also make the "disconnection" of players every 3 rounds for consideration to everybody.

*If ever we will be using another plugin or native stats, will it compute Eff and Acc Percentage like the original and default StatsX?

I am open to any suggestion since I am newbie in this field, really appreciate every response.


Thank you and looking forward.
feren02 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-26-2021 , 23:54   Re: Efficiency & Accuracy Modification
Reply With Quote #4

The plugin would have its own stats -- meaning no other plugins would recognize it, not even native AMX-X stats.
__________________
Bugsy is offline
feren02
Senior Member
Join Date: Mar 2012
Old 03-26-2021 , 23:59   Re: Efficiency & Accuracy Modification
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
The plugin would have its own stats -- meaning no other plugins would recognize it, not even native AMX-X stats.
How does it compute? Same as default StatsX? I am willing and open for new things.
feren02 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-27-2021 , 00:29   Re: Efficiency & Accuracy Modification
Reply With Quote #6

It computes exactly as you want it to.
__________________
Bugsy is offline
feren02
Senior Member
Join Date: Mar 2012
Old 03-27-2021 , 02:07   Re: Efficiency & Accuracy Modification
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
It computes exactly as you want it to.
How will we do it then? What do I need to do?
feren02 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-27-2021 , 10:58   Re: Efficiency & Accuracy Modification
Reply With Quote #8

All I am saying is the new stats plugin would be on its own. Native /rank /top15 can show different values for players, so my suggestion would be to disable native stats.

Example:

Player A gets 55 kills, 32 deaths
Player A stats are reset in new stats plugin
New stats plugin now has player A with 0 kills, 0 deaths

While native stats would still reflect 55 kills, 32 deaths
__________________
Bugsy is offline
feren02
Senior Member
Join Date: Mar 2012
Old 03-27-2021 , 19:31   Re: Efficiency & Accuracy Modification
Reply With Quote #9

Quote:
Originally Posted by Bugsy View Post
All I am saying is the new stats plugin would be on its own. Native /rank /top15 can show different values for players, so my suggestion would be to disable native stats.

Example:

Player A gets 55 kills, 32 deaths
Player A stats are reset in new stats plugin
New stats plugin now has player A with 0 kills, 0 deaths

While native stats would still reflect 55 kills, 32 deaths
Hi this is okay, as long as the Eff and Acc of player in total
(the one reflects in /rank, /top15 and /rankstats) is the basis and also reset when a player reaches 50% and up Eff , and 20% below Acc.

Need help on the scripting side.


Looking forward!
feren02 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-27-2021 , 21:56   Re: Efficiency & Accuracy Modification
Reply With Quote #10

Quote:
Originally Posted by feren02 View Post
Hi this is okay, as long as the Eff and Acc of player in total
(the one reflects in /rank, /top15 and /rankstats) is the basis and also reset when a player reaches 50% and up Eff , and 20% below Acc.

Need help on the scripting side.


Looking forward!
What I am trying to explain to you is /rank, /top15, and /rankstats will be using an entirely different set of stats data.

If I create this plugin, it will look at only, say "newstats.dat" for all stats, not "csstats.dat" that native stats uses. It will be entirely disconnected from AMX-X stats.

If you never reset/delete a players stats, then the numbers should be the same. But if you delete a players info from "newstats", native csstats.dat will still hold the players data since day one, and it would reflect this if they use rank, top15, etc.
__________________

Last edited by Bugsy; 03-27-2021 at 21:57.
Bugsy is offline
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 07:21.


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