注:Aimware Crack Lua功能失效无法加载
代码:
local Camera = gui.Reference("World","Camera")
local thirdperson_slider = gui.Slider(Camera, "thirdperson_slider", "平滑第三人称", 150, 0, 500)
local distance = 0
function on_paint()
local screen_width, screen_height = draw.GetScreenSize()
local scx, scy = screen_width * 0.5, screen_height * 0.5
local_player = entities.GetLocalPlayer()
if local_player == nil then
return
end
if not entities.GetLocalPlayer():IsAlive() then
return
end
local multiplier = (1.0 / 0.2) * globals.FrameTime()
if gui.GetValue("world.thirdperson") then
if distance < 1.0 then
distance = ( distance + ( multiplier * ( 1 - distance ) ) )
end
else
distance = 0
end
if distance >= 1.0 then
distance = 1
end
if gui.GetValue("world.thirdperson") then
gui.SetValue("world.thirdpersondist", (thirdperson_slider:GetValue() * distance))
end
end
callbacks.Register("Draw", on_paint)