Cider Questions + crashes Garrys Mod


Crashing thing is fixed.


Spawning cars is fixed.

How would I go on making the car lockable/unlockable, and giving other people access to it?

Thanks in advance!

Please dont tell your opinions about Cider. No one cares.

Had same shit with Darklands RPG, its something that crashes in MySQL.

Post the crash dumb or something

Yea, it turns out it didnt like the “1” I put at Donator.

Updated OP.

NOTE: Use VUMod or make your own seats in cars for multiple seats.

As for spawning the car, you can simply ents.Create( “prop_vehicle_jeep” ) and set the model to that hummer.

Also:

  • Simply removing the OnDrop in that item will remove the option from the menu completely.
  • Give them 75% of their money back when they destroy the item. If they make a mistake they at least get some money.

Yea, I know about VU-Mod, but I ran a DarkRP server once, and I could never get it working. Well, it kinda worked, cause if you spawned the vehicle with the Q menu in Vehicles tab, the car would have 2 seats, but if you bought it from the F4 menu, it only had 1 seat.

Would I have to create a small autorun script, to identify the seats in the cars?

[editline]05:27PM[/editline]

And yea, I’ll try spawning the car like that :smile:

When spawning cars you need to manually call this hook:
[lua]hook.Call(“PlayerSpawnedVehicle”, GAMEMODE, player, spawnvehicle);[/lua]

Where would I add that? Like this?



function ITEM:onUse(player)
   ents.Create("prop_vehicle_jeep")?
   ITEM:SetModel("models/Splayn/hummer_h2.mdl")
end;
hook.Call("PlayerSpawnedVehicle", GAMEMODE, player, spawnvehicle)

Something like this:
[lua]
function ITEM:onUse(player)
spawnvehicle = ents.Create(“prop_vehicle_jeep”)
spawnvehicle:SetModel(“models/Splayn/hummer_h2.mdl”)
hook.Call(“PlayerSpawnedVehicle”, GAMEMODE, player, spawnvehicle)
end;
[/lua]

Edited 17:40
Updated OP

I still have a problem

This works fine for me:
[lua]spawnvehicle:SetPos(player:GetEyeTrace().HitPos)[/lua]

-snip-

Use http://quickthumbnail.com/ then just put the smaller image in a that’ll go to the original image.

Yea, I cant be bothered uploading it there, download it again and upload it to another site. Thanks though.

Still waiting for thejjokerr :downs:

If it hovers above the ground, make sure the model is installed on the server.

Well, otherwise I wouldnt be able to spawn it. Besides, It’s a multiplayer game, so…

But I dont know what’s wrong with this :confused:

[editline]07:59PM[/editline]

But im guessing, that since you didnt correct me; the code should work ?

Alright, make sure you have this in your script too(before you call that hook):
[lua]spawnvehicle:Spawn()[/lua]

:doh:
Will try.

[editline]05:03PM[/editline]

Yea, that’s the thing I was missing :downs:, should have figured that out myself, but thanks for your help Joker :slight_smile:

[editline]05:04PM[/editline]

Oh, how would I make it, so that you can only have 1 of each vehicle out?

You mean the builtin SQLite databases? My gamemode’s started crashing as well, and that uses a lot of the SQLite stuff.

I dont know why, but each time I make a multiplayer server, I have to delete myself in the SQL Database, so it can create a new line. Otherwise it crashes Gmod.