Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Weapon Stripper - A Tutorial for Team Fortress 2.

The following tutorial will allow you to strip weapons from every player in the map using triggers and other entities. As a reference to how this tutorial will work out in a map, you can check out a map I created called "melee_ringking" which uses the techniques explained here. http://www.fpsbanana.com/maps/38943. During this tutorial I am going to assume you know how to create brushes, brush entities, point entities, and have at least intermediate experience mapping. If at any time you can not find an entity I suggest uploading the HL2.fgd into Hammer along with the TF2.fgd. 1. Create a room and the point entity "info\_player\_teamspawn" anywhere in the room (for testing purposes). 2. Create the point entity "point\_servercommand" and place it somewhere in your map. (The weapons of all players will be stripped using server commands like you would type in a console). 3. Edit the properties of "point\_servercommand" and set its Name to something you can refer to later. I named mine "servercommand". 4. Create the brush entity "trigger\_multiple" and place where you want the weapon stripping to happen. (I placed mine over the entire map) 5. Edit the properties of "trigger\_multiple" and change the value "Delay before Reset" to a very low value such as zero or 0.001. 6. Click the [Outputs] tab inside the trigger_multiple window. 7. Then you should edit the outputs so it looks something like what is shown in Screenshot 1. The reason for more than 1 output is because there is a character limit for each line so they must be separated into 4 or more (depending on how many commands you have) different parts in order to fit every command in there. Be sure to add a 0.01 delay increase between each line so that the trigger knows in which order to trigger the actions. The first command in the list of commands should always be sv\_cheats 1 and the last command should be sv\_cheats 0 if you are using commands that require cheats. Cheats is required in order for the server to strip the weapons from every player. Remember that each command is separated by a ; as can be seen in the screenshot. The list of all TF2 weapons can be found in the SCRIPTS subfolder of the TF folder inside the team fortress 2 content.gcf, as shown in Screenshot 2. (this can be found using GCFScape) Compile, add lights and stuff, then test. :) Using this technique you can strip any weapons you want to whatever degree you want. You could also add in more commands to suit your interests which adds a lot of versatility to what you can accomplish with Hammer. PLEASE NOTE: This is just a technique and may not be the best way to perform this sort of task. If anyone would like to share their ideas of alternative ways of stripping weapons feel free to leave a message. I will also help with any questions I get regarding this tutorial :)
1-10 of 11
1
Pages
  • 1
  • 2
Go to page:
  • Undies avatar
    Undies Joined 16y ago
    Offline
    274 points Ranked 74,601st
    13y
    Curious, do wildcards (the * symbol is a wildcard) work in server commands? Would one single "ent_remove_all tf_weapon_*" work to remove all weapons rather that having a mass of commands?
    Shoot first, die last
    URL to post:
  • Left4Cake avatar
    Left4Cake Joined 13y ago
    Offline
    1,000 points Ranked 36,808th
    13y
    Here is an idea. Onteamswon1/sv_cheats 1; noclip; sv_cheats 0; Onteamswon2/sv_cheats 1; noclip; sv_cheats 0; You could also have everyone use the kill commaned every time their is a cap to force everyone to start at the new reasoned. With a good imagination anything could be possible.
    Left"U"Dead
    URL to post:
  • Magma Spire avatar
    Magma Spire Joined 15y ago
    Offline
    2,274 points Ranked 23,020th
    14y
    Well, this works great most of the time, but some players are taking advantage of it to add bots to the server or enter noclip. There has to be an easier way.
    Hey, how's it going?
    URL to post:
  • assper avatar
    assper Joined 14y ago
    Offline
    14y
    I have seen many tutorials on how to strip it from everyone, but i need to fine a script thats strips it from just the people in the box
    Bananite
    URL to post:
  • VVeltmeister avatar
    VVeltmeister username pic Joined 16y ago
    Offline
    9,792 points Ranked 995th
    14y
    Nice tute there, its is very relevant for a map I've got on the go atm. I suggest putting in a point_clientcommand which is set to run "slot3" on the client, which changes to melee weapon. One question i have is whether the users get their guns back when they respawn, and could you make a prefab of this, it would make it easier to implement.
    Chronically Apathetic
    URL to post:
  • ParkerM avatar
    ParkerM Joined 15y ago
    Offline
    400 points Ranked 64,090th
    8 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    15y
    To change all of the classes, redirect the trigger_multiple to a point_clientcommand, with the output "OnTrigger, clientcommand, join_class sniper" Replacing sniper with the class you want to have.
    Balls
    URL to post:
  • ParkerM avatar
    ParkerM Joined 15y ago
    Offline
    400 points Ranked 64,090th
    8 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    15y
    Splatt: You need to place a light_environment entity somewhere on the map.
    Balls
    URL to post:
  • I have followed you Tut to the letter. But have a big problem. I have it set up that you are ported to a cage suspended in the middle of the room. when you are teleported to the cage the weapon does not vanish it just stops working and the only option you have for a weapon to change to is the melee weapon. ( not what I wanted but close enough). The REAL problem is that when you get ported into the cage. the scree/map/enviroment goes black like looking at a negitive. and if you go outside of the trigger brush there is no light.
    Bananite
    URL to post:
  • jivemonkey avatar
    jivemonkey Joined 15y ago
    Offline
    15y
    Fps_THEPWNER, Thank you brother, Hey would you be willing to let me decompile your map to check out your script? I would like to make a cp defence map tiered into multiple sections only allowing certain class and weapons for each tier. Dude, check out interlopers.net. You might get a kick out of the content for tf2 mapping there. Jive http://www.fpsbanana.com/maps/screens/4112?img=http://titan.fpsbanana.com/ss/maps/1027a.jpg
    Bananite
    URL to post:
  • fps_THEPWNER avatar
    fps_THEPWNER Joined 15y ago
    Offline
    419 points Ranked 62,915th
    15y
    I'm not sure about classes, I'll have to check to see if there is a command to change your class to a specific one, and if there is then it is possible. :)
    pwnage
    URL to post: