TDM Cars problem

Hello kind users of forums !

I have problem with TDM cars.
I would like to install some kind of passenger mod, but i cant find it/install it.

Second problem is that i would like to disallow players to pickup cars with physgun, i dont know how to do it.

Please, if you can be polite, i am green in this topic.

Dear regards,
TWIX

The first attempt at searching the workshop for passenger mod came up with this.

Look into this hook to disallow players picking up cars.

also this function may help…

[editline]8th March 2014[/editline]

Ninja’d

Can you describe how to use this Physgun pickup and install addon ?


function CarPickup( ply, ent )
	if ( not ply:IsAdmin() and ent:GetClass():car ) then
		return false
	end
end
hook.Add( "PhysgunPickup", "NoCarPickup", CarPickup )

There’s a code example. Replace the entity with whatever the car entity is.

To install the addon, either extract the addon’s contents with GMad and put the lua files on your server, or use +host_workshop_collection to host a workshop collection containing the addon on your server.

when i pasted it into new script in lua/autorun folder i got good effect but noone from Mod- can physgin any prop, even spawned by them.

How can i solve it ?

That’s because I made it so if the player is not an admin they can’t pick it up. Just modify the if statement with the desired effect you want.

I still dont know how to edit, i just simply want to disallow users to pickup only TDM Cars. Now they cant pickup anything. I am green in this topic - can you please edit it correctly ?

If they can’t pickup anything, then you didn’t put the correct entity.

But as entity i should give name of cars or something ? I really dont know.

[editline]9th March 2014[/editline]

Its strange, i have used this script:


 hook.Add( "PhysgunPickup", "No Car Pickup", function( ply, ent )
            if (not ply:IsAdmin() && _ent:IsVehicle( ) && string.find( ent:GetClass():lower(), "prop_vehicle" ) ) then
                    return false
            end
    end)

Actually, Admin+ can physgun it, but Mod- cant physgun CARS and ANY PROP still.

What should i change here ?

-snip-
Robotboy explained it better than I…
In your second thread…