Phygunning a Car

On my server if your driving a car, and anyone physguns your car you will go at a immediate stop and will be stuck till they let go, it has been getting Very annoying and i cant seem the reason i put “prop_vehicle_jeep” in the physgun blacklist and it works… but it fucks up the car, please help me

why does it do that?
got a fix?

Im using FPP
on darkrp 2.4.2 (newest verison

Post some lines of the script that is not working and maybe an error, else it would be hard for us to help you.

of what script? the car script?

this is the lua script for it…

[lua]local V = {
// Required information
Name = “Trabbi”,
Class = “prop_vehicle_jeep”,
Category = Category,

			// Optional information
			Author = "Kuno86",
			Information = "Trabbi, an HL:2 car converted to be drivable.",
			Model = "models/trabbi.mdl",
			Horn = {Sound = nil, Pitch = nil},
							Passengers  = { 
				passenger1 = { Pos = Vector(14,-4,17), Ang = Angle(0,0,9) }, 
				passenger2 = { Pos = Vector(-11.5,40,17), Ang = Angle(0,0,9) }, 
				passenger3 = { Pos = Vector(11.5,40,17), Ang = Angle(0,0,9) } -----Vector = (0 = x, 0 = z, 0 =y) 
			Customexits = { Vector(-90,36,22), Vector(82,36,22), Vector(22,24,90) ,Vector(2,100,30) },
			SeatType = "jeep_seat",
                            HideSeats = true, -----Hide the passenger seats? sure
			ModView = { FirstPerson = Vector(0,0,12) },
			KeyValues = {
							vehiclescript	=	"scripts/vehicles/trabbi.txt"

list.Set( “Vehicles”, “Trabbi”, V )

im not sure what you want?

May someone please assist me ?

Not that code. The code of the blacklist.

Oh right! im sorry, one second.


Heres the picture


How does it mess up the car? and If FPP is messing the car up you may want to post in the FPP thread and let the author know about it.

it messes up the car temporary whenever you physgun it, it stops and doesnt move till you let go

that’s the way the physgun works you need to add a **[Gamemode.PhysgunPickup](** hook and check if the ent is a vehicle if it is return false if it isn’t return true. This will stop the physgun from picking it up at all and stopping it. you could also add other checks to see if the vehicle has anyone in it and return false then and true when no one is in it. well I hope this helps.

it doesnt actually pick it up it looks like the car sinks to the ground while holding it with the physgun,and comes back up after, but it makes the car stop

Where would i put this hook? somewhere in FPP?

you could put the hook at the bottom of the darkrp/gamemode/init.lua, also I was just reading don’t return anything if you are not stopping it so return false if it’s a vehicle but don’t return anything otherwise.


function physgunPickup( ply, ent )
if ent:GetClass() == “prop_vehicle_jeep” then
return false

hook.Add( “PhysgunPickup”, “physgunPickup”, physgunPickup );

That looks ok to me.
but you should use [noparse][lua][/lua][/noparse] tags when posting so it’s easier to read, and indents like this:
function physgunPickup( ply, ent ) – no indent it’s the top level of the code
if ent:GetClass() == “prop_vehicle_jeep” then – indent all code on the next level by 1 tab or 4 spaces
return false – every time we start a new block we go in another tab or 4 spaces
end – and then match all the ends the same way it
hook.Add( “PhysgunPickup”, “physgunPickup”, physgunPickup );
It makes it easier to spot errors.

it fucking works! i wanna make babys with you thank you so much i love you!

It FUCKING works? Is that like. Working more than. Just works?
Nah I’m kidding. Good luck with your scripts there.