MatreN Posted September 19, 2019 Share Posted September 19, 2019 (edited) How do I turn an infernus 360 degrees? Edited September 19, 2019 by MatreN Link to comment
Lachuks Posted September 19, 2019 Share Posted September 19, 2019 Wtf is wrong with you dude? Use wiki or just google it. https://wiki.multitheftauto.com/wiki/SetElementRotation Link to comment
Administrators Tut Posted September 19, 2019 Administrators Share Posted September 19, 2019 12 minutes ago, Emix said: Wtf is wrong with you dude? Use wiki or just google it. https://wiki.multitheftauto.com/wiki/SetElementRotation Why bother, he's asking for help. Nothing to shame him for. 1 Link to comment
Moderators IIYAMA Posted September 19, 2019 Moderators Share Posted September 19, 2019 (edited) 5 hours ago, MatreN said: How do I turn an infernus 360 degrees? You can also change the rotate (velocity) with this function: https://wiki.multitheftauto.com/wiki/SetElementAngularVelocity But for exact 360, you will need the setElementRotation function. It just depends on what you are going to make. Edited September 19, 2019 by IIYAMA Link to comment
MatreN Posted September 19, 2019 Author Share Posted September 19, 2019 2 hours ago, IIYAMA said: You can also change the rotate (velocity) with this function: https://wiki.multitheftauto.com/wiki/SetElementAngularVelocity But for exact 360, you will need the setElementRotation function. It just depends on what you are going to make. I'll make a showroom-style system. Link to comment
Lachuks Posted September 20, 2019 Share Posted September 20, 2019 (edited) 13 hours ago, Tut said: Why bother, he's asking for help. Nothing to shame him for. I understand that but cmon... just googling "mta rotation" first result will be the link i gave him. K nvm. Im sorry if that was too rude ftom my side Edited September 20, 2019 by Emix 1 Link to comment
Moderators IIYAMA Posted September 20, 2019 Moderators Share Posted September 20, 2019 11 hours ago, MatreN said: I'll make a showroom-style system. A small example/hack to rotate (multiple) vehicles. With very little code. This code is untested local rotationElement = createElement("rotationElement") local duration = 1000 addEventHandler("onClienRender", root, function () setElementRotation(rotationElement, 0,0, (getTickCount() % duration) / duration * 360 ) end) local vehicle1 = createVehicle(--[[ fill in]]) setElementParent(vehicle1, rotationElement) local vehicle2 = createVehicle(--[[ fill in]]) setElementParent(vehicle2, rotationElement) local vehicle3 = createVehicle(--[[ fill in]]) setElementParent(vehicle3, rotationElement) setElementFrozen(rotationElement, true) 1 Link to comment
MatreN Posted September 20, 2019 Author Share Posted September 20, 2019 local rotationElement = createElement("rotationElement") local duration = 1000 addEventHandler("onClienRender", root, function () setElementRotation(rotationElement, 0,0, (getTickCount()%20)/30*360) -- Duration Araba Dönüş Hızı end) local vehicle1 = createVehicle(2500.1000976563, -1662.5999755859, 13.199999809265) setElementParent(vehicle1, rotationElement) local vehicle2 = createVehicle(2499.8999023438, -1673, 13.199999809265) setElementParent(vehicle2, rotationElement) local vehicle3 = createVehicle(2491.6999511719, -1667.5999755859, 13.10000038147) setElementParent(vehicle3, rotationElement) setElementFrozen(rotationElement, false) I don't know if I did it right, but the cars don't turn 360 degrees. Link to comment
iiv03 Posted September 20, 2019 Share Posted September 20, 2019 23 minutes ago, MatreN said: local rotationElement = createElement("rotationElement") local duration = 1000 addEventHandler("onClienRender", root, function () setElementRotation(rotationElement, 0,0, (getTickCount()%20)/30*360) -- Duration Araba Dönüş Hızı end) local vehicle1 = createVehicle(2500.1000976563, -1662.5999755859, 13.199999809265) setElementParent(vehicle1, rotationElement) local vehicle2 = createVehicle(2499.8999023438, -1673, 13.199999809265) setElementParent(vehicle2, rotationElement) local vehicle3 = createVehicle(2491.6999511719, -1667.5999755859, 13.10000038147) setElementParent(vehicle3, rotationElement) setElementFrozen(rotationElement, false) I don't know if I did it right, but the cars don't turn 360 degrees. are you talk about 360 auto ? or only one? Link to comment
Moderators IIYAMA Posted September 20, 2019 Moderators Share Posted September 20, 2019 (edited) 1 hour ago, MatreN said: local rotationElement = createElement("rotationElement") local duration = 1000 addEventHandler("onClienRender", root, function () setElementRotation(rotationElement, 0,0, (getTickCount()%20)/30*360) -- Duration Araba Dönüş Hızı end) local vehicle1 = createVehicle(2500.1000976563, -1662.5999755859, 13.199999809265) setElementParent(vehicle1, rotationElement) local vehicle2 = createVehicle(2499.8999023438, -1673, 13.199999809265) setElementParent(vehicle2, rotationElement) local vehicle3 = createVehicle(2491.6999511719, -1667.5999755859, 13.10000038147) setElementParent(vehicle3, rotationElement) setElementFrozen(rotationElement, false) I don't know if I did it right, but the cars don't turn 360 degrees. Clientside? Btw you are missing an argument: (model) createVehicle ( int model, float x, float y, float z Edited September 20, 2019 by IIYAMA Link to comment
MatreN Posted September 20, 2019 Author Share Posted September 20, 2019 (int model) will be replaced with vehicle name? Link to comment
iiv03 Posted September 20, 2019 Share Posted September 20, 2019 1 hour ago, MatreN said: (int model) will be replaced with vehicle name? just write in (int model) id vehicle https://wiki.multitheftauto.com/wiki/Vehicle_IDs createVehicle ( 411, float x, float y, float z Link to comment
MatreN Posted September 20, 2019 Author Share Posted September 20, 2019 @xFabel Thanks Bro ( ͡°◡ ͡° ) Link to comment
Moderators IIYAMA Posted September 21, 2019 Moderators Share Posted September 21, 2019 13 hours ago, MatreN said: (int model) will be replaced with vehicle name? Is your issue now solved with xFabel his explanation? You can convert names to id's with this function: https://wiki.multitheftauto.com/wiki/GetVehicleModelFromName local model = getVehicleModelFromName ("bandito") if model then -- is there an id based on that name? end 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