Help with spawning vehicle

I am new to lua and I am trying to figure out how to spawn vehicles in game but I am having trouble doing so

local function spawnvehicle(player, string, vector, vector)
vehicles.PlayerSpawn( player, “jeep”, player:GetPos() + player:GetAngles():Forward() * 64, player:GetAngles():Up() );
end
concommand.Add(“spawnjeep”, spawnvehicle )

I placed this in lua/autorun/server but I am unsure why it wont work
Thanks

I don’t know why it doesn’t work, but the arguments of your concommand function are wrong. Passed are: the player calling the command, the command itself and a table with the arguments of the called console command. Instead you’re using the arguments of the vehicles.PlayerSpawn function.

Ok i changed the arguments to

local function spawnvehicle(player, vehicle_type , position, angle)

but it also say in additional notes "vehicle_type must be a previously defined vname found in settings/vehicles. "

Does this mean anything?

You didn’t get me right, the function is called by a console command, so it should have the argument structure:
[lua]local function spawnvehicle( ply, com, args )[/lua]