Overview
This plugins allows admins with the Slay flag to give anyone on the server one of 3 options: Always Crit, Never Crit and normal. This command takes precedence over the server wide crit management unless it is set to normal crits.
This plugin can also override all crit calculations on the server in one of 3 following modes: Everyone Always Crits, Everyone Never Crits, and Custom Crit Rates. The server wide override must be enabled for it to take effect.
The Custom Crit Rates are determined by 3 CVARs for primary weapons, secondary weapons and melee weapons. (listed below). the value of these cvars is the percent chance that a crit will happen with the given weapon slot. so if sm_critsmanager_crit_Primary is set to 5, there will be a flat 5% chance of a crit occurring with a primary weapon (this includes the sniper rifle).
comes with full admin menu support, it adds an entry to player commands and server commands
CVARs
sm_critsmanager_version - contains the plguin version number
sm_critsmanager_crit_Primary - <1 - 100> Default: 2 - chance of a crit with a Primaryweapon
sm_critsmanager_crit_Secondary - <1 - 100> Default: 3 - chance of a crit with a secondary weapon
sm_critsmanager_crit_Melee - <1 - 100> Default: 5 - chance of a crit with a melee weapon
Zee Bugz
- sniper rifle can crit on no scope (normally it can't as far as i know).
- huntsman is not affected (only crits on headshot or mini crit with jarate).
Todo
- more advanced crit calculation (to take in account amount of damage done ect)
This is one of a few plugins i'm going to post including an unlimited ammo plugin and a general utilities plugin. These are the first plugins i posted up here so please be gentle
.
also i commented pretty much every major step to help other programmers see what i did so they can copy/modify it. feel free to use whatever you find. hopefully i have a few good examples of things i wish i knew when i first started learning sourcepawn.