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

[Any] Admin HP Regeneration


Post New Thread Reply   
 
Thread Tools Display Modes
Author
joac1144
Senior Member
Join Date: Dec 2012
Location: Copenhagen, Denmark
Plugin ID:
4127
Plugin Version:
1.1.1
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Let admins regenerate their health with a command.
    Old 03-08-2014 , 09:21   [Any] Admin HP Regeneration
    Reply With Quote #1

    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:
    03-08-2014 (v1.0)

    *Plugin released

    09-20-2015 (v1.1)

    *Updated to new syntax
    *A few small things are added

    *09-25-2015 (v1.1.1)

    *Checking if client is 0
    Installation:
    Download adminregen_sm_1.8.smx or adminregen_sm_1.6.smx and put it into your addons/sourcemod/plugins/ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (adminregen_sm_1.8.sp - 1722 views - 2.6 KB)
    File Type: sp Get Plugin or Get Source (adminregen_sm_1.6.sp - 1144 views - 2.5 KB)
    __________________

    Last edited by joac1144; 09-25-2015 at 10:45. Reason: Added version for SM 1.6
    joac1144 is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 03-08-2014 , 09:50   Re: [Any] Admin HP Regeneration
    Reply With Quote #2

    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.
    __________________
    Peace-Maker is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 03-08-2014 , 23:37   Re: [Any] Admin HP Regeneration
    Reply With Quote #3

    Hmmm
    __________________
    retired
    shavit is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 03-09-2014 , 04:55   Re: [Any] Admin HP Regeneration
    Reply With Quote #4

    Quote:
    Originally Posted by Peace-Maker View Post
    Nice idea to extract that stuff into a simple plugin!
    Thanks

    Quote:
    Originally Posted by Peace-Maker View Post
    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
    I will try that soon
    __________________
    joac1144 is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 03-09-2014 , 05:00   Re: [Any] Admin HP Regeneration
    Reply With Quote #5

    Quote:
    Originally Posted by shavit View Post
    That plugin isn't the same as mine; the other HP Regeneration plugins isn't activated by a command, which mine is.
    __________________
    joac1144 is offline
    asdfxD
    Veteran Member
    Join Date: Apr 2011
    Old 12-27-2014 , 16:52   Re: [Any] Admin HP Regeneration
    Reply With Quote #6

    not working in cs:go
    asdfxD is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 09-20-2015 , 10:03   Re: [Any] Admin HP Regeneration
    Reply With Quote #7

    09-20-2015 (v1.1)

    *Updated to new syntax
    *A few small things are added
    __________________
    joac1144 is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 09-25-2015 , 10:23   Re: [Any] Admin HP Regeneration
    Reply With Quote #8

    09-25-2015 (v1.1.1)

    *Checking if client is 0.
    __________________
    joac1144 is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 09-25-2015 , 10:46   Re: [Any] Admin HP Regeneration
    Reply With Quote #9

    Plugin also updated for SM 1.6.
    __________________
    joac1144 is offline
    phoenix0001
    Senior Member
    Join Date: Apr 2010
    Location: China
    Old 08-16-2022 , 07:00   Re: [Any] Admin HP Regeneration
    Reply With Quote #10

    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
    __________________
    I like this BBS sharing of spirit

    I come from China, my English is poor
    phoenix0001 is offline
    Reply


    Thread Tools
    Display Modes

    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 04:55.


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