Surprised to not see this already posted. After hearing about some servers still having issues with players farming weapons from AI, figure I’d share this. Simple script to clean up weapon drops.
Simply drop it in a client side script. As far as I could tell only the pistol, shotgun and carbine rifle ever dropped. Add hashes as needed.
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
-- List of pickup hashes (https://pastebin.com/8EuSv2r1)
RemoveAllPickupsOfType(0xDF711959) -- carbine rifle
RemoveAllPickupsOfType(0xF9AFB48F) -- pistol
RemoveAllPickupsOfType(0xA9355DCD) -- pumpshotgun
end
end)
lol you just took what i shared lol and you’ve put it in a useless ressourec, just put the code somewhere in clientside in a script, and you won’t have to add a ressource (to much ressources makes your server lag)
I bet you have a big number of npc’s in-game, since almost every npc drops “something” script needs to block almost every npc and this is why this script is takieing a lot of FPS (in my opinion)