delta1337 Posted October 28, 2018 Posted October 28, 2018 Hello guys, i want to make a script like in this video, but i dont know how can i switch the fly mode like in hydra, does anybody knows what codes i need to use?
Moderators IIYAMA Posted October 28, 2018 Moderators Posted October 28, 2018 See example: https://wiki.multitheftauto.com/wiki/SetVehicleAdjustableProperty
delta1337 Posted October 28, 2018 Author Posted October 28, 2018 Thank you, ill try it out. Ive tried it out, and after clicking num_8 nothing happend and and after clicking num_2 also nothing happend addCommandHandler("getAdjust",function() if isPedInVehicle(localPlayer) then local adjusted = getVehicleAdjustableProperty(getPedOccupiedVehicle(localPlayer)) if adjusted then outputChatBox(adjusted) else outputChatBox("Sorry, but your vehicle doesn't have any adjustable properties!") end else outputChatBox("Sorry, but you have to be in a vehicle to use this command!") end end) bindKey('num_8','down',function() if getPedOccupiedVehicle(localPlayer) and getElementModel(getPedOccupiedVehicle(localPlayer))==511 then local car = getPedOccupiedVehicle(localPlayer) setVehicleAdjustableProperty(car,2740) outputChatBox('work') end end) bindKey('num_2','down',function() if getPedOccupiedVehicle(localPlayer) and getElementModel(getPedOccupiedVehicle(localPlayer))==511 then local car = getPedOccupiedVehicle(localPlayer) setVehicleAdjustableProperty(car,1212) outputChatBox('work') end end) addEventHandler('onClientVehicleEnter',root,function() if getElementModel(localPlayer)==511 then setVehicleAdjustableProperty(source,1212) end end)
Moderators IIYAMA Posted October 28, 2018 Moderators Posted October 28, 2018 (edited) What is the returned value of the function? @delta1337 Edited October 28, 2018 by IIYAMA
delta1337 Posted October 28, 2018 Author Posted October 28, 2018 outputChatBox("Sorry, but you have to be in a vehicle to use this command!") Sorry, but you have to be in a vehicle to use this command!
Moderators IIYAMA Posted October 28, 2018 Moderators Posted October 28, 2018 55 minutes ago, delta1337 said: outputChatBox("Sorry, but you have to be in a vehicle to use this command!") Sorry, but you have to be in a vehicle to use this command! lol 1
Dimos7 Posted October 30, 2018 Posted October 30, 2018 Note: Client side IsPedInVehicle can be unreliable. Solution is to use: not getPedOccupiedVehicle(ped)
Moderators IIYAMA Posted October 30, 2018 Moderators Posted October 30, 2018 56 minutes ago, delta1337 said: Any ideas? Cause im out I do not understand your problem. If you are not inside of the vehicle, how else do you want to figure out which vehicle you want to modify? The current code clearly is build to support the vehicle owner only.
Moderators IIYAMA Posted October 31, 2018 Moderators Posted October 31, 2018 56 minutes ago, delta1337 said: Why does it works only in hydra? On 28/10/2018 at 20:57, delta1337 said: local car = getPedOccupiedVehicle(localPlayer) On 28/10/2018 at 20:57, delta1337 said: if getPedOccupiedVehicle(localPlayer) and getElementModel(getPedOccupiedVehicle(localPlayer))==511 then Because it is programmed like that. 511 is the vehicle ID of a hydra. https://wiki.multitheftauto.com/wiki/getPedOccupiedVehicle Feel free to program it to how you think it is suppose to work.
delta1337 Posted October 31, 2018 Author Posted October 31, 2018 511 is the beagle id but if i changed it to 520 (hydra id) then it worked
Moderators IIYAMA Posted November 1, 2018 Moderators Posted November 1, 2018 11 hours ago, delta1337 said: 511 is the beagle id but if i changed it to 520 (hydra id) then it worked I based that information on your code, as you said it only works for the hydra. The hydra does have an adjustable property, a beagle does not. That is just a feature from GTA. Yet, I am very sure that somebody can script this effect for the beagle as well. Just it probably cost a lot of $...
delta1337 Posted November 1, 2018 Author Posted November 1, 2018 Okay, i found other option to make it fly like that, but my next question is how can i make the heli rotors switch like that? I mean the textures
Moderators IIYAMA Posted November 1, 2018 Moderators Posted November 1, 2018 2 hours ago, delta1337 said: Okay, i found other option to make it fly like that, but my next question is how can i make the heli rotors switch like that? I mean the textures I still have no clue which one of the two you mean. Heli rotors switch (90-degree) = model ( ask somebody who edits GTA models ) Heli rotors animation (360-degree propeller rotation) = texture + shader ( ask somebody who create shaders, they are easy to find if you search for shader resources )
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