All pastes #194517 Raw Edit

Stiggy

public lua v1 · immutable
·published 2006-10-07 23:23 UTC
rendered paste body
function onPrimaryAttack()	local vecpos = _PlayerGetShootPos(Owner)	local plyang = _PlayerGetShootAng(Owner)		_TraceLine(_PlayerGetShootPos(Owner), _PlayerGetShootAng(Owner), 9999, Owner)	local iExplosion = _EntCreate("env_explosion")	local hitpos = _TraceEndPos()		_EntSetPos(iExplosion, hitpos)	_EntSetKeyValue(iExplosion, "iMagnitude", 250)	_EntSetOwner(iExplosion, Owner)	_EntSpawn(iExplosion)	_EntFire(iExplosion, "Explode", 1 , 0)	_SWEPUseAmmo(MyIndex, 0, 1)		local laspos = vecAdd (hitpos, vector3(0,0,-100000)) 		if (_TraceHit() == false)  then 			hitpos = vecAdd( vecpos, vecMul( plyang, vector3(800,800,800) ) ) 	  	end 	  	    	    			vecpos = vecAdd( vecpos, vector3( 0, 0, 1000000 ) )	_EffectInit()			_EffectSetEnt( Owner )				_EffectSetOrigin( laspos )			_EffectSetStart( vecpos )			_EffectSetScale( 2000 )		_EffectSetMagnitude( 6)	 			_EffectDispatch( "FadingLineTeam" )	 			_EffectSetMagnitude( 8)	_EffectSetScale( 2000 )	_EffectDispatch( "FadingLineTeam" )end