SWEP problems

So I have a bhop script, that runs in shared.lua. And I was wondering if / how I could put this into a SWEP? I have got everything swep related like the models and stuff in other files, I just need to make it so this only activates when the SWEP is in hand.

You can try adding this snippet where you like:

if !ply:GetActiveWeapon():GetClass() == "said_weapon" then return end

Not sure where you want that if it is serverside. <.<

Why is that running serverside? You mean shared right? Because the client stuff won’t run if it is serverside only.

Gah, why people so often do

if !a == b then

which doesn’t work instead of

if a ~= b then


Its shared.lua, I will try that now.