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

Rotating Door Block Protect


Post New Thread Reply   
 
Thread Tools Display Modes
Author
rodipm
Member
Join Date: Feb 2011
Location: Brazil
Plugin ID:
2612
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Protects Rotating Door Bloock by spamming E
    Old 10-21-2011 , 22:41   Rotating Door Block Protect
    Reply With Quote #1

    Original Idea By Krim

    This plugin was made by Krim, and I liked it. But there was a problem, it didn't "blocked" E spamming, it just forced player suicide. So I remade it changing the way it get if player is E spamming a rotate door, and blocking the "use" command for 5 seconds.

    This is a usefull plugin in jail servers, for those players that blocks the enfermary door by spamming it. It works like that: if some player uses 5 times the "use" comand in a rotating door in an interval of 3 seconds this command is blocked for 5 seconds preventing him from continuing blocking the door.

    Changes from the original:
    - It used OnGameFrame() to check if player is looking at a prop_door_rotating or func_door_rotating while his buttons were "IN_USE" and checked a distance from the player to the entity;
    -> I used a hook in every rotating door or func by "HookSingleEntityOutput" to check how many times the player used it in how many time. Also, it prevents errors that can happen using distance to check if player is actually using the door.

    - It didn't block spamming, it just kills the player who was spamming
    -> I made it block the command "IN_USE" for 5 seconds to the player who was spamming, with this he don't die and stop spamming

    I remade at all the plugin, but the original idea is from Krim

    Thanks to all!

    Thanks!
    Attached Files
    File Type: sp Get Plugin or Get Source (doorblock.sp - 1246 views - 1.4 KB)

    Last edited by rodipm; 10-22-2011 at 17:59.
    rodipm is offline
    Kid_Bandes
    Member
    Join Date: May 2010
    Old 10-31-2011 , 14:11   Re: Rotating Door Block Protect
    Reply With Quote #2

    Nice plugin, nice try, i will try it
    Kid_Bandes is offline
    nikooo777
    AlliedModders Donor
    Join Date: Apr 2010
    Location: Lugano, Switzerland
    Old 12-11-2015 , 17:30   Re: Rotating Door Block Protect
    Reply With Quote #3

    I fixed an issue where the entity invoking Open would be invalid and cause an index out of bounds exception.

    also converted to new syntax.
    Attached Files
    File Type: sp Get Plugin or Get Source (doorblock.sp - 795 views - 2.3 KB)
    __________________
    nikooo777 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 13:33.


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