Add Jeep to Cider

Hello,

I have cider installed and have much addons and fixes on it, but the only thing I don’t get to work is vehicles.

I tried everything but it don’t appear in store and is not spawnable. I want a jeep because everybody has it and it is not difficult to explain than ( I think). When Jeep is working I can add custom cars.

Thank you.

Btw i read bradmcco’s topic but its a chaos.

got same problem please respone.

thank you!

Please, do tell us everything that you have tried. The more information you give, the more likely you are that someone will help.

srry for post

What did you put in addons?

I’m the topic starter not genious.

I have nothing putted in addons because the jeep is already in gmod I thougt.

In orangebox/garrysmod/gamemodes/cider/gamemode/core/items I copied battery and I edited that with jeep model etc but when I join the server i see yellow error with null failure or something.

Can you say what files I have to edit etc than I can try again.

You do need to create a new file and why not modify battery? Do it again, and this time post the error here, along with your item code.

Ok the problem was that i had the wrong model for the jeep, I fixed the code by setting model to a jeep seat. (only to test it to get it to work)

But now I can manufacture it, but it’s not “driveable” and when I press e it returns in my inventory.

[lua]
–[[
Name: “sh_jeep.lua”.
Product: “Cider (Roleplay)”.
–]]

if ( !cider.plugin.get(“Generic”) ) then return; end;

– Define the item table.
local ITEM = {};

– Set some information about the item.
ITEM.name = “Jeep”;
ITEM.size = 5;
ITEM.cost = 10;
ITEM.team = TEAM_REBELDEALER;
ITEM.model = “models/nova/jeep_seat.mdl”;
ITEM.max = 1;
ITEM.batch = 1;
ITEM.store = true;
ITEM.plural = “Jeep”;
ITEM.uniqueID = “Jeep”;
ITEM.description = “A test Jeep.”;

– Called when a player drops the item.
function ITEM:onDrop(player, position) end;

– Called when a player destroys the item.
function ITEM:onDestroy(player) end;

– Register the item.
cider.item.register(ITEM);
[/lua]

Why do you have ents.Create(“prop_vehicle_jeep”); on line 16?

When I was fixing it someone says I have to do that, I deleted it now but same problem.

What code I have to add so it’s driveable and not pickable?

Well you’ll need to spawn a jeep with ents.Create(“prop_vehicle_jeep_old”) in the drop function, set it’s position to where the item should be, give it script, set it’s model/skin etc, then return false to prevent it spawning twice.

I add ents.Create(“prop_vehicle_jeep_old”) but It’s the same as is was before. I think I’ve done something wrong because when I manufacture I haven’t 2 props spawning.

Code?

[lua]
–[[
Name: “sh_jeep.lua”.
Product: “Cider (Roleplay)”.
–]]

if ( !cider.plugin.get(“Generic”) ) then return; end;

– Define the item table.
local ITEM = {};

– Set some information about the item.
ITEM.name = “Jeep”;
ITEM.size = 5;
ITEM.cost = 10;
ITEM.team = TEAM_REBELDEALER;
ents.Create(“prop_vehicle_jeep”);
ITEM.model = “models/nova/jeep_seat.mdl”;
ITEM.max = 1;
ITEM.batch = 1;
ITEM.store = true;
ITEM.plural = “Jeep”;
ITEM.uniqueID = “Jeep”;
ITEM.description = “A test Jeep.”;

– Called when a player drops the item.
function ITEM:onDrop(player, position) end;
return = false

– Called when a player destroys the item.
function ITEM:onDestroy(player) end;

– Register the item.
cider.item.register(ITEM);
[/lua]

ITEM.model = “models/nova/jeep_seat_old.mdl”;

you also need the vehicle script.

Why have you got

[lua] function ITEM:onDrop(player, position) end;
return = false [/lua]

What the hell is that?

Are you bradmcco on an alt? What the hell are you doing?!

no,
he is my friend he was in my clan on ventmob.
lexic didnt you say if you have ITEM.model = “models/nova/jeep_seat.mdl”; it will spawn a model and when you press E on it it will go back in inventory?
also you said after ents.Create you need SetModel()?

Yes, I probably did.
Have you tried actually putting it in the function rather than waving it around randomly throughout the code?

function ents.Create(“prop_vehicle_jeep_old”) ??