Where can I download the weapon mod? Weapon mods. Retopology High-Poly Glock

First go to the addons folder - D:\Games\Red Garry's Mod\Game\garrysmod\addons
Create a new folder, rename its name to your own, for example SWEP.

Next, create a text file addon.txt.
We enter into it:
"AddonInfo"
{
"name" "Swep" // Instead of Swep, enter your addon name.
"author_name" "Author" //Instead of Author, enter your nickname.
"author_url" "Url" //Here you can write a page for your website. Example -
"info" "Swep" // Here we enter information about our weapon.
}
In principle, you can leave everything as is.
Next, create the lua folder.

How and what?

Now you can create weapons.
Open our .lua file and enter this code at the very beginning:

SWEP.PrintName = "Chair Thrower" // This is the name of our weapon.
SWEP.Author = "I am athor" // Here you can specify the author's nickname. Enter your nickname in quotes.
SWEP.Instructions = "Left mouse to fire a chair!" // These are instructions for the addon.

SWEP.Spawnable = true // Here you can enter permission for a simple player, if there = true as in our case, then the player is allowed to use this weapon, if = false then the player is prohibited from using it.
SWEP.AdminOnly = true // The same as in the case above, only here permission/denial of weapons is given to the admin.

SWEP.Primary.ClipSize = -1 // This function is responsible for the number of cartridges in the magazine, if the value = -1 as in our case, then the cartridges in the magazine are infinite.
SWEP.Primary.DefaultClip = -1 // The amount of ammo when receiving a weapon.
SWEP.Primary.Automatic = true // Weapon type is automatic or rifle. In our case = true is an automatic, in case = false is a rifle.
SWEP.Primary.Ammo = "none" // Ammo type.

SWEP.Secondary.ClipSize = -1 // Here everything is the same as in the top ones
// functions.
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"


SWEP.AutoSwitchTo = false // Auto switch weapons.
SWEP.AutoSwitchFrom = false

SWEP.Slot = 1 // Weapon slot, if = 1, then our weapon will be in the first slot next to the mount.
SWEP.SlotPos = 2 // The position of the weapon in the slot.
SWEP.DrawAmmo = false // Hiding the number of cartridges in the hud, if = false, then the cartridges are hidden, if = true, then the cartridges remain.
SWEP.DrawCrosshair = true // Hiding the crosshair.

SWEP.ViewModel = "models/weapons/v_pistol.mdl" // IMPORTANT: Here we write the path to the weapon. This is the model that the player will hold.
SWEP.WorldModel = "models/weapons/w_pistol.mdl" // IMPORTANT: Here we write the path to the weapon. This is a model that will be in an unselected state.

local ShootSound = Sound("Metal.SawbladeStick") // Sound when fired.

Now let's move on to the main functions.

function SWEP:PrimaryAttack() // IMPORTANT: This function is responsible for the properties of the shot from the left mouse button.

self.Weapon:SetNextPrimaryFire(CurTime() + 0.5) // This specifies when the next shot will fire. 0.5 you can change to your liking.

self:ThrowChair("models/props/cs_office/Chair_office.mdl") // Function of attacking with chairs. If it doesn't work for you, install the Counter-Strike Source content or rename the model to models/props_c17/FurnitureChair001a.mdl

function SWEP:SecondaryAttack() // The function is responsible for firing with the right mouse button.

self:ThrowChair("models/props_c17/FurnitureChair001a.mdl") // Function for attacking with chairs.

function SWEP:ThrowChair(model_file) // Here is the chair function itself.

self:EmitSound(ShootSound) // Play weapon sound.

if (CLIENT) then return end

local ent = ents.Create("prop_physics")

if (!IsValid(ent)) then return end

ent:SetModel(model_file) // Path to the model, in this case we do not specify anything since the models were already specified in the shot functions.

