MyIndex = 0; Owner = 0; CurrentTime = 0; function onInit() end function onPrimaryAttack() _TraceLine(_PlayerGetShootPos(Owner), _PlayerGetShootAng(Owner), 4096, Owner) local target = _TraceGetEnt() local TargetPos = _TraceEndPos _PlayerLockInPlace(target, true) local explosion = _EntCreate("env_explosion") local ExplosionPower = 100 _EntSetPos(explosion, TargetPos) _EntSetKeyValue(explosion, "iMagnitude", ExplosionPower) _EntSpawn(explosion) _EntFire(explosion, "Explode", "", 1) AddTimer(2, 1, _EntRemove, explosion) AddTimer(2, 1, _PlayerLockInPlace, target, false) end function onSecondaryAttack() end function getPrintName() return "Exploder Gun"; end function getClassName() return "weapon_exploder"; end function getPrimaryAmmoType() return "melee"; end function getSecondaryAmmoType() return "melee"; end function getViewModel() return "models/weapons/v_pist_deagle.mdl"; end function getWorldModel() return "models/weapons/w_pist_deagle.mdl"; end function getAnimPrefix() return "pistol"; end function getWeaponSwapHands() return true; end function getWeaponFOV() return 85; end function getWeaponSlot() return 5; end function getWeaponSlotPos() return 2; end function getFiresUnderwater() return true; end function getReloadsSingly() return false; end function getDamage() return 0; end function getPrimaryShotDelay() return 0.1; end function getSecondaryShotDelay() return 0.1; end function getPrimaryIsAutomatic() return true; end function getSecondaryIsAutomatic() return true; end function getMaxClipPrimary() return 2; end function getMaxClipSecondary() return 0; end function getDefClipPrimary() return 2; end function getDefClipSecondary() return 0; end function getPrimaryScriptOverride() return 1; end function getSecondaryScriptOverride() return 1; end function getBulletSpread() return vector3(0.01, 0.01, 0.01); end function getViewKick() return vector3(0.5, 0.5, 0.5); end function getViewKickRandom() return vector3(2.0, 1.0, 1.0); end