Cider Cars

Hello, i am looking for a working cider car script, i have checked the forums, and cannot find one that works for me.
(If you have a script that works, please send it to me)

This should have been in the Requests section, but meh.

[lua]–[[
Name: “sh_mustang.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 = “Mustang”;
ITEM.size = 5;
ITEM.cost = 20;
ITEM.model = “models/Mustang.mdl”;
ITEM.batch = 1;
ITEM.store = true;
ITEM.plural = “Mustang”;
ITEM.uniqueID = “Mustang”;
ITEM.description = “A fast 2-seated Mustang.”;

– Called when a player uses the item.
function ITEM:onUse(player)
if (player:GetCount(“mustang”) == cider.configuration[“Vehicles”][“cider_mustang”].maximum) then
cider.player.notify(player, “This vehicle is already spawned! Go find your Mustang!”, 1);
return false
else
spawnvehicle = ents.Create(“prop_vehicle_jeep”)
spawnvehicle:SetModel(“models/Mustang.mdl”)
spawnvehicle:SetKeyValue(“vehiclescript”, “scripts/vehicles/Mustang_test.txt”)
spawnvehicle:SetPos(player:GetEyeTrace().HitPos)
spawnvehicle:Spawn()
spawnvehicle._UniqueID = player:UniqueID();
hook.Call(“PlayerSpawnedVehicle”, GAMEMODE, player, spawnvehicle)
player:AddCount(“mustang”, spawnvehicle);
return false
end;
end

– Called when a player destroys the item.
function ITEM:onDestroy(player)
cider.player.notify(player, “You sold your car and recieved %50 of it’s price!”)
cider.player.giveMoney(player, ITEM.cost / 2)
end;

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

got a script for it?

where is the speed, giving access to other players, ect?
i need a car for my cider server too. i would also appreciate this!

could you give the script for just the normal HL2 jeep please?

and this spawns it as an prop i can click e on and ti goes into inventory, but i cannot dive it :frowning: any idea why?

I read this a couple of times but i didn’t get you…

  • Would you please say it again?

He’s running cider - he clicks the buy button and then the car comes into his inventory. Then he’s supposed to press Use to spawn the car.

[editline]8th March 2011[/editline]

Did you not see my post above?

[editline]8th March 2011[/editline]

No I cannot. What I have is what you see. Find it somewhere in the folders using GFScape or something like that.

seen 100’s threads like this.

Yep and they all have the solution.

EDIT: took me less than a minute to find this.
http://www.facepunch.com/threads/796124-Add-Jeep-to-Cider/page4?highlight=cider+cars
eilex have typed the full code in that thread.

That’s for a copcar, and it’s in spanish… can someone just paste the code here please? in english and with the jeep.

Is it really that hard to change a few words? I mean - if you really need too, Google has a translator of which you can utilise.

if i want to change it to the jeep will i just change everything to /models/buggy.mdl

EDIT:

how about this?


- [[ 
Name: "sh_breach.lua." 
Product: <span class="highlight"> Cider </ span> (Roleplay). " 
-]] 
  
if (! cider.plugin.get ("Generic")) then return, end; 
  
- Define the table item. 
ITEM local = {}; 
  
- Set Some information about the item. 
ITEM.name = "Jeep" 
ITEM.size = 5; 
ITEM.cost = 5000; 
ITEM.sellprice = 2500; 
ITEM.model = "models/buggy.mdl" 
ITEM.batch = 1; 
ITEM.store = true; 
ITEM.plural = "jeeps" 
ITEM.uniqueID = "jeep"; 
ITEM.description = "An old, rusty jeep witch will be faster than walking." 
ITEM.vehiclename = "jeep" 
ITEM.vehiclebase = "prop_vehicle_jeep_old" 
ITEM.vehiclehorn = "lambohorn.wav" 
  
-------------------------------------------------- -------------------------------------------------- ------------ 
--- 
-------------------------------------------------- -------------------------------------------------- ------------ 
--- 
  
- Called when a player uses the object. 
function ITEM: UNAIDS (player) 
    if (player: getCount ("vehicle") == 1) Then 
        <span class="highlight"> cider </ span>. player.notify (player, "! Your vehicle is already in use!", 1); 
        - Returns false because the player has reached the maximum number of vehicles. 
        return false; 
  
    else 
        - Check if the player is under heaven. 
        local tr 
        tr = {} 
        tr.start = player: getpid () 
        tr.endpos = tr.start + Vector (0, 0, 100000) 
        tr.filter = player 
        util.TraceLine tr = (tr) 
        Then if tr.HitSky 
            if (player: getpid (): Distance (player: GetEyeTrace (). HitPos) <350) Then 
                local car = ents.Create (ITEM.vehiclebase) 
                car: setModel (ITEM.model) 
                char SetKeyValue (vehiclescript "ITEM.vehiclescript) 
                char SetPos (player: GetEyeTrace (). HitPos) 
                char SetNWEntity ("owner", player) 
                char SetNWEntity (prizesell "ITEM.sellprice) 
                char SetNWEntity (hornsound "ITEM.vehiclehorn) 
                car: Spawn () 
                player: addCount ("car", car); 
            else 
                <span class="highlight"> cider </ span>. player.notify (player, "You can not put your vehicle on a 
position so far! ", 1); 
            end 
        else 
            <span class="highlight"> cider </ span>. player.notify (player, "You can not use your vehicle here!", 1); 
        end 
    end 
    false return - The object is no longer cleared. 
end 
  
function ITEM: onPickup () end; 
  
function ITEM: Onsella () end; 
-------------------------------------------------- -------------------------------------------------- ------------ 
--- 
-------------------------------------------------- -------------------------------------------------- ------------ 
--- 
- Register the item. 
<span class="highlight"> cider </ span>. item.register (ITEM);

this should work, shouldn’t it.

EDIT2: tried that code, and it’s not showing up in my shop menu…

Firstly, the link that he posted had highlighted text in it which is why you have “<span class=“highlight”>” things in your code (Link here is without). Secondly, I don’t think that’s all the code that you need. I am not familiar with Cider, therefore cannot really help.

Thats only the item, all you do is creating a prop that doesnt do anything.

line 1: unexpected symbol near ‘-’

Codepad.org

Here’s your start: - [[
Name: “sh_breach.lua.”
Product: <span class=“highlight”> Cider </ span> (Roleplay). "
-]]

Here’s Busymonkey’s: --[[
Name: “sh_mustang.lua”.
Product: “Cider (Roleplay)”.
–]]

maybe start by fixing that?