-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
This is to get your Local Anti Aim states f.e "Anti Aim Builders". it's a compact version and will return states in numbers.
Use this code to learn and don't just copy paste and sell it in your lua.
If you like the code or maybe learnt something new please give a reaction, thanks in advanced.
Use this code to learn and don't just copy paste and sell it in your lua.
Function:
-- Code created by ak47.
local FLAGS = {
ON_GROUND = 257,
DUCKING = 263,
IN_AIR = 256,
IN_AIR_DUCKING = 262,
}
local STATES = {
STAND = 1,
WALK = 2,
SLOW_WALK = 3,
DUCK = 4,
AIR = 5,
AIR_DUCK = 6,
}
local function anti_aim_states()
local lp = entity.get_local_player()
local velocity = lp.m_vecVelocity:length2d()
local flags = lp.m_fFlags
local state_table = {
[FLAGS.ON_GROUND] = {
[velocity < 3] = STATES.STAND,
[velocity > 3 and velocity < 81] = STATES.SLOW_WALK,
[velocity > 81] = STATES.WALK,
},
[FLAGS.DUCKING] = STATES.DUCK,
[FLAGS.IN_AIR] = STATES.AIR,
[FLAGS.IN_AIR_DUCKING] = STATES.AIR_DUCK,
}
local state = state_table[flags]
if state then
if type(state) == "table" then
for condition, value in pairs(state) do
if condition then
return value
end
end
else
return state
end
end
end
Code Example:
events.createmove(function()
if anti_aim_states() == 1 then
print('Your standing on the ground')
end
end)
Последнее редактирование: