Nice idea and plugin
Just some minor things i noticed:
- For consistency:
The topics name "[L4D2] Ghost HP restore", the plugins filename "L4D2_Ghost_HP_Regen" and the cvars "l4d2_ghost_HP_regen_enabled" and "l4d2_Ghost_HP_regen_version" have different usage of capitals and restore/regen.
My suggestion is for topic and plugin name (the name in the plugin info, you don't need underscores there) use "[L4D2] Ghost HP Regen" and for filename, config name and cvars just lowercase like "l4d2_ghost_hp_regen...".
- You might have forgot to check the cvar descriptions again
Could be something like "Disable/Enable the '[L4D2] Ghost HP Regen' plugin" and "Version of the '[L4D2] Ghost HP Regen' plugin".
- You can get the handle to the cvar directly from "CreateConVar()", so you don't need the "FindConVar()" there:
Code:
H_GhostHPRegenEnabled = CreateConVar("l4d2_ghost_HP_regen_enabled"...);
- Not sure if you do, but if you want the config file to have the same name as the plugin, just use:
Code:
AutoExecConfig(true, "l4d2_ghost_hp_regen");
- If you want the plugin to only work in L4D2, you could add a game check at the start of "OnPluginStart()" like:
Code:
public OnPluginStart()
{
decl String:sGame[16];
GetGameFolderName(sGame, sizeof(sGame));
if (!StrEqual(sGame, "left4dead2", false))
{
SetFailState("Plugin supports 'Left 4 Dead 2' only.");
}
CreateConVar...
But as i said it's just minor things, nothing affecting the functionality of the plugin. Good job, thanks for sharing