• SWEP problems
    3 replies, posted
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:[code]if !ply:GetActiveWeapon():GetClass() == "said_weapon" then return end[/code] 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.
[QUOTE=CupABirf;47382985][code]if !ply:GetActiveWeapon():GetClass() == "said_weapon" then return end[/code][/QUOTE] Gah, why people so often do [code] if !a == b then [/code] which [b]doesn't work[/b] instead of [code] if a ~= b then [/code] ?
[QUOTE=CupABirf;47382985]You can try adding this snippet where you like:[code]if !ply:GetActiveWeapon():GetClass() == "said_weapon" then return end[/code] 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.[/QUOTE] Its shared.lua, I will try that now.
Sorry, you need to Log In to post a reply to this thread.