• Exiting a vehicle.
    16 replies, posted
Hi. On my server, when you exit a chair/car, you get out in the roof (if you're in the GHQ garage at rp_evocity_v2d for example). How can I change this?
I still need help with this. Anyone?
Hmmmm, try this; [lua] function onExitVehicle(ply,car) local toExit=Vector(10,0,0) local toAdd=car:GetPos() toExit:Add(toAdd) ply:SetPos(toExit) end hook.Add("PlayerLeaveVehicle","Blah",onExitVehicle) [/lua] If memory serves correctly it goes in /lua/autorun/server, I don't think it matters what the file name is. Let me know if you have anymore problems, or if this didn't help. XS
@OP please describe what you're trying to do more clearer. At the moment your post makes no sense.
Well, I want the player to maybe exit their vehicle and just get out to the right of it. Currently, the chairs/cars isn't really good to sit in. Last day, we had a really fun time in a pub, it was rainy outside, a Chef came with some beers and stuff. Whenever someone wanted to go, like, once a guy said he were going to use the toilet, he clicked E, and got stuck in the roof. Lets say like this, 2D : Chair Wall Player gets out in the wall. I want to make them get out Chair Wall Player To the right of the chair/vehicle.
[QUOTE=TheNerdPest14;25530893]Hmmmm, try this; [lua] function onExitVehicle(ply,car) local toExit=Vector(10,0,0) local toAdd=car:GetPos() toExit:Add(toAdd) ply:SetPos(toExit) end hook.Add("PlayerLeaveVehicle","Blah",onExitVehicle) [/lua] If memory serves correctly it goes in /lua/autorun/server, I don't think it matters what the file name is. Let me know if you have anymore problems, or if this didn't help. XS[/QUOTE] I think the OP is too newby to understand what you just put.
BlackWind, you're incredibly rude right now.
I was defending you. Chivalry doesn't get you anywhere on the internet.
I see, got a working code then?
What do you mean working code? You complain about being called a newbie and then you just ask us to make it all for you?
If you can give me a direction how I should make it, I don't need the fully complete code.
Wow.. What i meant was, instead of saying "OMG NOOB GET OUT" i put it as politely as i could. The code above probably does work. You're asking Questions like "How do i bind things to keys" in "[b]newbie[/b] questions" Please consider reviewing what you are about to post before you actually post.
You're right, sorry. Stupid of me. And that was actually about how I can bind a button to open the Q menu, but not Q. And NOT in Options, it's specific for my gamemode.
unbind "Q" in Console. Options/keyboard/advanced options check Dev console if you didnt already know.
I'm, as I said, trying to change the Q button in my server only. function KeyPressed (P, key) end hook.Add( "KeyPress", "KeyPressedHook", KeyPressed ) A function? function GM:OnSpawnMenuOpen() Not sure what function I'm looking for. I'll bring this to the other thread.
The hell does that have to do with your question Zeroi?
Read the comments above.
Sorry, you need to Log In to post a reply to this thread.