Raised This Month: $168 Target: $400
 42% 

[TF2] Destroy Engineer Buildings


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
2558
Plugin Version:
1.2.0
Plugin Category:
Admin Commands
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    402 
    Plugin Description:
    Destroy or remove an engineer's buildings
    Old 09-12-2011 , 07:48   [TF2] Destroy Engineer Buildings
    Reply With Quote #1

    [TF2] Destroy Engineer Buildings
    Version 1.2.0



    Description:
    Written as a replacement for bl4nk's plugin since he doesn't appear to be supporting his, this allows admins to destroy or remove players' buildings.
    The 'clean remove' option removes the building without spawning metal.

    Commands:
    • sm_destroy <target player> [target building] [clean removal 0/1]
      • Target building can be sentry, dispenser, (teleport) entrance, (teleport) exit, tele (both entrance+exit), all (default), or last* (last built object).
      • If using clean removal "1", buildings will just vanish, rather then blowing up and producing metal.

        *Not implemented yet
    Cvars:
    • sm_destroy_version
      • Plugin version

    Install Instructions:
    1. Place DestroyBuildings.smx into your addons/sourcemod/plugins/ folder.

    ToDo:
    • Finish adding support for "last" option
    • Menus
    • Logging

    Version History:
    • V1.0.0
      • Initial Release
    • V1.2.0
      • Support for targeting last-built building added.
      • Fixes an issue with the if else stack

    Total downloads as prior to last edit: 21

    Attached Files
    File Type: sp Get Plugin or Get Source (DestroyBuildings.sp - 3098 views - 5.7 KB)
    __________________

    Last edited by DarthNinja; 01-31-2012 at 03:12.
    DarthNinja is offline
    eraserhead
    Veteran Member
    Join Date: Nov 2009
    Old 09-12-2011 , 09:34   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #2

    Excellent! Implementing this....

    So this version doesn't support the admin menu?
    __________________

    Last edited by eraserhead; 09-12-2011 at 09:41.
    eraserhead is offline
    Send a message via Skype™ to eraserhead
    danielmyst777
    SourceMod Donor
    Join Date: Aug 2010
    Location: Virginia
    Old 09-12-2011 , 18:12   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #3

    I tried destroying buildings but it says the object specified is invalid. Only one that works is "all".
    __________________
    danielmyst777 is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 09-12-2011 , 19:44   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #4

    Quote:
    Originally Posted by eraserhead View Post
    Excellent! Implementing this....

    So this version doesn't support the admin menu?
    If you mean the custom admin menu from bl4nk's thread, that should still work. It won't have the extra features this plugin has though (clean removal, etc).

    Quote:
    Originally Posted by danielmyst777 View Post
    I tried destroying buildings but it says the object specified is invalid. Only one that works is "all".
    If you're seeing the error "Invalid building specified, please use sentry, dispenser, tele, entrance, exit, last, or all", maybe you're spelling things incorrectly?
    More details would be helpful.
    __________________
    DarthNinja is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 09-12-2011 , 21:00   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #5

    I assume this is due to the teleporter issue?
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    eraserhead
    Veteran Member
    Join Date: Nov 2009
    Old 09-13-2011 , 07:43   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #6

    Darthninja, i tested and indeed the admin menu still works but i could not destroy teleporters. I did not try manual commands though. I used the admin menu:

    Code:
    "Commands"
    {
        "PlayerCommands"
        {
            "Destroy Buildings"
            {
                "cmd"            "sm_destroy #1 @2"
                "admin"            "sm_kick"
                "execute"        "player"
                "1"
                {
                    "type"        "groupplayer"
                    "method"    "name"
                    "title"        "Choose a Player"
                }
                "2"
                {
                    "type"        "list"
                    "title"        "Object to Destroy"
                    "1"        "Sentry"
                    "2"        "Dispenser"
                    "3"        "Entrance"
                    "3."        "Teleporter Entrance"
                    "4"        "Exit"
                    "4."        "Teleporter Exit"
                    "5"        "All"
                }
            }
        }
    }
    __________________
    eraserhead is offline
    Send a message via Skype™ to eraserhead
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 09-13-2011 , 08:23   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #7

    Quote:
    Originally Posted by Antithasys View Post
    I assume this is due to the teleporter issue?
    Yes. I think it was pretty apparent that it wasn't going to be fixed.
    Also there are a few extra features I threw in for good measure.

    Quote:
    Originally Posted by eraserhead View Post
    Darthninja, i tested and indeed the admin menu still works but i could not destroy teleporters. I did not try manual commands though. I used the admin menu:
    It works in the plugin, if you want to tweak the menu, go ahead, but I'm going to be adding an internal menu to the plugin so there's not too much point fixing the config.

    As an aside: The "last" target option is already done, but I'm in the process of adding the aforementioned menus. It's probably going to be a couple days or so as I have to catch up on things I get paid for.
    __________________
    DarthNinja is offline
    Hemick
    New Member
    Join Date: Sep 2011
    Old 09-13-2011 , 22:13   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #8

    Quote:
    Originally Posted by danielmyst777 View Post
    I tried destroying buildings but it says the object specified is invalid. Only one that works is "all".
    I can confirm this as well.

    Code:
    ] sm_destroy @me sentry
    Invalid building specified, please use sentry, dispenser, tele, entrance, exit, last, or all
    I was able to fix it in this block of code. Your if statement wasn't correct.

    Code:
    		if (StrEqual(TargetBuilding, "sentry", false))		//Sentry Gun
    		{
    			iTargetBuilding = 1;
    		}
    		else if (StrEqual(TargetBuilding, "dispenser", false))	//Dispenser
    		{
    			iTargetBuilding = 2;
    		}
    		else if (StrEqual(TargetBuilding, "tele", false))		//Tele entrance + exit
    		{
    			iTargetBuilding = 3;
    		}
    		else if (StrEqual(TargetBuilding, "entrance", false))	//Tele entrance only
    		{
    			iTargetBuilding = 4;
    		}
    		else if (StrEqual(TargetBuilding, "exit", false))		//Tele exit only
    		{
    			iTargetBuilding = 5;
    		}
    		else if (StrEqual(TargetBuilding, "last", false))		//Last building
    		{
    			iTargetBuilding = 6;
    		}

    Last edited by Hemick; 09-13-2011 at 22:19.
    Hemick is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 09-14-2011 , 00:55   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #9

    Version 1.2.0 posted:
    Quote:
    • V1.2.0
      • Support for targeting last-built building added.
      • Fixes an issue with the if else stack
    @ Hemick:
    After looking at the posted version, I think I uploaded the wrong copy of the file that night.
    Everything should be working in the latest release.
    __________________
    DarthNinja is offline
    bobbobagan
    SourceMod Donor
    Join Date: May 2007
    Location: New Zealand
    Old 12-10-2011 , 18:59   Re: [TF2] Destroy Engineer Buildings
    Reply With Quote #10

    Any chance of getting menu support? A lot of my admins seem to forget that this is possible because it is not always used, and doesn't show in the menu.

    Perhaps it could destroy the building you are looking at, or destroy a selected players buildings (all buildings, or just selected buildings)
    __________________
    bobbobagan is offline
    Send a message via Skype™ to bobbobagan
    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 02:30.


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