Deepu Posted April 7, 2016 Share Posted April 7, 2016 Hey guys.. I need a small help.. I know this is a stupid question but hey... how do you safely stay on top of a moving car? I mean I made some progress in a good script of mine but this thing is the last thing I need.. Staying on the top of a moving car. I am attached to the top of a car and I must suddenly detach myself off of the car.. and in doin so.. I'm falling off... and I'm not staying on top of the car.. Is there any fixes on this? I used this function though. . . . detachElements(localPlayer, vehicle_I_am_attached_to); -- here's where I'm falling . . . Link to comment
Deepu Posted April 7, 2016 Author Share Posted April 7, 2016 Hey guys.. I need a small help.. I know this is a stupid question but hey... how do you safely stay on top of a moving car? I mean I made some progress in a good script of mine but this thing is the last thing I need.. Staying on the top of a moving car. I am attached to the top of a car and I must suddenly detach myself off of the car.. and in doin so.. I'm falling off... and I'm not staying on top of the car.. Is there any fixes on this? I used this function though. . . . detachElements(localPlayer, vehicle_I_am_attached_to); -- here's where I'm falling . . . Link to comment
Seba500PLK Posted April 8, 2016 Share Posted April 8, 2016 maybe... detachElements(localPlayer, vehicle_I_am_attached_to) x,y,z=getElementPosition(localPlayer) setElementPosition(localPlayer,x,y,z) Link to comment
Seba500PLK Posted April 8, 2016 Share Posted April 8, 2016 maybe... detachElements(localPlayer, vehicle_I_am_attached_to) x,y,z=getElementPosition(localPlayer) setElementPosition(localPlayer,x,y,z) Link to comment
Deepu Posted April 8, 2016 Author Share Posted April 8, 2016 Duh? Ofcourse it doesn't work.. the code doesn't even make sense literally.. I mean you are detaching and its like.. I fell of the vehicle and I am on the ground and then you are setting my position back to the ground lol .. anyways thanks for helping Link to comment
Deepu Posted April 8, 2016 Author Share Posted April 8, 2016 Duh? Ofcourse it doesn't work.. the code doesn't even make sense literally.. I mean you are detaching and its like.. I fell of the vehicle and I am on the ground and then you are setting my position back to the ground lol .. anyways thanks for helping Link to comment
Anubhav Posted April 8, 2016 Share Posted April 8, 2016 When you use attachElements use setElementFrozen then when you use detachElements you simply setElementFrozen a bit 2-3 seconds later and you wont fall? You can make it like you are frozen on vehicle after detach Link to comment
Anubhav Posted April 8, 2016 Share Posted April 8, 2016 When you use attachElements use setElementFrozen then when you use detachElements you simply setElementFrozen a bit 2-3 seconds later and you wont fall? You can make it like you are frozen on vehicle after detach Link to comment
Deepu Posted April 8, 2016 Author Share Posted April 8, 2016 Yes @ Anubhav I tried that at the very first even before I made this topic. But I need to use this function in the script.. element = getPedContactElement(ped_or_player_element); and the function returns false if... and only if.. I am not standing on the vehicle which means that I must not be frozen.. I must not be in any animation and I must not be attached to any element. I must be completely connected to the element I am standing on. Link to comment
Deepu Posted April 8, 2016 Author Share Posted April 8, 2016 Yes @ Anubhav I tried that at the very first even before I made this topic. But I need to use this function in the script.. element = getPedContactElement(ped_or_player_element); and the function returns false if... and only if.. I am not standing on the vehicle which means that I must not be frozen.. I must not be in any animation and I must not be attached to any element. I must be completely connected to the element I am standing on. Link to comment
Anubhav Posted April 8, 2016 Share Posted April 8, 2016 setElementData to tell if he is on car glued? Link to comment
Anubhav Posted April 8, 2016 Share Posted April 8, 2016 setElementData to tell if he is on car glued? Link to comment
Deepu Posted April 8, 2016 Author Share Posted April 8, 2016 nope... that would be useless.. since that has no relation with the physics of a GTA element (the player).. something that has to fall... has to fall.. that's what the GTA physics is.. but what I need is a way to make the player think that he didn't fall... and he is still in the roof.. Link to comment
Deepu Posted April 8, 2016 Author Share Posted April 8, 2016 nope... that would be useless.. since that has no relation with the physics of a GTA element (the player).. something that has to fall... has to fall.. that's what the GTA physics is.. but what I need is a way to make the player think that he didn't fall... and he is still in the roof.. 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