?
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Credits: Xissayala
Link:
Link:
Пожалуйста, авторизуйтесь для просмотра ссылки.
code_language.lua:
Auto_Peek = Menu.Switch("Quick Peek", "Quick Peek", false)
function setmovement(xz,yz,cmd)
local local_player = EntityList.GetLocalPlayer()
local_player = local_player:GetPlayer()
local current_pos = local_player:GetProp("m_vecOrigin")
local yaw = EngineClient:GetViewAngles().yaw
local vector_forward = {
x = current_pos.x - xz,
y = current_pos.y - yz,
}
local velocity = {
x = -(vector_forward.x * math.cos(yaw / 180 * math.pi) + vector_forward.y * math.sin(yaw / 180 * math.pi)),
y = vector_forward.y * math.cos(yaw / 180 * math.pi) - vector_forward.x * math.sin(yaw / 180 * math.pi),
}
cmd.forwardmove = velocity.x * 15
cmd.sidemove = velocity.y * 15
end;
Cheat.RegisterCallback("prediction", function(cmd)
local localplayer = EntityList.GetLocalPlayer()
local forw = bit.band(cmd.buttons, 8) == 8
local back = bit.band(cmd.buttons, 16) == 16
local righ = bit.band(cmd.buttons, 512) == 512
local left = bit.band(cmd.buttons, 1024) == 1024
local apeek = Menu.FindVar("Other", "Main", "Movement", "Auto Peek"):Get();
local originalpos = localplayer:GetProp("m_vecOrigin")
local OnGround = bit.band(localplayer:GetProp("m_hGroundEntity"), 1);
if OnGround == 1 then -- air check
air = true
else
air = false
end
if apeek == false then
curpos = localplayer:GetProp("m_vecOrigin");
end
if Auto_Peek:Get() == true then
if apeek == true then
if forw == false and back == false and left == false and righ == false and curpos.x ~= originalpos.x and curpos.y ~= originalpos.y and air == false then
setmovement(curpos.x,curpos.y, cmd);
end
end
end
end)
Последнее редактирование: