Disabling Jeeps, Help!

How can i do this?

What gamemode are you playing?

If you’re using sandbox and just want to disable vehicles, place this in a Lua file in /lua/autorun/server:

[lua]hook.Add(“PlayerSpawnVehicle”, “DisableVehicles”, function()
return false


Oh, I didn’t even think of the proper way to do it, which would be using sbox_maxvehicles 0.

If you do it through lua, you could unrestrict it to admins.

Just something to think about.

This would restrict all vehicles. Not only jeeps.

Use this instead:
[lua]hook.Add(“PlayerSpawnVehicle”, “RestrictJeeps”, function(ply, model, name)
if name == “Jeep” then return false end
return true

or change line 2 of pennelord’s to
if name == “Jeep” and not ply:IsAdmin() then return false end
and then admins could spawn jeeps but no one else could

I said in my post that it would disable all vehicles.