Начинающий
- Статус
- Оффлайн
- Регистрация
- 24 Окт 2023
- Сообщения
- 6
- Реакции
- 0
Была давно луашка в fatality на эффект electric sparks и видел где то месяц 1-3 назад один тип написал ли есть луашка держите недавно вспомнил про нее и переписал
print(" _____________________________________ ")
print("| ElectricSpark |")
print("| from fatality lua |")
print("| Coder: engine.dll |")
print("|_____________________________________|")
local ffi = require("ffi")
local enable = ui.new_checkbox("VISUALS", "Effects", "- ElectricSpark -")
local only_local = ui.new_checkbox("VISUALS", "Effects", "Only localplayer")
local radius = ui.new_slider("VISUALS", "Effects", "Radius", 3, 10, 3)
local length = ui.new_slider("VISUALS", "Effects", "Length", 1, 10, 5)
ffi.cdef[[
typedef struct {
float x;
float y;
float z;
} Vector;
typedef void(__fastcall* FX_ElectricSparkFn)(const Vector*, int, int, const Vector*);
]]
local sig = client.find_signature("client.dll", "\x55\x8B\xEC\x83\xEC\x3C\x53\x8B\xD9\x89\x55\xFC\x8B\x0D\xCC\xCC\xCC\xCC\x56\x57")
local FX_ElectricSpark = ffi.cast("FX_ElectricSparkFn", sig)
local vec3 = ffi.new("Vector")
local QAngle = ffi.new("Vector")
QAngle.x, QAngle.y, QAngle.z = 0, 0, 0
client.set_event_callback("bullet_impact", function(e)
if not ui.get(enable) then return end
local a = ui.get(radius)
local b = ui.get(length)
vec3.x = e.x
vec3.y = e.y
vec3.z = e.z
if ui.get(only_local) then
local lp = entity.get_local_player()
if not lp then return end
local pr = entity.get_player_resource()
local me_uid = -1
if pr ~= nil then
me_uid = entity.get_prop(pr, "m_iUserID", lp) or -1
end
if e.userid ~= me_uid then return end
end
FX_ElectricSpark(vec3, a, b, QAngle)
end)