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:

[lua]
function REQPhysgunPickup(ply, ent)
if !ent:IsValid() then return false end
ent:SetColor(255,255,255,155)
ent.OldColGroup = ent:GetCollisionGroup()
ent:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
end

function REQPhysgunDrop(ply, ent)
if !ent:IsValid() then return false end
ent:SetColor(255,255,255,255)
ent:SetCollisionGroup(ent.OldColGroup)
end

hook.Add( “PhysgunPickup”, “REQPhysgunPickup”, REQPhysgunPickup)
hook.Add( “PhysgunDrop”, “REQPhysgunDrop”, REQPhysgunDrop)
[/lua]

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.

Use COLLISION_GROUP_DEBRIS_TRIGGER

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:

[lua]
–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
end

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)
end

if cantouch and FPP.UnGhost then
	FPP.UnGhost(ply, ent)
	ent:SetColor(255,255,255,155)
    ent.OldColGroup = ent:GetCollisionGroup()
    ent:SetCollisionGroup(COLLISION_GROUP_PLAYER)
end

if not cantouch then return false end

end
hook.Add(“PhysgunPickup”, “FPP.Protect.PhysgunPickup”, FPP.Protect.PhysgunPickup)
[/lua]

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?