• Need help for making Cider Car
    1 replies, posted
The titles says everything. Hello Facepunch. I try to make a car for my Cider RP. But im not sure about this code; And yes i took this code from another old post. And i would like to thank shane_104. But here is the code [lua]--[[ Name: "sh_jeep.lua". Product: "Cider (Roleplay)". --]] -- Define the item table. local ITEM = {}; -- Set some information about the item. ITEM.name = "Jeep"; ITEM.size = 5; ITEM.cost = 5000; ITEM.model = "models/buggy.mdl"; ITEM.batch = 1; ITEM.store = true; ITEM.plural = "Jeeps"; ITEM.uniqueID = "jeep"; ITEM.description = "A jeep to get about with."; ITEM.vehiclescript = "scripts/vehicles/jeep_test.txt" -- Called when a player uses the item. function ITEM:onUse(player, item) local car = ents.Create("prop_vehicle_jeep_old") local trace = { } trace.start = ply:EyePos() trace.endpos = trace.start + ply:GetAimVector() * 85 trace.filter = ply local tr = util.TraceLine(trace) car:SetModel(ITEM.model) car:SetKeyValue("vehiclescript",ITEM.vehiclescript) car:SetPos(player:GetEyeTrace()) car:Spawn() item:Remove() Msg("onUse") return false end; function ITEM:onPickup() end; function ITEM:canManufacture() end; cider.item.register(ITEM);[/lua] And im not even sure where i should place this in my cider folder. - Thanks In advance! :-)
Sorry, you need to Log In to post a reply to this thread.