- HOW TO MAKE WEAPONS ADMIN ONLY IN GMOD HOW TO
- HOW TO MAKE WEAPONS ADMIN ONLY IN GMOD INSTALL
- HOW TO MAKE WEAPONS ADMIN ONLY IN GMOD MOD
This can be very frustrating and destructive when doing complicated constructions if you accidentally do it, so be careful. Reloading twice unfreezes all physical entities props, ragdolls, etc. If it is a ragdoll, all its bones will be unfrozen. Reloading with the Physgun R by default unfreezes the object and all of it's "associated" props being looked at by the player. The tertiary trigger USE key, E by default when held allows the user to rotate the held object using the mouse. Non-physical entities like the majority of NPCs and players cannot be frozen. The secondary trigger Secondary fire, right mouse button by default allows the user to freeze the held object in place regardless of where it is. The primary trigger Primary fire, left mouse button by default when held emits a long blue or a player-determined color beam from the front of the gun.Īnything that touches the beam or vice versa will be grabbed by the user and can then be manipulated into different positions.
HOW TO MAKE WEAPONS ADMIN ONLY IN GMOD MOD
In Garry's Mod 13the player can customize the color of their physics gun's glowing parts. If it's not two, don't run the code.Users can lift, rotate an object in the air, place, and even freeze it completely still, whether it's in midair or not.
HOW TO MAKE WEAPONS ADMIN ONLY IN GMOD INSTALL
If not ( RES_DISTRIB = 2 ) then Error ( "Please Install Resource Distribution 2 Addon.'" ) return end -Checks if the RD version is 2.
Next, we are going to add the rest of the code: The if client statement checks that the lua file is being run on the client, this way you won't get clientside code being run on the server and causing heavy errors. Language.Add ( 'SBoxLimit_admin_spawnable', 'Maximum Admin Spawnables Reached' ) end Language.Add ( 'Cleaned_admin_spawnable', 'Cleaned up all admin spawnables.' ) Language.Add ( 'Cleanup_admin_spawnable', 'Admin Spawnables' ) Language.Add ( 'Undone_admin_spawnable', 'Admin Spawnable undone' ) Language.Add ( 'Tool_admin_spawnable_0', 'Left-Click: Spawn a SENT.' ) Language.Add ( 'Tool_admin_spawnable_desc', 'Create an admin spawnable sent on a surface.' ) Language.Add ( 'Tool_admin_spawnable_name', 'Admin Spawnables' ) So while adding language, you must use the lua name in the middle like this: lua extension is the lua name of the toolgun. An important thing is that the name of the lua file, excluding the. If we don't set TOOL.Tab it will appear in the default tool tab. TOOL.ClientConVar = 'models/Combine_Helicopter/helicopter_bomb01.mdl' -Default model of entity selectedĬleanup.Register ( 'admin_spawn' ) -Add a cleanupĪs explained in the comments, we have set a few key things to the tool.
TOOL.ClientConVar = 'black_hole_cache' -Default entity selected TOOL.Tab = "Life Support 2" -The tab we want the catagory and tool to appear in TOOL.Name = '#Admin Spawnables' -Name of toolgun TOOL.Category = '(Admin Spawnables)' -Name of catagory First we are going to start out with some base coded. First we are going to start out with some base code.Ĭreate a new lua file called admin_a in YourAddon/lua/weapons/gmod_tool/stools/admin_a It will work with just about any other entity you throw at it!Īs in all my other tutorials, you will need a gamemode or pre-coded addon to throw this in with.Ĭreate a new lua file called admin_a in YourGamemode/entites/weapons/gmod_tool/stools/admin_a
HOW TO MAKE WEAPONS ADMIN ONLY IN GMOD HOW TO
I will show you how to add the black hole cache, however. RD2 has made it extremely easy for users to add entites to toolguns, you only have to set a few things and your away.