Hi I tried remaking the arsenal of SMOD: Outbreak, I started with the Shotgun first and I ran into a few problems with it.
First Problem: I set the clip capacity to be the same as the original one, it won't let me reload after I fired a single shot at all unless I swap to another weapon, and it will only fire one round and won't reload.
Second Problem: when I get hit by an enemy at clise rage my screen shifts sideways.
Please tell me how to fix these, the weapon script is below.
// Pistol
WeaponData
{
// Weapon data is loaded by both the Game and Client DLLs.
"printname" "spas" //Name.
"viewmodel" "models/weapons/v_spas.mdl"
"playermodel" "models/weapons/w_spas.mdl"
"anim_prefix" "shotgun" //Animations for NPCs.
"weapon_type" "shotgun" //Weapon Type.
"bucket" "2" //The category this will go into.
"bucket_position" "8" //The slot this will go into.
"bucket_360" "0"
"bucket_position_360" "0"
"clip_size" "12" //Clip 1 size
"clip2_size" "-1" //Clip 2 size
"default_clip" "18" //The amount this will have in Clip 1 when spawned by default.
"default_clip2" "-1" //The amount this will have in Clip 2 when spawned by default.
"primary_ammo" "buckshot" //Primary ammo type.
"secondary_ammo" "None" //Secondary ammo type.
"weight" "15" //How much NPCs want to pick this up.
"rumble" "1" //Rumble setting for controllers.
"item_flags" "0" //Flags for the weapon.
"BuiltRightHanded" "0" //Check to see if this is Left-Handed. Useful for CSS weapons.
"AllowFlipping" "1" //Check to see if we can use flipping.
"MagazineStyledReloads" "0" //Check to see if we can use Magazine-Styled Reloads.
"UseMuzzleSmoke" "1" //Check to see if we can use Muzzle Smoke.
"useironsights" "1" //Check if we can use Ironsights.
"LowerWeapon" "0" //Check if we can lower the weapon while sprinting. Disable this if your viewmodel does not have a lowering animation.
//Ironsight settings
IronSight
{
"fov" "-25"
"adjustaccuracy" ".5"
"right" "2.62"
"forward" "-0.40"
"up" "1.53"
"roll" "-0.20"
"pitch" "-1.20"
"yaw" "0"
}
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData
{
"empty" "weapon_shotgun.empty"
"reload" "weapon_shotgun.reload"
"special1" "weapon_xm1014.cock"
"single_shot" "weapon_shotgun.single"
"reload_npc" "weapon_shotgun.npc_reload"
"single_shot_npc" "weapon_shotgun.npc_single"
}
// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"file" "sprites/hud_icons_weapons"
"x" "0"
"y" "192"
"width" "64"
"height" "32"
}
"weapon_s"
{
"file" "sprites/hud_icons_weapons"
"x" "0"
"y" "192"
"width" "64"
"height" "32"
}
"ammo"
{
"font" "WeaponIcons"
"character" "p"
}
"ammo2"
{
"font" "WeaponIcons"
"character" "t"
}
"crosshair"
{
"font" "Crosshairs"
"character" "Q"
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
//The "meat" of the weapon.
"WeaponSpec"
{
"WeaponOptions"
{
"CanReloadSingly" "0" //Check if we can reload 1 round at a time.
}
//Stuff that we will do on primary fire. Remove if you do not need primary fire (if you want night vision binoculars).
"PrimaryFire"
{
"FireRate" "55" //How fast this fires
"IronsightFireRate" "55" //How fast this fires when ironsighted.
"ZoomFireRate" "55" //How fast this fires when zoomed in.
"InfiniteAmmoPerk" "1" //Check to see if we can use this with the Infinite Ammo Perk. Disable "InfiniteAmmo" to stop conflicts.
"InfiniteAmmo" "0" //Check to see if we can use this with Infinite Ammo by default. Disable "InfiniteAmmoPerk" to stop conflicts.
"MinRange" "0" //The minimum amount of range that this weapon would fire at.
"MaxRange" "3072" //The maximum amount of range that this weapon would fire at.
"CanFireUnderwater" "0" //Can we use this underwater?
//Bullet Settings. Remove if you do not want bullets.
"Bullet"
{
"Damage" "3" //Amount of damage we will do.
"ShotCount" "14" //How many shots we will fire at once.
"Spread"
{
//Spread (in degrees)
"x" "12"
"y" "12"
"z" "12"
}
"IronsightSpread"
{
//Spread when ironsighted (in degrees)
"x" "12"
"y" "12"
"z" "12"
}
"ZoomSpread"
{
//Spread when zoomed in (in degrees)
"x" "12"
"y" "12"
"z" "12"
}
}