Raised This Month: $ Target: $400
 0% 

Anti-Doorslam / Doorblock Script


Post New Thread Reply   
 
Thread Tools Display Modes
Author
wmchris
Senior Member
Join Date: Sep 2008
Plugin ID:
556
Plugin Version:
1.1
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Makes it impossible to Block Doors by Using em all the time
    Old 09-29-2008 , 10:08   Anti-Doorslam / Doorblock Script
    Reply With Quote #1

    Makes it impossible to Block Doors by pressing USE all the time.
    On USE Spam the player will be slayed within 10 seconds.

    Update: made the changes which SAMURAI16 mentioned.
    Attached Files
    File Type: sp Get Plugin or Get Source (e-spam.sp - 2417 views - 3.8 KB)

    Last edited by wmchris; 10-03-2008 at 17:05.
    wmchris is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 09-29-2008 , 16:32   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #2

    is it possible only to block "use" command instead of slay?
    __________________
    For admins: My plugins

    For developers: Colors library
    exvel is offline
    Send a message via ICQ to exvel
    SAMURAI16
    BANNED
    Join Date: Sep 2006
    Old 09-29-2008 , 16:40   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #3

    Some tips:
    1) declare 'new MaxPlayers' as global and in OnPluginStart() add MaxPlayers = GetMaxClients()
    2) if(Ent != -1 && Ent > 0 && Ent > GetMaxClients())
    change into if(IsValidEntity(Ent))
    3) if(IsClientConnected(Client) && IsClientInGame(Client))
    a check of IsPlayerAlive would be good here
    4) decl String:ClassName[255];
    Why are you creating this variabile so large ? [20] is enough
    In a forward like OnGameFrame() you should use optimized code

    Finally, i don't think those global variables need to be 'static'

    @exvel : yea it's possible ;
    you'll have to set client buttons &= ~IN_USE

    Last edited by SAMURAI16; 09-29-2008 at 16:43.
    SAMURAI16 is offline
    Send a message via MSN to SAMURAI16
    wmchris
    Senior Member
    Join Date: Sep 2008
    Old 10-03-2008 , 12:32   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #4

    i looked for a function like setclientButtons - but i were not able to find one.Thats why i implemented it as SLAY. If you can tell me the exact code how to overwrite the key pressing i will change it immediately
    wmchris is offline
    SAMURAI16
    BANNED
    Join Date: Sep 2006
    Old 10-03-2008 , 12:57   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #5

    See this example
    http://forums.alliedmods.net/showpos...8&postcount=11
    SAMURAI16 is offline
    Send a message via MSN to SAMURAI16
    wmchris
    Senior Member
    Join Date: Sep 2008
    Old 10-03-2008 , 16:50   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #6

    I tired the modification but it doesnt work. I added the script in this posting. Whatever i do it seems like its doing the oppsite effect. like a doubleclick ;)
    Attached Files
    File Type: sp Get Plugin or Get Source (e-spam.sp - 1381 views - 3.4 KB)

    Last edited by wmchris; 10-03-2008 at 17:05.
    wmchris is offline
    SAMURAI16
    BANNED
    Join Date: Sep 2006
    Old 10-03-2008 , 17:36   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #7

    Well with sourcemod you can't set client buttons correctly yet. Wait for next dukehacks release. Untill then add slay part again
    SAMURAI16 is offline
    Send a message via MSN to SAMURAI16
    wmchris
    Senior Member
    Join Date: Sep 2008
    Old 10-04-2008 , 06:53   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #8

    the problem with dukehacks is, that the new version will only work with the orangebox version afaik. :/
    wmchris is offline
    talpa
    Member
    Join Date: Jun 2007
    Old 10-08-2008 , 16:43   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #9

    is possible make a plugin can exec config.cfg at round start on client , for disable all F*** script , plz i hope some person help me
    talpa is offline
    violentcrimes
    Senior Member
    Join Date: Nov 2006
    Old 12-09-2008 , 04:09   Re: Anti-Doorslam / Doorblock Script
    Reply With Quote #10

    Anyway to make it to where it kicks the person instead of slay them?
    __________________
    violentcrimes 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 11:08.


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