showspeeddownload.blogg.se

How to add custom models to gmod
How to add custom models to gmod








You can of course make an icon in any style you want if you so choose. Note: this outlines how you can create an icon in the same style as TTT’s icon. This covers much of the code you’ll need for a simple gun. It will take some experimentation to find good values here, because they differ significantly for every gun.

how to add custom models to gmod

They determine how the gun is positioned when using iron sights. The IronSights vectors are actually from the default GMod CS:S weapons that the TTT weapons were originally based on, but I’ll discuss them here anyway.

  • WEAPON_CARRY: only for the Magneto-stick, default equipment.Īnother field most TTT weapons should set (assuming they use refillable ammo) is:.
  • WEAPON_MELEE: only for the crowbar players get by default.
  • WEAPON_ROLE: special equipment that is default equipment for a role, like the DNA Scanner.
  • how to add custom models to gmod

  • WEAPON_EQUIP2: same as above, secondary equipment slot.
  • WEAPON_EQUIP1: special equipment, typically bought with credits and Traitor/Detective-only.
  • WEAPON_HEAVY: rifles, shotguns, machineguns.
  • WEAPON_PISTOL: small arms like the pistol and the deagle.
  • Mappers can use a weapon checker entity to detect specific types (Kinds) of weapons. For example, the special equipment types ( WEAPON_EQUIP1, EQUIP2, and ROLE) will not auto-pickup if players walk over them (they must press +use). You can’t carry two weapons of the same “Kind”, and certain other behavior also depends on this type. It’s the category or class the weapon belongs to. The first important line is:Įvery TTT weapon must have a Kind specified. At the top is some bog standard SWEP stuff I’ll skip past. Let’s look at the a file in the folder you have extracted.

    how to add custom models to gmod

    If you now start a TTT game, you can use the console command give weapon_ttt_ak47 to get the gun and give it a go. Extract it into \garrysmod\gamemodes\terrortown\entities\weapons\. zip will contain a weapon_ttt_ak47 folder. Preparationĭownload the AK47 weapon linked above. If not, you may still be able to follow along, but at your own risk. Use the tutorials and information at the Gmod wiki to fill in the gaps.įrom this point on, I will assume that you are familiar with Lua and that you are somewhat familiar with Gmod SWEPs. I will explain standard Gmod SWEP (i.e., scripted weapon) concepts when convenient, but I’m not going to be able to tell you everything there is to know, and I especially can’t teach you Lua here.

    how to add custom models to gmod

    We do this by following along with an example weapon that you can download in the list above. We will look at making a custom weapon for TTT, both the code side and the graphical side.

  • AK47 weapon: an example scripted weapon.
  • psd file for creating a menu icon in the style of the other TTT icons. Some example content and a guide to creating a custom weapon for TTT.
  • Can I make my custom weapon cost 2 or 3 credits instead of 1?.









  • How to add custom models to gmod