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

Block Self Kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MasterXykon
BANNED
Join Date: Apr 2012
Plugin ID:
2924
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Unapprover:
    Reason for Unapproving:
    https://forums.alliedmods.net/showthread.php?t=163257
    Old 04-22-2012 , 17:08   Block Self Kill
    Reply With Quote #1

    This is my first working plugin, I hope it's good enough for you guys.

    Cvars:
    block_selfkill 0/1
    block_selfexplode 0/1

    Games tested:
    Team Fortress 2

    Notes:
    These Cvars can only be used on the server, clients can't use them.

    Coming Soon(when I get better at sourcepawn):
    A plugin that allows you to disable/enable self killing on a specific person.
    Attached Files
    File Type: smx BlockSelfKill.smx (2.2 KB, 318 views)
    File Type: sp Get Plugin or Get Source (BlockSelfKill.sp - 744 views - 1.7 KB)
    MasterXykon is offline
    xomp
    BANNED
    Join Date: Jul 2008
    Old 04-22-2012 , 19:19   Re: Block Self Kill
    Reply With Quote #2

    So this blocks those annoying players that try and explode/kill via keybinds just to troll? Good job sir!
    xomp is offline
    Send a message via Skype™ to xomp
    Impact123
    Veteran Member
    Join Date: Oct 2011
    Location: Germany
    Old 04-22-2012 , 20:02   Re: Block Self Kill
    Reply With Quote #3

    4 Things i have to say about your plugin.
    • Your defines are useless because the're never used
    • CreateConvar returns a Handle, not an integer
    • Use GetConVarBool instead of GetConVarInt for true/false checks
    • Use an properly working "myPlugin" section
    This type of plugin already was developed and unapproved because here you can find a more flexible plugin which can do the same.
    Hope my critique helps.

    Yours sincerely
    Impact
    __________________

    Last edited by Impact123; 04-22-2012 at 20:02.
    Impact123 is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 04-22-2012 , 22:24   Re: Block Self Kill
    Reply With Quote #4

    Additionally, blocking the 'kill' and 'explode' commands prevents ForcePlayerSuicide (i.e. sm_slay) from working.
    __________________
    Dr. McKay is offline
    SHAREN
    Senior Member
    Join Date: Dec 2011
    Old 04-23-2012 , 02:25   Re: Block Self Kill
    Reply With Quote #5

    Good.
    To make the kill command is reset only after some time. For example: I wrote a kill, and I'll die just after 5 seconds.
    At the jail server Prevents the kill command is stupid
    translate.google.ru
    SHAREN is offline
    Send a message via Skype™ to SHAREN
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 04-23-2012 , 02:48   Re: Block Self Kill
    Reply With Quote #6

    Quote:
    Originally Posted by Dr. McKay View Post
    Additionally, blocking the 'kill' and 'explode' commands prevents ForcePlayerSuicide (i.e. sm_slay) from working.
    Not true... ForcePlayerSuicide work definitely, you even can't block this.

    But some plugins what use wrong method to suicide player like sending FakeClientCommand or ClientCommand "kill" to player.

    anyway... there already few plugins what prevent player suiciding and block few more client commands than this
    Bacardi is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 04-23-2012 , 05:14   Re: Block Self Kill
    Reply With Quote #7

    Quote:
    Originally Posted by Bacardi View Post
    Not true... ForcePlayerSuicide work definitely, you even can't block this.

    But some plugins what use wrong method to suicide player like sending FakeClientCommand or ClientCommand "kill" to player.

    anyway... there already few plugins what prevent player suiciding and block few more client commands than this
    From what I know, this was brought up in another thread in the Scripting section, and the exact thing that Dr. McKay said was happening, so I'm not really sure if that's been fixed or the problem didn't exist at all, but why not test?
    minimoney1 is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 04-23-2012 , 08:06   Re: Block Self Kill
    Reply With Quote #8

    McKay is correct; blocking "kill" seems to prevent ForcePlayerSuicide. At least as far as CS:S is concerned, I can't vouch for other games.
    __________________
    thetwistedpanda is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 04-23-2012 , 08:28   Re: Block Self Kill
    Reply With Quote #9

    Quote:
    Originally Posted by thetwistedpanda View Post
    McKay is correct; blocking "kill" seems to prevent ForcePlayerSuicide. At least as far as CS:S is concerned, I can't vouch for other games.
    Same in TF2.
    __________________
    Dr. McKay is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 04-23-2012 , 09:01   Re: Block Self Kill
    Reply With Quote #10

    https://forums.alliedmods.net/showthread.php?t=180313

    Looking at your source, it appears that you're using command listeners rather than RegConsoleCmd. It might work this way, according to that thread above. Someone want to test it? I can't atm.

    Also, don't attach an smx if it compiles on the forums (i.e. no custom includes).
    __________________
    Dr. McKay is offline
    Reply



    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 21:22.


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