In lua, I know how to get the name of the weapon in my hand, but I want to know how to get the name of the secondary weapon and the grenade carried, this problem has troubled me for a long time
In lua, I know how to get the name of the weapon in my hand, but I want to know how to get the name of the secondary weapon and the grenade carried, this problem has troubled me for a long time
Cheat.RegisterCallback("draw",function()
local lc = EntityList.GetLocalPlayer()
if not lc then return end
if not lc:GetProp("m_iHealth")==0 then return end
local lcwep = lc:GetProp("m_hMyWeapons")
print(unpack(lcwep))
end)
Cheat.RegisterCallback("draw",function()
local lc = EntityList.GetLocalPlayer()
if not lc then return end
if not lc:GetProp("m_iHealth")==0 then return end
local lcwep = lc:GetProp("m_hMyWeapons")
print(unpack(lcwep))
end)