ent:SetPos(self.Owner:EyePos() + (self.Owner:GetAimVector() * 16)) // Specifies where the model will appear.
ent:SetAngles(self.Owner:EyeAngles())
ent:Spawn() // Spawns our weapon

local phys = ent:GetPhysicsObject()
if (!IsValid(phys)) then ent:Remove() return end

local velocity = self.Owner:GetAimVector()
velocity = velocity * 100 // Shot strength, you can set it to 7000 to make the chairs fly at bullet speed.
velocity = velocity + (VectorRand() * 10)
phys:ApplyForceCenter(velocity)

cleanup.Add(self.Owner, "props", ent) // Function for removing a chair, as you can see the code classifies it as a props.

undo.Create("Thrown_Chair") // Main function for removing a chair when the z button is pressed.
undo.AddEntity(ent)
undo.SetPlayer(self.Owner)
undo.Finish()
end

//That's it. Your weapon is ready, you can change the properties to your liking.
//Search in the Other weapons category.

Create a lua file, for example: weapon_scripted_357.lua in the 357 Scripted SWEP/lua/weapons folder.

Now let’s write the code itself accordingly.
Where there are quotes, you need to indicate the names in quotes.

SWEP.Author = "Hds46" // Nickname of the sweep author. Must be specified in quotes.
SWEP.PrintName = "357 Magnum" // The name of the swap that will be displayed.
SWEP.Contact = "Your site or mail" // Contact information where they will write to you about errors and suggestions.
SWEP.Purpose = "357 Scripted Weapon" // Brief information about the weapon.
SWEP.Instructions = "Shoot" // Instructions on how to use our swap.
SWEP.Category = "My Weapons" // Category where the weapons will be located.
SWEP.Spawnable = true // If false then the weapon cannot be spawned, if true then it can.
SWEP.AdminOnly = false // If false then everyone can use the weapon, if true then only admins.

SWEP.ViewModelFOV = 64 // Here you can specify how to move the weapon model closer/farther from the player’s screen.
SWEP.AutoSwitchTo = true // If true then the player automatically switches to this weapon (if he picks it up), if false then not.
SWEP.AutoSwitchFrom = false // The same thing, but with other swaps.
SWEP.Slot = 1 // Weapon position in Hud.
SWEP.SlotPos = 3 // Weapon position in Hud (at the bottom)
SWEP.Weight = 5 // Weapon weight.
SWEP.DrawCrosshair = true // If true then the crosshair is shown, if false then not.
SWEP.DrawAmmo = true // If true then the player's magazine cartridge indicator is shown, if false then not.

SWEP.ViewModel = "models/weapons/c_357.mdl" // First-person model directory.
SWEP.WorldModel = "models/weapons/w_357.mdl" // Third party model directory.

SWEP.Primary.Sound = "Weapon_357.Single" // Shot sound. You can specify a directory, or you can specify sounds written in the script folder.
SWEP.Primary.Tracer = "Tracer" // Name of the bullet's track.
SWEP.Primary.TakeAmmo = 1 // The amount of ammo that is consumed with each shot
SWEP.Primary.Spread = 0.01 // Weapon accuracy, so that the weapon shoots exactly like an elephant bull from a cs, write 0 or 0.01
SWEP.Primary.Delay = 1 // Weapon rate of fire (you can make a machine gun or machine gun)
SWEP.Primary.Recoil_pitch = -8 // Value required for weapon recoil (Upward recoil)
SWEP.Primary.Recoil_yaw_min = -2 // Minimum value for math.Rand code
SWEP.Primary.Recoil_yaw_max = 2 // Maximum value for the math.Rand code, it will select a random decimal number in the range from -2 to 2. The value required for the recoil of the weapon (Recoil to the right and left)
SWEP.Primary.Recoil_roll = 0 // Value required for weapon recoil (Front recoil)
SWEP.Primary.Damage = 65 // Damage dealt by the weapon.
SWEP.Primary.NumberofShots = 1 // Number of bullets fired with each shot (Shotgun)
SWEP.Primary.ClipSize = 6 // Maximum number of bullets in the magazine.
SWEP.Primary.DefaultClip = 6 // Maximum number of bullets in the magazine when picking up a weapon.
SWEP.Primary.Automatic = true // If true, then you can hold the mouse button and shoot without stopping, if false, then you need to press the attack button again.
SWEP.Primary.Ammo = "357" // Name of the ammunition used.
SWEP.HoldType = "revolver" // Type of animations played by the player.

