Restrict Removing Vehicles!

With most DarkRP Car Dealers, if players delete their cars, the dealer will not register that the car is gone, causing the player to have to rejoin the server before having the ability to spawn a new car. How could I restrict them from deleting their car so they will store it instead?

I know this isn’t exactly an answer to your question ( for restricting removing, you’d need to probably add a CanTool hook but I’m not familiar with that ), but you can update the shop by adding a server-side


hook.Add( "EntityRemoved", "VehicleRemovalUpdateShop", function( _ent )
	if ( IsValid( _ent ) && _ent:IsVehicle( ) ) then
		// .. Add the code here which tells the shop that their vehicle is no longer around.
	end
end );

Alternatively, you could alter the spawning function to look at all spawned vehicles ( not ideal but it would work ).