I'd really, really like to know which weapon was causing you problems. If you'd track down which weapon it was, that'd be great.
Had the same problem, widdled the swep weapon down to "flashbang.lua" Part of the 98 Swep Weapon Pack. Atleast this one caused the problem for me, there could be others. Love ULX and what you guys have done, I'll post the script here though just in case you don't have it and require further inquiry. Sorry for it being rather large it can pose an annoyance to this thread, delete if necessary.
_OpenScript( "includes/vector3.lua" );
MyIndex = 0
current = 0
attack = 0
atk1 = 0
atk2 = 0
trace = 0
playernum = _TeamNumPlayers(TEAM_UNASSIGNED) + _TeamNumPlayers(TEAM_BLUE) + _TeamNumPlayers(TEAM_YELLOW) + _TeamNumPlayers(TEAM_GREEN) + _TeamNumPlayers(TEAM_RED)
function onInit()
end
function onThink()
if attack == 0 then return
end
if attack == 1 then
atk1 = _CurTime()
attack = 2
end
if attack == 2 then
atk2 = _CurTime()
if atk2 - atk1 >= 4 then
attack = 0
bang()
end
end
end
function onPrimaryAttack()
if (_PlayerInfo(Owner, "alive") == false) then return end
_PlayerViewModelSequence(Owner,161)
_EntEmitSound(Owner, "weapons/iceaxe/iceaxe_swing1.wav")
local flashbang = _EntCreate( "prop_physics" )
current = flashbang
local flashmdl = "models/weapons/w_eq_flashbang.mdl"
_EntPrecacheModel(flashmdl)
_EntSetModel(current,flashmdl)
_EntSetPos(flashbang,vecAdd(_PlayerGetShootPos(Owner),vector3(0,0,16)))
_EntSetAng(flashbang,_PlayerGetShootAng(Owner))
_EntitySetPhysicsAttacker(current,Owner)
_EntSetOwner(Owner)
_EntSpawn(flashbang)
local power = 5250;
local throwforce = vecMul(_PlayerGetShootAng(Owner), vector3(power, power, power))
_PhysApplyForce(flashbang, throwforce)
_SWEPUseAmmo(MyIndex, 0, 1)
attack = 1
end
function bang()
local explode = _EntCreate( "env_explosion" );
_EntSetKeyValue(explode, "iMagnitude", "50");
_EntSetPos(explode, _EntGetPos(current));
_EntSpawn(explode)
_EntFire(explode,"Explode",0,0)
_EntFire(current,"Kill",0,0.05)
for i = 1, playernum do
local subs = vecSub(_EntGetPos(current),_PlayerGetShootPos(i))
_TraceLine(_PlayerGetShootPos(i),subs,825,i)
if _TraceHitNonWorld() then trace = _TraceGetEnt()
if trace == current then
_GModRect_Start("effects/tp_eyefx/tpeye2");
_GModRect_SetPos(0, 0, 1, 1)
_GModRect_SetColor( 255, 255, 255, 255)
_GModRect_SetTime(6, 0.075, 11)
_GModRect_Send(i, 563)
_GModRect_Start("gmod/white");
_GModRect_SetPos(0, 0, 1, 1)
_GModRect_SetColor( 255, 255, 255, 255)
_GModRect_SetTime(5, 0.075, 10)
_GModRect_Send(i, 562)
_PlaySoundPlayer(i,"ambient/levels/labs/teleport_winddown1.wav")
_EntEmitSound(i,"vo/npc/barney/ba_ohshit03.wav")
end
end
end
end
function onSecondaryAttack() end
function onReload() return true; end
function getWeaponSwapHands() return true; end
function getWeaponFOV() return 80; end
function getWeaponSlot() return 5; end
function getWeaponSlotPos() return 2; end
function getFiresUnderwater() return true; end
function getReloadsSingly() return true; end
function getDamage() return 0; end
function getPrimaryShotDelay() return 5.0; end
function getSecondaryShotDelay() return 0; end
function getPrimaryIsAutomatic() return false; end
function getSecondaryIsAutomatic() return false; end
function getPrimaryAmmoType() return "grenade"; end
function getSecondaryAmmoType() return "none"; end
function getMaxClipPrimary() return 1; end
function getMaxClipSecondary() return 1; end
function getDefClipPrimary() return 1; end
function getDefClipSecondary() return 1; end
function getPrimaryScriptOverride() return 2; end
function getSecondaryScriptOverride() return 3; end
function getBulletSpread() return vector3( 0.0, 0.0, 0.0 ); end
function getViewKick() return vector3( 0, 0.0, 0.0); end
function getViewKickRandom() return vector3( 0.0, 0.0, 0.0 ); end
function getViewModel( ) return "models/weapons/v_eq_flashbang.mdl"; end
function getWorldModel( ) return "models/weapons/w_eq_flashbang.mdl"; end
function getClassName() return "weapon_luaflashbang"; end
function getAnimPrefix() return "grenade"; end
function getPrintName() return "LUA Flashbang!"; end