Remp Posted July 20, 2009 Share Posted July 20, 2009 (edited) This is a resource for the nightly/1.0 build allowing players to jump, grab and hang onto parts of helicopters By default, to grab a helicopter use the command /grab (or your jump key) when close to it, use /drop (or backspace) to drop off These can be bound to keys with mta's bind command: /bind (eg: "/bind lshift down grab") (type "bind" into the console ingame to see the required syntax) You can set the commands/binds used to grab and drop through the settings in the meta.xml You will be automatically dropped from the heli if it gets close to the ground or your player collides with another element I strongly advise you to not bind your enter_exit or enter_passenger keys to /grab or /drop as this can cause some very disruptive problems Exported functions: - toggleHangingWeightLimit(true/false) - this toggles the hanging weight limit on or off, defaults to on (meaning there are limits to how many people each helicopter can have hanging from it at a time, each helicopter is different) - setPlayerGrabState(player, true/false, [ heli , side = "right", line_percent = 0.5]) - this forces the player hanging on (true) or off (false) a helicopter. Using this to hang players will bypass the hanging weight limit for that helicopter, there are also no suitability checks done so it is up to you to make sure the player can actually start hanging (ie: isnt attached to something, isnt dead, etc). side indicates which side of the heli the player will hang onto, line_percent indicates how far along the grab lines the player will be hanging (0 for front, 1 for back) - isPlayerGrabbingHeli(player) - returns true if they are, false if they arent. nil if player is invalid - getPlayerGrabData(player) - returns heli,side,line_percent,legs_up if they are hanging, nil if they arent or an invalid player is passed - getPlayersGrabbingHeli(heli, [side, line]) - returns a table of all players hanging on the heli, nil if there are no players or the heli is invalid Example videos: Download: https://community.multitheftauto.com/index.php?p= ... ils&id=357 Known issues: - occasionally the animation wont loop properly and the player will not swing, they will just hang in a static position - using the same key as enter_exit / enter_passenger for grabbing can cause you to not be able to walk forward until you jump, be stuck in water unable to jump until you swim to land again or unable to get in/out of vehicles - using the same key as enter_exit for dropping causes you to jack the driver of water vehicles if you drop while they are parked on the water (due to the entry warping) Edited May 22, 2012 by Guest Link to comment
SATAN Posted July 20, 2009 Share Posted July 20, 2009 i saw a video about this some days ago on youtube, awesome resource, good job! Link to comment
XetaQuake Posted July 20, 2009 Share Posted July 20, 2009 I saw it also some days ago - and now its here Realy great work R3mp, thats genius! Xeta Link to comment
Zadara Posted July 20, 2009 Share Posted July 20, 2009 I've test it with some people, i think that is to hard to grab a heli, you should make a bigger col or something. Its a real cool script! 5/5 Link to comment
norby89 Posted July 20, 2009 Share Posted July 20, 2009 I've test it with some people, i think that is to hard to grab a heli, you should make a bigger col or something.Its a real cool script! 5/5 Trust me it is not too hard lol, it requires some skills but it makes it more fun. Link to comment
Thehookerkiller01 Posted July 20, 2009 Share Posted July 20, 2009 Nice, very nice. Keep going! ;p Link to comment
Zadara Posted July 21, 2009 Share Posted July 21, 2009 Little suggestion: When you drop your self off the heli, and you have a parchute on it doesn't work well... Maybe you can add a better parachut support. Link to comment
Remp Posted July 21, 2009 Author Share Posted July 21, 2009 What do you mean by not well? it worked fine for me during testing (though i have a modified parachute resource). There is very little i can do about this really as its the responsibilty of the parachute resource itself, if you can find exact steps to invoke a notably bad response from it you could report it Link to comment
Zadara Posted July 22, 2009 Share Posted July 22, 2009 What do you mean by not well? it worked fine for me during testing (though i have a modified parachute resource). There is very little i can do about this really as its the responsibilty of the parachute resource itself, if you can find exact steps to invoke a notably bad response from it you could report it Well, when the heli forward leaning, to go forward and you jump off with your parachute, the parachute fall is not right, you fall something like "/" if you have the parachute on. Link to comment
Remp Posted August 27, 2009 Author Share Posted August 27, 2009 new version uploaded, this fixes a bug with destroying helis while hanging, improves overall robustness of code and adds 3 new exported functions: - IsPlayerHangingFromHeli(player) - returns true is they are, false if they arent. nil if player is invalid - GetPlayerHangingData(player) - returns heli,side,line_percent,legs_up if they are hanging, nil if they arent or an invalid player is passed - GetPlayersHangingFromHeli(heli, [side, line]) - returns a table of all players hanging on the heli, nil if there are no players or the heli is invalid Link to comment
Slothman Posted August 27, 2009 Share Posted August 27, 2009 love ths script, but i still say you need to simplify it by checking if the player is double tapping jump to get on (meaning pressing jump key while already in the air), then jump again while hanging to get off. that way its unobtrusive to gameplay and no need for unneccesary binds. Link to comment
Remp Posted August 27, 2009 Author Share Posted August 27, 2009 i actually have /grab bound to my jump key already and id argue that being forced to use specific keys (either changed and therefore unknown between servers or not) is more obtrusive having said that, if its an issue you can easily comment the command handlers and add your own bind lines jumping again to drop can be a problem when people spam jump to get on, only to find they pressed it one too many times and dropped off again Link to comment
Remp Posted September 19, 2009 Author Share Posted September 19, 2009 I have updated the resource to allow easy manipulation of the default commands and binds for grab/drop You can now set the names of the commands or the keys/controls you want to bind through the settings in the meta.xml to streamline the process of changing the binds should you want to The default commands/binds are now: to grab - /grab, /heligrab or your jump key to drop - /drop, /helidrop or your backspace key Link to comment
WallMart Posted January 27, 2010 Share Posted January 27, 2010 have been looking a lot for this! thx! Link to comment
WallMart Posted January 27, 2010 Share Posted January 27, 2010 have been looking a lot for this! thx! Link to comment
djlobo Posted January 27, 2010 Share Posted January 27, 2010 I have updated the resource to allow easy manipulation of the default commands and binds for grab/dropYou can now set the names of the commands or the keys/controls you want to bind through the settings in the meta.xml to streamline the process of changing the binds should you want to The default commands/binds are now: to grab - /grab, /heligrab or your jump key to drop - /drop, /helidrop or your backspace key Hello there remp, i have noticed this resource sometimes this resource output some errors on console, are they corrected on this new version? regards Link to comment
Remp Posted January 27, 2010 Author Share Posted January 27, 2010 nope (assuming you are already using v1.2), post the errors you are getting and i will try and fix them Link to comment
Sergei Posted January 27, 2010 Share Posted January 27, 2010 If you are accepting any suggestions for this resource ... it would be awesome if you were able to climb up into the helicopter (if the seat is empty of course). Link to comment
djlobo Posted January 28, 2010 Share Posted January 28, 2010 Remp: the error: Click on the link to see it better ( -.- sorry i only noticed now it dont allow + then 800 x 600 ) http://www.mini-missions.net/resources/mta-screen%202010-01-27%2022-38-39.png If you are accepting any suggestions for this resource ... Would also be amazing if they could grab but instead of with hands, lets say they would just "attach to the heli" and able to aim and shot from there. ( i cant explain more my english sucks ) Link to comment
mini-d Posted February 18, 2010 Share Posted February 18, 2010 would be cool fi then you can use one handed weapons to shoot Link to comment
djlobo Posted February 19, 2010 Share Posted February 19, 2010 would be cool fi then you can use one handed weapons to shoot Just like i said But that would be pure awesomeness Link to comment
Remp Posted February 19, 2010 Author Share Posted February 19, 2010 sadly, shooting while hanging would be very tricky to do (if possible). currently the only way for you to shoot like that is to enable driveby, which requires you to be inside a vehicle. so you'd have to create invisible vehicles, attach them to heli then driveby from it, which wouldn't even look like hanging anyway i'm unsure if you can shoot while attached to something, so i don't know if simply 'standing' on the side of the heli and shooting normally would work as for climbing into the heli while hanging, this is probably possible but it wouldn't look very good at all i actually fixed the errors you posted a few months ago, but i must have forgotten to upload it. id like to re-write parts of the code again now, so (as its a relatively minor problem) i'll hold that fix for a more substantial release Link to comment
kamani Posted February 20, 2010 Share Posted February 20, 2010 OMG ;Oo cool! thanks very... Link to comment
Thehookerkiller01 Posted May 22, 2010 Share Posted May 22, 2010 Any possibility to climb up and go sitting in the helicopter? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now