SWEP.UseHands = true // If true then c_models use custom hands, if false then not.

SWEP.Base = "weapon_base" // Base for weapons. Needed to borrow a couple of necessary features.
// Our weapon does not have alternative shot functions, so we don't need Secodary values.
SWEP.Secondary.Delay = 0.1
SWEP.Secondary.Recoil = 0
SWEP.Secondary.Damage = 0
SWEP.Secondary.NumberofShots = 1
SWEP.Secondary.ClipSize = 0
SWEP.Secondary.DefaultClip = 0
SWEP.Secondary.Automatic = true
SWEP.Secondary.Ammo = "none"

function SWEP:Initialize() // Initialize weapons where you need to cache sounds and specify the type of animations.
util.PrecacheSound(self.Primary.Sound)
self:SetWeaponHoldType(self.HoldType)
end

function SWEP:Reload() // Function when reloading
if (self:GetNextPrimaryFire() > CurTime()) then return end // This is necessary so that it does not reload during the shot.
if (self.Weapon:Clip1()< self.Primary.ClipSize && self.Owner:GetAmmoCount(self.Primary.Ammo) >0) then // Check for ammo. If the weapon has less ammo than usual and the player has ammo, then the following is the code.
self:SetNextPrimaryFire(CurTime() + 3) // Time of the next shot, because the player will not shoot directly while reloading.
self:DefaultReload(ACT_VM_RELOAD) // Reload animation (first person)
self.Owner:SetAnimation(PLAYER_RELOAD) // Player reload animation (third person)
end
end

function SWEP:PrimaryAttack() // Left mouse button shot function.
if (!self:CanPrimaryAttack()) then return end // If there is no cartridge, then the weapon cannot fire.
local tr = self.Owner:GetEyeTrace() // Player's aim direction.
local bullet = () // Bullet structure, values ​​will be used from the values ​​​​described above, only instead of SWEP - self.
bullet.Num = self.Primary.NumberofShots
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector(self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0)
bullet.Tracer = self.Primary.Tracer
bullet.Damage = self.Primary.Damage
bullet.AmmoType = self.Primary.Ammo

self:TakePrimaryAmmo(self.Primary.TakeAmmo)

self.Weapon:MuzzleFlash() // Flash of the shot.
self.Owner:FireBullets(bullet) // This code takes all the values ​​from bullet (above) and allows the player to fire bullets.
self:EmitSound(Sound(self.Primary.Sound)) // Plays the sound of a gunshot.
self.Owner:ViewPunch(Angle(self.Primary.Recoil_pitch,math.Rand(self.Primary.Recoil_yaw_min,self.Primary.Rec
oil_yaw_max),self.Primary.Recoil_roll)) // Recoil takes the values ​​that I described above.
self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK) // Plays shot animation (first person)
self.Owner:SetAnimation(PLAYER_ATTACK1) // Plays the shot animation (third person)
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay) // Next shot time.
end

function SWEP:SecondaryAttack() // Right mouse button shot function. (We won't need it)
end

function SWEP:Deploy() // Function when picking up weapons.
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay) // Time of the next shot, the player will not shoot until he removes the weapon from the holster.
self.Weapon:SendWeaponAnim(ACT_VM_DRAW) // Animation of picking up weapons (first person)
return true // If true then allows you to raise weapons, if false then no.
end

