Jump to content

The wheel turned when exiting the car as MTA script?


Recommended Posts

  • Moderators
i understood nothing from what you said. btw this forum is for helping in script not to request codes..

Regards ,,

He wants to do this:

Yeah, I would first try with shaders (but I'm a perfect noobs with shaders) because I think it's possible.

Otherwise I would use an invisible ped to do it. He will just press the forward button and freeze the car element.

But if you use a ped, then the car owner will probably do the carjack animation (even if you destroy the ped in the event onPlayerVehicleEnter, idk give it a try)

Also, if another crazy driver hit the car (which is frozen) the car won't go anywhere, so it's not really realistic.

Edited by Guest
Link to comment
i understood nothing from what you said. btw this forum is for helping in script not to request codes..

Regards ,,

He wants to do this:

Yeah, I would first try with shaders (but I'm a perfect noobs with shaders) because I think it's possible.

Otherwise I would use an invisible ped to do it. He will just press the forward button and freeze the car element.

But if you use a ped, then the car owner will probably do the carjack animation (even if you destroy the ped in the event onPlayerVehicleEnter, idk give it a try)

Also, if another crazy driver hit the car (which is frozen) the car won't go anywhere, so it's not really realistic.

If you want to add an youtube video just put the video 'code' Which is :

aFt3ZcCdyik

:)

Link to comment
i understood nothing from what you said. btw this forum is for helping in script not to request codes..

Regards ,,

He wants to do this:

Yeah, I would first try with shaders (but I'm a perfect noobs with shaders) because I think it's possible.

Otherwise I would use an invisible ped to do it. He will just press the forward button and freeze the car element.

But if you use a ped, then the car owner will probably do the carjack animation (even if you destroy the ped in the event onPlayerVehicleEnter, idk give it a try)

Also, if another crazy driver hit the car (which is frozen) the car won't go anywhere, so it's not really realistic.

That's not what he wanted. He wants to save wheel rotation.

Link to comment
i understood nothing from what you said. btw this forum is for helping in script not to request codes..

Regards ,,

He wants to do this:

Yeah, I would first try with shaders (but I'm a perfect noobs with shaders) because I think it's possible.

Otherwise I would use an invisible ped to do it. He will just press the forward button and freeze the car element.

But if you use a ped, then the car owner will probably do the carjack animation (even if you destroy the ped in the event onPlayerVehicleEnter, idk give it a try)

Also, if another crazy driver hit the car (which is frozen) the car won't go anywhere, so it's not really realistic.

That's not what he wanted. He wants to save wheel rotation.

Yea i wanna have this

Thanks i will try this function :D but iam a noob scripter, its very defficult to do all thinks of GTA Sa Cleo mod,carmods.....

Link to comment
  • 7 months later...

Ok now on october i got this.

function radExit() 
local Vehicle = getVehicleController(source) 
local radLinks, radRechts = getVehicleComponentRotation(Vehicle, "wheel_lf_dummy"), getVehicleComponentRotation(Vehicle, "wheel_rf_dummy")  
setVehicleComponentRotation(Vehicle, radLinks) 
setVehicleComponentRotation(Vehicle, radRechts) 
    end 
addEventHandler("onVehicleExit", getRootElement(), radExit) 
  
  
  
function radEnter() 
   setVehicleComponentRotation(Vehicle, radLinks) 
   setVehicleComponentRotation(Vehicle, radRechts) 
 end 
addEventHandler("onVehicleEnter", getRootElement(), radEnter) 
  
  
  
  
function radRespawn() 
setVehicleComponentRotation(Vehicle, radLinks) 
setVehicleComponentRotation(Vehicle, radRechts) 
   end 
addEventHandler("onVehicleRespawn", getRootElement(), radRespawn) 
  

but the script dont help to do it, the script do not do anything :shock:

Any ideas?

Link to comment
  
radLinks, radRechts = nil, nil 
function radExit() 
local Vehicle = getVehicleController(source) 
radLinks, radRechts = getVehicleComponentRotation(source, "wheel_lf_dummy"), getVehicleComponentRotation(source, "wheel_rf_dummy") 
setVehicleComponentRotation(source, "wheel_If_dummy", radLinks) 
setVehicleComponentRotation(source, "wheel_rf_dummyr'", adRechts) 
    end 
addEventHandler("onVehicleExit", getRootElement(), radExit) 
  
  
  
function radEnter() 
if not radLinks then return end 
setVehicleComponentRotation(source, "wheel_If_dummy", radLinks) 
setVehicleComponentRotation(source, "wheel_rf_dummyr'", adRechts) 
 end 
addEventHandler("onVehicleEnter", getRootElement(), radEnter) 
  
  
  
  
function radRespawn() 
if not radLinks then return end 
setVehicleComponentRotation(source, "wheel_If_dummy", radLinks) 
setVehicleComponentRotation(source, "wheel_rf_dummyr'", adRechts) 
   end 
addEventHandler("onVehicleRespawn", getRootElement(), radRespawn) 
  
  

Link to comment

@Anubhav

Anubhav

Ok THANKS but it dont work, i think i have to use a other way to get the fix wheel turn back. But nil? if i exit the car he must set the wheel rotation to what i have in that moment.

Watch the video of the Cleo mod, then you know what i mean.

And why u rename the wheel_rf_dummy? It is the name of the right front wheel dummy

did u have a idea to make this? because when i exit the car, the player didnt control the car. How to fix that? :roll:

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...