4.4. Запрещено размещение темы в несоответствующий раздел. Если нужный раздел отсутствует, напишите Администрации проекта просьбу о создании нового раздела.
переделайте эту луа на никс на в3
local g_entity_list = se.create_interface("client.dll", "VClientEntityList003")
local g_model_info = se.create_interface("engine.dll", "VModelInfoClient004")
local FRAME_NET_UPDATE_POSTDATAUPDATE_START = 2
local player_vtable = ffi.cast("int*", client.find_pattern("client.dll", "55 8B EC 83 E4 F8 83 EC 18 56 57 8B F9 89 7C 24 0C") + 0x47)[0]
local set_model_index_fn = ffi.cast("void(__thiscall*)(int, int)", ffi.cast("int*", player_vtable + 300)[0])
local get_model_index_fn = ffi.cast("const int(__thiscall*)(int, const char*)", ffi.cast("int*", ffi.cast("int*", g_model_info)[0] + 8)[0])
local paths = {
-- leet
"models/player/custom_player/legacy/tm_leet_variantf.mdl",
"models/player/custom_player/legacy/tm_leet_varianti.mdl",
"models/player/custom_player/legacy/tm_leet_varianth.mdl",
"models/player/custom_player/legacy/tm_leet_variantg.mdl",
-- fbi
"models/player/custom_player/legacy/ctm_fbi_variantb.mdl",
"models/player/custom_player/legacy/ctm_fbi_varianth.mdl",
"models/player/custom_player/legacy/ctm_fbi_variantg.mdl",
"models/player/custom_player/legacy/ctm_fbi_variantf.mdl",
-- st6
"models/player/custom_player/legacy/ctm_st6_variante.mdl",
"models/player/custom_player/legacy/ctm_st6_variantm.mdl",
"models/player/custom_player/legacy/ctm_st6_variantg.mdl",
"models/player/custom_player/legacy/ctm_st6_variantk.mdl",
"models/player/custom_player/legacy/ctm_st6_varianti.mdl",
"models/player/custom_player/legacy/ctm_st6_variantj.mdl",
"models/player/custom_player/legacy/ctm_st6_variantl.mdl",
-- swat
"models/player/custom_player/legacy/ctm_swat_variante.mdl",
"models/player/custom_player/legacy/ctm_swat_variantf.mdl",
"models/player/custom_player/legacy/ctm_swat_variantg.mdl" ,
"models/player/custom_player/legacy/ctm_swat_varianth.mdl",
"models/player/custom_player/legacy/ctm_swat_varianti.mdl",
"models/player/custom_player/legacy/ctm_swat_variantj.mdl",
-- balkan
"models/player/custom_player/legacy/tm_balkan_varianti.mdl",
"models/player/custom_player/legacy/tm_balkan_variantf.mdl",
"models/player/custom_player/legacy/tm_balkan_varianth.mdl",
"models/player/custom_player/legacy/tm_balkan_variantg.mdl",
"models/player/custom_player/legacy/tm_balkan_variantj.mdl",
"models/player/custom_player/legacy/tm_balkan_variantk.mdl",
"models/player/custom_player/legacy/tm_balkan_variantl.mdl",
-- sas
"models/player/custom_player/legacy/ctm_sas_variantf.mdl",
-- phoenix
"models/player/custom_player/legacy/tm_phoenix_varianth.mdl",
"models/player/custom_player/legacy/tm_phoenix_variantf.mdl",
"models/player/custom_player/legacy/tm_phoenix_variantg.mdl",
"models/player/custom_player/legacy/tm_phoenix_varianti.mdl",
-- proffesional
"models/player/custom_player/legacy/tm_professional_varf.mdl",
"models/player/custom_player/legacy/tm_professional_varf1.mdl",
"models/player/custom_player/legacy/tm_professional_varf2.mdl",
"models/player/custom_player/legacy/tm_professional_varf3.mdl",
"models/player/custom_player/legacy/tm_professional_varf4.mdl",
"models/player/custom_player/legacy/tm_professional_varg.mdl",
"models/player/custom_player/legacy/tm_professional_varh.mdl",
"models/player/custom_player/legacy/tm_professional_vari.mdl",
"models/player/custom_player/legacy/tm_professional_varj.mdl"
}
local names = {
-- leet
"The Elite Mr. Muhlik | Elite Crew",
"Prof. Shahmat | Elite Crew",
"Osiris | Elite Crew",
"Ground Rebel | Elite Crew",
-- fbi
"Special Agent Ava | FBI",
"Michael Syfers | FBI Sniper",
"Markus Delrow | FBI HRT",
"Operator | FBI SWAT",
-- st6
"Seal Team 6 Soldier | NSWC SEAL",
"'Two Times' McCoy | USAF TACP",
"Buckshot | NSWC SEAL",
"3rd Commando Company | KSK",
"Lt. Commander Ricksaw | NSWC SEAL",
"'Blueberries' Buckshot | NSWC SEAL",
"'Two Times' McCoy | TACP Cavalry",
-- swat
"Cmdr. Mae 'Dead Cold' Jamison | SWAT",
"1st Lieutenant Farlow | SWAT",
"John 'Van Healen' Kask | SWAT",
"Bio-Haz Specialist | SWAT",
"Sergeant Bombson | SWAT",
"Chem-Haz Specialist | SWAT",
-- balkan
"Maximus | Sabre",
"Dragomir | Sabre",
"'The Doctor' Romanov | Sabre",
"Rezan The Ready | Sabre",
"Blackwolf | Sabre",
"Rezan the Redshirt | Sabre",
"Dragomir | Sabre Footsoldier",
-- sas
"B Squadron Officer | SAS",
-- phoenix
"Soldier | Phoenix",
"Enforcer | Phoenix",
"Slingshot | Phoenix",
"Street Soldier | Phoenix",
-- proffesional
"Sir Bloody Miami Darryl | The Professionals",
"Sir Bloody Silent Darryl | The Professionals",
"Sir Bloody Skullhead Darryl | The Professionals",
"Sir Bloody Darryl Royale | The Professionals",
"Sir Bloody Loudmouth Darryl | The Professionals",
"Safecracker Voltzmann | The Professionals",
"Little Kev | The Professionals",
"Number K | The Professionals",
"Getaway Sally | The Professionals"
}
local lua_agent = ui.add_combo_box("agent", "lua_agent", names, 0)
client.register_callback("frame_stage_notify", function(stage)
if stage ~= FRAME_NET_UPDATE_POSTDATAUPDATE_START then return end
local local_player = entitylist.get_local_player()
if local_player == nil then return end
local model_idx = get_model_index_fn(g_model_info, paths[lua_agent:get_value() + 1])
set_model_index_fn(local_player:get_address(), model_idx)
end)
client.register_callback("unload", function()
clientstate.force_full_update()
end)