Search the Community
Showing results for tags 'wheel'.
-
Hello dear friends, first of all, I am writing this text using translate. I apologize to everyone for my bad English. Forgive me if I put the issue in the wrong section. - I want to enlarge the wheels of the vehicles and make camber adjustments and I came across this content in the forum https://forum.multitheftauto.com/topic/92222-custom-wheel/ but the system in this content applies only to the front wheels and it goes underground when the wheel grows and how I will fix these errors from you I want your help, thank you very much in advance. :) Client-Side
-
I tested the Unlimited-Vehicle-Master: https://github.com/alexaxel705/Unlimited-Vehicle/blob/master/server.lua Even though the author makes the Vehicle Type and the Handling of 411 for all cars. But the car might be made with a S.W.A.T wheel size. So the car looks like floating on the ground. Could anyone be able to change the wheel size if I spawn a car?
-
addEventHandler("onClientVehicleStartExit", getRootElement(), function() local x,y,z = getVehicleComponentRotation(source, "wheel_lf_dummy") local x1,y1,z1 = getVehicleComponentRotation(source, "wheel_rf_dummy") outputChatBox(x) -- work print(setVehicleComponentRotation(source, "wheel_lf_dummy", x, y, z) ) -- true setVehicleComponentRotation(source, "wheel_rf_dummy", x1, y1, z1) end) The script has no error. Returns the rotation of the wheel, returns true in the setVehicleComponentRotation but the wheel is not rotated. What is happening? Result I'm looking for:
-
Estou querendo fazer um script que quando clico no carro,me mostre as coordenadas da roda,mas a função getVehicleComponentPosition é somente do lado client e não sei jogar elas pro lado serve
-
Hello everyone! I tried to make custom wheels to vehicles (like tuning element) but i have some problems with code. When the wheel camber angle is not default, the wheel get not good rotations. local createdCustomWheels = {} bindKey("f2", "down", function() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then addCustomWheel(vehicle, 1075, "front") end end ) addEventHandler("onClientPreRender", root, function() for vehicle, value in pairs(createdCustomWheels) do if vehicle and isElement(vehicle) and isElementStreamedIn(vehicle) then local vehicleX, vehicleY, vehicleZ = getElementPosition(vehicle) if value["wheel_lf_dummy"] then local componentX, componentY, componentZ = getVehicleComponentPosition(vehicle, "wheel_lf_dummy") local componentRX, componentRY, componentRZ = getVehicleComponentRotation(vehicle, "wheel_lf_dummy") attachElements(value["wheel_lf_dummy"], vehicle, componentX, componentY, componentZ, componentRX, -15 + componentRY, componentRZ) end if value["wheel_rf_dummy"] then local componentX, componentY, componentZ = getVehicleComponentPosition(vehicle, "wheel_rf_dummy") local componentRX, componentRY, componentRZ = getVehicleComponentRotation(vehicle, "wheel_rf_dummy") attachElements(value["wheel_rf_dummy"], vehicle, componentX, componentY, componentZ, componentRX, -15 + componentRY, componentRZ) end end end end ) function addCustomWheel(vehicle, wheelId, side) if vehicle and wheelId and side then local vehicleX, vehicleY, vehicleZ = getElementPosition(vehicle) if side == "front" then local lfX, lfY, lfZ = getVehicleComponentPosition(vehicle, "wheel_lf_dummy") local rfX, rfY, rfZ = getVehicleComponentPosition(vehicle, "wheel_rf_dummy") setVehicleComponentVisible(vehicle, "wheel_lf_dummy", false) setVehicleComponentVisible(vehicle, "wheel_rf_dummy", false) createdCustomWheels[vehicle] = {} createdCustomWheels[vehicle]["wheel_lf_dummy"] = createObject(wheelId, vehicleX, vehicleY, vehicleZ) createdCustomWheels[vehicle]["wheel_rf_dummy"] = createObject(wheelId, vehicleX, vehicleY, vehicleZ) setElementCollidableWith(createdCustomWheels[vehicle]["wheel_lf_dummy"], vehicle, false) setElementCollidableWith(createdCustomWheels[vehicle]["wheel_rf_dummy"], vehicle, false) setObjectScale(createdCustomWheels[vehicle]["wheel_lf_dummy"], 0.7) setObjectScale(createdCustomWheels[vehicle]["wheel_rf_dummy"], 0.7) attachElements(createdCustomWheels[vehicle]["wheel_lf_dummy"], vehicle, lfX, lfY, lfZ, 0, 0, 0) attachElements(createdCustomWheels[vehicle]["wheel_rf_dummy"], vehicle, rfX, rfY, rfZ, 0, 0, 0) end end end