-
Автор темы
- #1
C++:
function C_BasePlayer:GetWeapon(weapon)
if (self) then
local Weapon = self:GetActiveWeapon()
if (Weapon) then
local WeaponID = Weapon:GetWeaponID()
return ({
["id"] = WeaponID,
["nextattack"] = Weapon:GetProp("m_flNextPrimaryAttack"),
["inaccuracy"] = Weapon:GetInaccuracy(Weapon),
["gun"] = Weapon:IsGun(),
["reloading"] = Weapon:IsReloading(),
["nades"] = Weapon:IsGrenade(),
["knife"] = Weapon:IsKnife(),
["rifle"] = Weapon:IsRifle(),
["sniper"] = Weapon:IsSniper(),
["pistol"] = Weapon:IsPistol(),
["awp"] = WeaponID == 9,
["scout"] = WeaponID == 40,
["auto"] = WeaponID == 11 or WeaponID == 38,
["deagle"] = WeaponID == 1,
["revolver"] = WeaponID == 64,
["zeus"] = WeaponID == 31,
["c4"] = WeaponID == 48
})[weapon:lower()] or false
end
end
return false
end