Salve com qualquer nome, mas salve com o formato .lua e ponha na pasta do moonloader quem quiser testar.
Código: Selecionar tudo
script_name('curvas-fechadas-com-bikes')
script_author("Um Geek");
script_url("https://gta-geek.blogspot.com.br/");
-- SETTINGS --------------------------
local SPIN_Z = 0.075
local STEER_ANG = 0.25
--------------------------------------
local anim = {
IFP = "BIKED",
LEFT = "BIKEd_Left",
RIGHT = "BIKEd_Right",
start = 0.8,
}
local memory = require("memory")
function main()
while true do
wait(10)
if isButtonPressed(PLAYER_HANDLE, 6) then
if isCharSittingInAnyCar(PLAYER_PED) then -- bike
local vehicle = getCarCharIsUsing(PLAYER_PED)
local pointer = getCarPointer(vehicle)
if readMemory(pointer+1424,1,false) == 9 and memory.getfloat(pointer+1180,false) > 0.1 then
local steer = memory.getfloat(pointer + 1172 ,false)
if not hasAnimationLoaded(anim.IFP) then
requestAnimation(anim.IFP)
loadAllModelsNow()
end
if steer > STEER_ANG then
memory.setfloat(pointer+88,SPIN_Z,false)
taskPlayAnimSecondary(PLAYER_PED,anim.LEFT,anim.IFP,4.0,false,false,false,false,-1)
setCharAnimCurrentTime(PLAYER_PED,anim.LEFT,anim.start)
elseif steer < (STEER_ANG*-1.0) then
memory.setfloat(pointer+88,SPIN_Z*-1.0,false)
taskPlayAnimSecondary(PLAYER_PED,anim.RIGHT,anim.IFP,4.0,false,false,false,false,-1)
setCharAnimCurrentTime(PLAYER_PED,anim.RIGHT,anim.start)
end
end
end
end
end
end
Versão cleo com animação configurada em ini para quem quiser tentar editar uma animação ou testar outras.