function SWEP:Holster() // Function when putting a weapon into a holster.
return true // If true then allows you to holster the weapon, if false then no.
end

function SWEP:Think() // A function that will be played when the player is holding a weapon, every 0.01 milliseconds.
end

Heh, I'm alive
FAQ:

Question: If the author is still alive, can you give me a log of melee weapons? I really need it
Answer: Unfortunately I didn’t do x. weapons, and I did all this for the sake of leadership. So excuse me, I can give advice, write in the search engine “How to make simple weapon GMOD” there are many options, maybe x. there will be weapons.

Question: Listen, I created a weapon, can I now safely upload it to the workshop?
Answer: Yes, this requires a special program:

Question: Question: is it possible to specify a custom sound "local ShootSound = Sound"?
Answer: Quite, point the way to the sound.

Question: Of course, normal guidance, but is there no other option? (Through some program, for example)
Answer: Unfortunately, there are no programs, there is an addon in the workshop, but there you can make too simple weapons.

Question: how to make a lua file?
Answer: Create a file, for example firstaddon.txt - right-click on the file - rename - and instead of .txt put .lua - save the changes and that’s it :)

P.S. I apologize for the delay, I just didn’t have time :)

This mod adds a lot of different weapons to the world. Parachutes, grenades, pistols, machine guns - this is just a small part of what DesnoGuns adds to the game.

DesnoGuns is one of the most popular mods for the pocket version of Minecraft.. This mod has a large number of advantages compared to others, for example: a very interesting interface, a detailed weapon system, unique crafting recipes.
There are more than forty types of weapons in the mod, and without much effort you can choose the most interesting ones.

M40A3 sniper rifle scope

Night vision of a sniper rifle

Some weapons have a sight in the form

Exoskeleton

How to craft weapons?

In order to make a weapon, you need to make a clip of cartridges in advance, we make it according to the screenshot below:
Having a clip, you can make any weapon, let's make Magnum for example. Looking at the screenshot, you can take it without much effort.

How to shoot and reload a weapon?

In order to shoot from any weapon, click on the " fire" and you will hear the sound of a shot. Each weapon has its own unique sound. To reload, click on your number of cartridges and the clip will be full (you need to have cartridges in your inventory).

DesnoGuns - how to install?

  • Download the file by clicking the button
  • Launch BlockLauncher (you can download it here: goo.gl/PkRKtA)
  • Click on the wrench and go to the "ModPE script" section
  • Enable mod support and click on the “Add” button
  • Find the downloaded file in your phone's memory and click on it
  • Since the resolution of the mod is .modpkg, the textures will be installed automatically

Attention! Subscribe to our group VK, there you will find many entertaining posts - goo.gl/Y3w2Cj

Mods are add-ons developed by ordinary players that add new content to Minecraft: items, equipment, biomes and much more. Add-ons for new weapons are among the most popular among players around the world, as firearms significantly dilute the gameplay of the game.

There are a lot of modifications that add firearms and armor to Minecraft on your computer, so you can easily find something you like. Hundreds of different models of popular guns from real life, well-known guns from CS and CS:GO. Do you like tough shootouts? Take a machine gun and fire a couple of clips at the enemy. Do you prefer quiet hidden killers? We quickly grab a sniper rifle with an optical sight and take out the enemy with one hit.

What types of weapons do mods add?

As mentioned above, there are a huge number of models. Below I will try to divide them all into some categories and give several examples.

  • Assault rifles (CS weapons): Kalash 47, M4A1, Famas F1, Galil;
  • Pistols and revolvers: Colt, Deagle, TT;
  • Shotguns: Mossberg, Remington, double-barreled shotguns;
  • Sniper rifles: AWP, Mosin rifle, Remington 700 LTR;
  • Exploding weapons: Grenades, mines, bazookas.

This is just a small part of the weapons from mods for Minecraft that you will get to know.

Firearms on site

