How To Install Portal Gun Mod Gmod

  • 2Custom Gamemodes

To make your SWEP use the viewmodel hands, add this code:

Note that your SWEP must also use a C model for its viewmodel:

Portal Gun Addon Isnt Workn In Gmod 2009-06-10 21:21:21 I just downloaded this Portal gun addon for Gmod and put it in the addons folder like it instructs, but when I go into GMod, I cannot find the gun anywhere under weapons or tools.

If you want to use the Viewmodel Hands system in your gamemode, you must put some code into your gamemode.

Without Player Classes

Install

Serverside: ( This MUST go into a GM:PlayerSpawn function, paste it to the end )

How to install portal gun mod gmod steam

Using Player Classes

Serverside: ( Again, must be put into GM:PlayerSpawn after you set players class )

By default GM:PlayerSetHandsModel calls GetHandsModel of players current player class.

Clientside code

Portal

If you haven't overridden GM:PostDrawViewModel, this step is optional.
This code makes the hands draw. It must be clientside.

Gravity Gun Mod

If you want a specific player class to use specific hands then add this function.

If you're adding a player model and want to add custom hands then use this code.

Where 'css_arctic' is the name you used when calling player_manager.AddValidModel — the two numbers are respectively the skin and bodygroup values.

If a player model doesn't have a corresponding hands entry, it will default to the civilian hands.

Here's an example c_model that shows how things need to be set up in your QC and SMD files. This is the source files of the medkit SWEP that is packed by default with Gmod.

Here are the source files for the c_arms_citizen model, if you need some reference for compiling arms:

Here's the citizen arms on a CAT animation rig.

If you need SMD files for these arms (making your own animation rigs, etc.), here they are.

The arms mesh should never be in the weapon model itself; that defeats the entire purpose of the system!

Remember to include c_arms_definebones.qci from the medkit example, as otherwise StudioMDL will optimise away the arm bones that you've included and then it won't work.

How To Install Portal Gun Mod Gmod Steam

Retrieved from 'https://wiki.garrysmod.com/index.php?title=Using_Viewmodel_Hands&oldid=31551'