• Cider Cars
    14 replies, posted
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 :( any idea why?
[QUOTE=Toby Biggs;28479207]and this spawns it as an prop i can click e on and ti goes into inventory, but i cannot dive it :( any idea why?[/QUOTE] I read this a couple of times but i didn't get you.. - Would you please say it again?
[QUOTE=nexusowner;28481123]I read this a couple of times but i didn't get you.. - Would you please say it again?[/QUOTE] 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] [QUOTE=Toby Biggs;28478741]got a script for it?[/QUOTE] Did you not see my post above? [editline]8th March 2011[/editline] [QUOTE=beasty;28478869]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?[/QUOTE] 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.
[QUOTE=blown25;28491121]seen 100's threads like this.[/QUOTE] Yep and they all have the solution. EDIT: took me less than a minute to find this. [url]http://www.facepunch.com/threads/796124-Add-Jeep-to-Cider/page4?highlight=cider+cars[/url] eilex have typed the full code in that thread.
[QUOTE=Sepatrick;28491235]Yep and they all have the solution. EDIT: took me less than a minute to find this. [url]http://www.facepunch.com/threads/796124-Add-Jeep-to-Cider/page4?highlight=cider+cars[/url] eilex have typed the full code in that thread.[/QUOTE] That's for a copcar, and it's in spanish.. can someone just paste the code here please? in english and with the jeep.
[QUOTE=beasty;28492015]That's for a copcar, and it's in spanish.. can someone just paste the code here please? in english and with the jeep.[/QUOTE] 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.
[QUOTE=Jamie932;28492086]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.[/QUOTE] if i want to change it to the jeep will i just change everything to /models/buggy.mdl EDIT: how about this? [code]- [[ 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);[/code] 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 ([url=http://www.facepunch.com/threads/796124-Add-Jeep-to-Cider/page4]Link here is without[/url]). Secondly, I don't think that's all the code that you need. I am not familiar with Cider, therefore cannot really help.
[QUOTE=beasty;28492128]if i want to change it to the jeep will i just change everything to /models/buggy.mdl EDIT: how about this? [code] code.. [/code] this should work, shouldn't it. EDIT2: tried that code, and it's not showing up in my shop menu....[/QUOTE] Thats only the item, all you do is creating a prop that doesnt do anything.
line 1: unexpected symbol near '-' [url=Codepad]Codepad.org[/url] 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? ..
Sorry, you need to Log In to post a reply to this thread.