I did it with the functions you said but the ped is spinning so fast how can I slow it down
tiklandiX = 0
a = 180
addEventHandler("onClientCursorMove", getRootElement(),
function(_, _, x, y)
if peds then
if pedCheck == true then
yeniX = x - tiklandiX
px,py,pz = getElementRotation (peds)
if a > 360 then
a = 0
elseif a < 0 then
a = 0
end
if yeniX >= 0 then
a = a + 1
setElementRotation(peds,0,0,pz + (x/2))
outputChatBox(x)
else
a = a - 1
setElementRotation(peds,0,0,pz + (x/2))
outputChatBox(x)
end
end
end
end)
function addLabelOnClick(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement)
if (clickedElement) then
pedCheck = true
tiklandiX = absoluteX
else
pedCheck = false
end
end
addEventHandler("onClientClick", root, addLabelOnClick)