Hello, I noticed that it's a huge problem being able to pocket props. Well, I looked into it for all clueless DarkRP owners who don't know how to fix it. Instead of downloading something, I will walk you threw it.
First goto this directory- \gamemodes\DarkRP\entities\weapons\pocket
Okay now once your there open up the shared.lua that's in there, it helps if you have Notepad++.
You in there? Good, now scroll down to about line 52. It should have local blacklist =. Okay if you found that there is a huge list of items, I personally thought people should be able to pocket shipments so I took "spawned_shipments" out.
So this is the last part all you need to do is add this "prop_physics"
For me it looks like...
local blacklist = {"fadmin_jail", "drug_lab", "money_printer", "meteor", "microwave", "door", "func_", "player", "beam", "worldspawn", "env_", "path_", "darkrp_console", "prop_physics"}
If you have any custom entities you can add them into this if you don't want to let someone pocket it. Yes this was a easy fix and I noticed A LOT of servers don't have this added so it's a easy thing to pocket a prop then get into someones base. Or prop spam world models...
I just swapped it over to whitelist. Much less annoying. I mean, players should only be pocketing things like shipments and weapons. medkits/ammo all fall under spawned_weapon. Also, your blacklist you should add E2 chips and other such wire ents. Changing the E2 chip model to something annoying and dropping those on death is another mingtastic annoyance.
[lua]
local whitelist = {"spawned_shipment", "spawned_weapon", "empty_shipment"}
for _, class in pairs(whitelist) do
if (pent == class) then
found = true;
break;
end
end
[/lua]
Even if you do pocket a prop into someones base, the frozen entity should still be there blocking your path. Because you only pocket it clientside, I think? Not sure how that works I just now it only visually pockets the prop if it's frozen.
As a pocket related note: I've also always hated how the Pocket SWEP alters the collision groups, so unneeded and annoying to the entities. Disables use of the OnTouch() functions because colliding with other ents won't work and messes up a few entities if pocketed. Better to set NoDraw/EnableMotion and then move the prop into the skybox or such out of map areas. Example like so (that's only the fire part, someone should remake the tool. I have edited it, but the code uses most of falco SWEP code, no need to exactly retype the obvious parts and I'm to lazy to polish it for any form of release :D).
[lua]
table.insert(self.Owner:GetTable().Pocket, trace.Entity)
ent = trace.Entity
ent:SetNoDraw()
ent:SetPos(Vector(-1434.454712, -1910.167603, -1868.270508))
--trace.Entity:SetCollisionGroup(0)
[/lua]
I personally think blacklist is more simple.
[QUOTE=James0roll_;29843131]I personally think blacklist is more simple.[/QUOTE]
Code wise it's the same. Gameplay wise it's better surely? You decide what you want to pocket. Not "Oh, another minge figured out another ent to pocket to piss people off"... Some props are also prop_phys_multiplayer, think it was called that my memory kinda fails. But the point is some world props have different class names. Then there are keypads, buttons, map entities the list goes on and on and on.
[QUOTE=Pantho;29843299]Code wise it's the same. Gameplay wise it's better surely? You decide what you want to pocket. Not "Oh, another minge figured out another ent to pocket to piss people off"... Some props are also prop_phys_multiplayer, think it was called that my memory kinda fails. But the point is some world props have different class names. Then there are keypads, buttons, map entities the list goes on and on and on.[/QUOTE]
I want to use whitelist but it gives me a error in console.
[QUOTE=James0roll_;29843357]I want to use whitelist but it gives me a error in console.[/QUOTE]
Eh, if you had posted the error I would have looked why... But I'm to tired to load up the swep code. I only posted an example of whitelist, I've forgotten how falco did the blacklist so I can't really remember what else I changed :).
Just class me as some useless tart and continue with your previous <3
there isnt a problem and never was. this thread is useless
Im not sure why but i cant even see the pocket item!! i checked and i cant find it anywhere. Any solutions? (please help)
Sorry, you need to Log In to post a reply to this thread.