On our website you can download the coolest and newest weapon mods for free. Each mod will have a detailed description, screenshots and links to direct download.

This series of lessons is intended for those who want to learn how to create their own weapons for video games, be it AAA First Person Shooter(FPS), Survival Game or Third Person Shooter(TPS). Modeling a weapon is very simple, but takes a lot of time, since first we have to create High-Poly model, after that we must do a retopology, thereby optimizing the model for games, bake Normal Map With High-Poly, apply quality Physically Based Rendering(PBR) textures and rig the 3D model for subsequent animation. The series of lessons will be divided into 3 parts: 1. Modeling a pistol, 2. Creating materials and animations for Glock, 3. Importing the model into Unity3D and creating a shooting script.

To create this model we will use free and very powerful software Blender3D. The latest version of Blender at the time of writing is 2.78. You can download it from the official website. You can use any other software: 3DS Max, Maya and even domestic Compass-3D, the difference will only be in the program interface. To create textures we will use everyone's favorite Photoshop, but also suitable GIMP.

To create Game-Ready Glock, we need to stick to this plan:
1. Find drawings and several references of the pistol
2. Start High-Poly Modeling
3. Optimize the 3D model for games
4. Create PBR textures
5. Import Glock into Unity

Glock pistol drawings

Most models require drawings to create. We found a nice picture of a gun Glock 19 front, back and sides. The photographs do not exactly match, but such errors should not interfere with the process. But it’s still better to use accurate drawings, for example from this or this site. So, to add an image to the background, you need to: press the key N, in the menu that opens, find the tab Background Images > Add Image and select the desired file. To see the image, you need to switch to orthogonal mode by clicking 5 on Numpad. Below there is an important characteristic - Opacity(Transparency). Add a few more references in the same way, but temporarily disable them in this tab. If you don't like this method, you can enable the addon Images As Planes in User Preferences > Add-ons.

Drawings cannot show cuts or small parts on the gun. References from Google. Look for as many pictures of the Glock as you can from different angles.

High-Poly weapon simulation

When creating High-Poly There is no need for the model to save polygons; use as many as you see fit. Do not skimp on polygons for all the various small parts and cuts. For convenience you can use Hotkeys(hotkeys) that will greatly simplify your life and save a lot of time. All useful Blender hotkeys are written in this article:. We only need a few of them: E- extrusion, G- moving, S- scaling, Ctrl+B- chamfer, Z- switch to mode Wireframe,X- removal, A- select all elements when clicked A in edit mode, all points/edges/planes will be selected, H- hide the object.

Retopology High-Poly Glock

At this stage we need to optimize our 3D model for video games. AAA weapons should now have up to 20.000 Tris, if it's an automatic, up to 10.000 Tris if it's a gun. These are approximate values ​​and are different for each project. BlenderMania released a very good tutorial on how to retopology a high-poly object onto a Low-Poly 3D model.

In this lesson the author talks about how to use Blender3D And MeshLab to create a quick retopology using a minimum of effort and time. In our case there is no need to use MeshLab, we will create Low-Poly model from scratch, as shown in this video tutorial:

Our model should be divided into 4 parts: bolt, trigger, magazine and main part. The magazine, as well as the bolt and trigger, must consist of a minimum number of polygons, because most of the polygons will go to the base of the pistol.

Create UV unwrapping low poly model. To bake Normal Map you need to select our High-Poly model, then choose ours Low-Poly, go to the tab Render. We need to make sure that we have selected Blender Render. Find in this tab Bake> Bake Mode = Normals, Normal Space = Tangent, Selected to Active. Click Bake. After baking, the normal maps need to be saved by clicking F3. Go to the tab Materials, create a new material in the tab Textures select our normal map, in Influence turn off Color, Geometry > Normal. IN Mapping Coordinates must be switched from Generated on UV. Add light to the scene and see the result.

In the next tutorial we will create textures and animations for our pistol.