Hi, I’m developing my own server and was wondering how to no collide weapons in the armoury, specifically New Summer V2 deagle place thing (Idk xD). The deagles collide so much that it lags the server, its not the number of entities either since the second you take out all the deagles the server works great. (don’t know if it matters but i am using Jailbreak 7) Thank you so much in advance.
You can disable collision on all map created weapons with:
hook.Add("InitPostEntity", "DisableWeaponCollision", function() local tEntities = ents.GetAll() for i = 1, #tEntities do local pEntity = tEntities* if (pEntity:IsWeapon() and pEntity:MapCreationID() ~= -1) then pEntity:SetCollisionGroup(COLLISION_GROUP_DEBRIS_TRIGGER) end end end)
If you only want to limit it to the armoury, you’ll have to check if the weapon is located in a pre-defined armoury area with
Vector:WithinAABox. If you want it to apply to all created weapons, you can use a
GM:OnEntityCreated hook, instead.
oh ok, i think it’d be fine to all weapons, is this is serverside or…?
[editline]9th November 2017[/editline]
nvm, put it in serverside and it works, thanks so much !!!