https://github.com/gamemann/fps-threshold
Creates a forward for when the average server FPS goes under a threshold.
https://github.com/gamemann/fps-threshold
css fps performance sourcemod sourcemod-plugin sourcemod-plugins sourcepawn threshold
Last synced: 10 months ago
JSON representation
Creates a forward for when the average server FPS goes under a threshold.
- Host: GitHub
- URL: https://github.com/gamemann/fps-threshold
- Owner: gamemann
- Created: 2021-03-05T00:35:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-07T20:07:40.000Z (over 4 years ago)
- Last Synced: 2025-02-28T12:30:30.858Z (11 months ago)
- Topics: css, fps, performance, sourcemod, sourcemod-plugin, sourcemod-plugins, sourcepawn, threshold
- Language: SourcePawn
- Homepage: https://moddingcommunity.com/
- Size: 15.6 KB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FPS Threshold
## Description
A simple SourceMod plugin that calculates the server FPS every second and when it goes under a certain threshold based off of the average FPS in *x* seconds, offers a forward on detection,
I've made this in hopes to mitigate damage on [Elite Hunterz](https://forum.elite-hunterz.com/)'s Zombie Hunting server from poor performance issues when multiple players are stuck inside of each other.
## ConVars
* **sm_fpsth_avgtime** - Calculate the average FPS for *x* seconds (*x* representing the CVar value).
* **sm_fpsth_threshold** - If the average FPS goes below this average, call `FPSTH_OnDetect()` forward.
## Forwards
This plugin comes with one forward to allow other plugins to interact. The forward may be found below.
```C
/**
* Called when the server is caught going under the average FPS threshold.
*
* @param avgfps The average FPS detected.
* @param curfps The current FPS detected.
*
* @return void
*/
forward void FPSTH_OnDetect(float avgfps, int curfps);
```
## Useful Plugins
* [Force Noblock](https://github.com/gamemann/FPS-Threshold-Noblock) - Forces Noblock on all players when average FPS goes under threshold.
## Credits
* [Christian Deacon](https://github.com/gamemann)