-
Автор темы
- #1
короче при загрузке скрипта выдаёт ошибку:
[lua] loading script Defensive_AA_1_2
[lua] syntax_error: fatality/scripts/Defensive_AA_1_2.lua:119: 'end' expected (to close 'function' at line 73) near '<eof>'
[lua] Script error: Unable to initialize script.
(я захотел напастить деф аа и сделать типо чтоб можно было отдельно включить defensive in Crouch )
при загрузке скрипта выдаёт ошибку
[lua] syntax_error: fatality/scripts/Defensive_AA_1_2.lua:72: '<eof>' expected near 'end'
[lua] Script error: Unable to initialize script.
вот код:
[lua] loading script Defensive_AA_1_2
[lua] syntax_error: fatality/scripts/Defensive_AA_1_2.lua:119: 'end' expected (to close 'function' at line 73) near '<eof>'
[lua] Script error: Unable to initialize script.
(я захотел напастить деф аа и сделать типо чтоб можно было отдельно включить defensive in Crouch )
Код:
local lerp = function(precenteges, start, destination) return start+(destination-start)*precenteges end
function get_velocity()
if not engine.is_in_game() then return end
local first_velocity = entities.get_entity(engine.get_local_player()):get_prop("m_vecVelocity[0]")
local second_velocity = entities.get_entity(engine.get_local_player()):get_prop("m_vecVelocity[1]")
local speed = math.floor(math.sqrt(first_velocity*first_velocity+second_velocity*second_velocity))
return speed
end
function get_state(speed)
if not engine.is_in_game() then return end
if not entities.get_entity(engine.get_local_player()):is_alive() then return end
local flags = entities.get_entity(engine.get_local_player()):get_prop("m_fFlags")
if bit.band(flags, 1) == 1 then
if bit.band(flags, 4) == 4 or info.fatality.in_fakeduck then
return 4 -- Crouching
else
if speed <= 3 then
return 1 -- Standing
else
if info.fatality.in_slowwalk then
return 3 -- Slowwalk
else
return 2 -- Moving
end
end
end
elseif bit.band(flags, 1) == 0 then
if bit.band(flags, 4) == 4 then
return 5 -- Air
else
return 6 -- Air Crouch
end
end
end
local enabled, onairrrr = gui.add_multi_combo("defensive aa", "lua>tab b", {"defensive on peek", "defensive on air"})
local enabled, crch = gui.add_multi_combo("defensive on", "lua>tab a", {"defensive on crouch, on air crouch", "defensive on airb"})
local dt = gui.get_config_item ( "rage>aimbot>aimbot>Double Tap" )
local hs = gui.get_config_item ( "rage>aimbot>aimbot>Hide shot" )
local fl_frozen = bit.lshift ( 1, 6 )
local in_attack = bit.lshift ( 1, 0 )
local in_attack2 = bit.lshift ( 1, 11 )
local checker = 0
local defensive = false
function on_create_move ( cmd )
local me = entities.get_entity ( engine.get_local_player ( ) )
if not me or not me:is_valid ( ) then
return
end
local tickbase = me:get_prop ( "m_nTickBase" )
defensive = math.abs ( tickbase - checker ) >= 2
checker = math.max ( tickbase, checker or 0 )
end
function on_player_spawn ( event )
if engine.get_player_for_user_id ( event:get_int ( 'userid' ) ) == engine.get_local_player ( ) then
checker = 0
end
end
function on_run_command ( cmd )
local view_angles = cmd:get_view_angles()
local state = get_state(get_velocity())
if not enabled:get_bool ( ) or not dt:get_bool ( ) and not hs:get_bool ( ) then
return
end
local buttons = cmd:get_buttons ( )
if bit.band ( buttons, in_attack ) == in_attack or bit.band ( buttons, in_attack2 ) == in_attack2 then
return
end
local me = entities.get_entity ( engine.get_local_player ( ) )
if not me or not me:is_valid ( ) then
return
end
local flags = me:get_prop ( 'm_fFlags' )
if bit.band ( flags, fl_frozen ) == fl_frozen then
return
end
if info.fatality.lag_ticks > 1 then
return
end
if defensive then
cmd:set_view_angles ( utils.random_int ( -78, 30 ), utils.random_int ( 360, 1 ), 0 )
end
local jitterrange = gui.get_config_item("rage>anti-aim>Angles>Jitter range"):get_int()
local view_angles = cmd:get_view_angles()
if onairrrr:get_bool() then
if state == 6 then
cmd:set_view_angles ( utils.random_int ( -89, 100 ), utils.random_int ( -360, 360 ), 0 )
end
local jitterrange = gui.get_config_item("rage>anti-aim>Angles>Jitter range"):get_int()
local view_angles = cmd:get_view_angles()
if crch:get_bool() then
if state == 5 then
cmd:set_view_angles ( utils.random_int ( -89, 89 ), utils.random_int ( -360, 360 ), 0 )
end
if state == 4 then
cmd:set_view_angles ( utils.random_int ( -89, 100 ), utils.random_int ( -100, 260 ), 0 )
end
end
end
[lua] syntax_error: fatality/scripts/Defensive_AA_1_2.lua:72: '<eof>' expected near 'end'
[lua] Script error: Unable to initialize script.
вот код:
Последнее редактирование: