[Any] Admin HP Regeneration
2 Attachment(s)
Description:
A little plugin to let admins with F/Slay flag regenerate their health. This is only tested in Counter-Strike: Source. CVAR list: adminregen_version - Plugin version, do not change this. adminregen_maxhp "100" - Maximum HP you can have after regenerating. adminregen_health "2" - Amount of health to regenerate. adminregen_time "2.0" - Time (in seconds) between each heal. You can edit the values of every ConVar in cfg/sourcemod/plugin.adminregen.cfg. Command list: sm_adminregen - activates the regeneration Changelog: Quote:
Download adminregen_sm_1.8.smx or adminregen_sm_1.6.smx and put it into your addons/sourcemod/plugins/ folder. |
Re: [Any] Admin HP Regeneration
Nice idea to extract that stuff into a simple plugin! Few things:
Don't close the timer handle in the timer callback! return Plugin_Stop if you want to stop the timer there! I don't see the point of the second timer. You can check the maxhp in RegenTimer too. You should check the client in RegenTimer against being 0 and return Plugin_Stop if that's the case. GetClientFromSerial returns 0 if the client disconnected in the meantime. Also you should store the timer handle of the timer you create per admin in AdminRegenCmd and don't start another timer, if the admin already typed !adminregen and a timer is already running for him. You can also check the rpg plugins how they do it. |
Re: [Any] Admin HP Regeneration
|
Re: [Any] Admin HP Regeneration
Quote:
Quote:
|
Re: [Any] Admin HP Regeneration
Quote:
|
Re: [Any] Admin HP Regeneration
not working in cs:go :(
|
Re: [Any] Admin HP Regeneration
09-20-2015 (v1.1)
*Updated to new syntax *A few small things are added |
Re: [Any] Admin HP Regeneration
09-25-2015 (v1.1.1)
*Checking if client is 0. |
Re: [Any] Admin HP Regeneration
Plugin also updated for SM 1.6.
|
Re: [Any] Admin HP Regeneration
Can anyone fix this plugin
Entering the sm_adminregen command once will increase 2HP, quickly entering it three times will double the HP(4) and so on |
All times are GMT -4. The time now is 17:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.