AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Destroy Engineer Buildings (https://forums.alliedmods.net/showthread.php?t=167153)

DarthNinja 09-12-2011 07:48

[TF2] Destroy Engineer Buildings
 
1 Attachment(s)
[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


eraserhead 09-12-2011 09:34

Re: [TF2] Destroy Engineer Buildings
 
Excellent! Implementing this....

So this version doesn't support the admin menu?

danielmyst777 09-12-2011 18:12

Re: [TF2] Destroy Engineer Buildings
 
I tried destroying buildings but it says the object specified is invalid. Only one that works is "all".

DarthNinja 09-12-2011 19:44

Re: [TF2] Destroy Engineer Buildings
 
Quote:

Originally Posted by eraserhead (Post 1553609)
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 (Post 1553972)
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.

Antithasys 09-12-2011 21:00

Re: [TF2] Destroy Engineer Buildings
 
I assume this is due to the teleporter issue?

eraserhead 09-13-2011 07:43

Re: [TF2] Destroy Engineer Buildings
 
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"
            }
        }
    }
}


DarthNinja 09-13-2011 08:23

Re: [TF2] Destroy Engineer Buildings
 
Quote:

Originally Posted by Antithasys (Post 1554039)
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 (Post 1554238)
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.

Hemick 09-13-2011 22:13

Re: [TF2] Destroy Engineer Buildings
 
Quote:

Originally Posted by danielmyst777 (Post 1553972)
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;
                }


DarthNinja 09-14-2011 00:55

Re: [TF2] Destroy Engineer Buildings
 
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.

bobbobagan 12-10-2011 18:59

Re: [TF2] Destroy Engineer Buildings
 
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)


All times are GMT -4. The time now is 16:34.

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