Prop Ghosting

Made this small script however it sets the colour yet it still collides with everything. I have tried a few different collision groups (Cant see the list cause the wiki is fucked up).

This is what I have:

function REQPhysgunPickup(ply, ent)
if !ent:IsValid() then return false end
ent.OldColGroup = ent:GetCollisionGroup()

function REQPhysgunDrop(ply, ent)
if !ent:IsValid() then return false end

hook.Add( “PhysgunPickup”, “REQPhysgunPickup”, REQPhysgunPickup)
hook.Add( “PhysgunDrop”, “REQPhysgunDrop”, REQPhysgunDrop)

What I want it to do is collide with the world and all props however not with players. As you can guess this is a anti-prop pushing script.


You’ll want to use some prop protection detection method in there too, otherwise minges will touch other’s peeps shit and ghost it. Also, that doesnt stop them freezing it in you.

Doesn’t work. I’ve literally tried all the collision groups. The colour of the prop changes yet it collides with players still.

Yes, it does. Try it again.

I use it in my OWN code, and yes, it works, if you use it properly.

Then where should I be using it? The colour and all that works so I’m pretty sure I have it in the correct place (autorun)

autorun/server, assuming you aren’t trying to use anything that’s shared.

Post the code?

That is the full code.

What admin mod are you using? I know your hooking into it but its possible something is overriding it.

Well Darkrp comes with FPP, but I’m using Evolve

[editline]1st February 2012[/editline]

Added it into this:

–Physgun Pickup
function FPP.Protect.PhysgunPickup(ply, ent)
if not tobool(FPP.Settings.FPP_PHYSGUN.toggle) then if FPP.UnGhost then FPP.UnGhost(ply, ent) end return end
if not ent:IsValid() then return FPP.CanTouch(ply, “FPP_PHYSGUN”, “Not valid!”, false) end

if type(ent.PhysgunPickup) == "function" then
	local val = ent:PhysgunPickup(ply, ent)
	if val ~= nil then return val end
elseif ent.PhysgunPickup ~= nil then
	return ent.PhysgunPickup

if ent:IsPlayer() then return end

local cantouch, why = FPP.PlayerCanTouchEnt(ply, ent, "Physgun", "FPP_PHYSGUN")
if why then
	FPP.CanTouch(ply, "FPP_PHYSGUN", why, cantouch)

if cantouch and FPP.UnGhost then
	FPP.UnGhost(ply, ent)
    ent.OldColGroup = ent:GetCollisionGroup()

if not cantouch then return false end

hook.Add(“PhysgunPickup”, “FPP.Protect.PhysgunPickup”, FPP.Protect.PhysgunPickup)

That’s in FPP. It goes invisible however still collides with the player (Tried a few Collision groups).

Apparently this works ONLY when the other player is also holding a prop, it will then just go through them, otherwise it will collide. Any ideas?