452 for (
int i = 0;
i < GetMuzzleCount();
i++)
458 for (
int i = 0;
i < GetMuzzleCount();
i++)
bool IsChamberFull(int idx)
proto native ItemOptics GetAttachedOptics()
proto bool GetInternalMagazineCartridgeInfo(int muzzleIndex, int cartridgeIndex, out float ammoDamage, out string ammoTypeName)
get info about the cartridge in the internal magazine of a muzzle
proto bool PopCartridgeFromChamber(int muzzleIndex, out float ammoDamage, out string ammoTypeName)
removes cartridge from chamber
proto native int GetTotalMaxCartridgeCount(int muzzleIndex)
proto native owned string GetCurrentModeName(int muzzleIndex)
proto native bool CreateRound(int muzzleIndex)
proto native bool StepZeroingUp(int muzzleIndex=0)
sets zeroing to next defined (respective to current) value in zeroing config array
proto native bool DryDryFire(int muzzleIndex)
proto native void SetMuzzleMode(int muzzleIndex, int modeIndex)
proto native owned string GetRandomChamberableAmmoTypeName(int muzzleIndex)
proto native int GetStepZeroing(int muzzleIndex=0)
returns position of currently used value in zeroing config array
proto native bool DryFire(int muzzleIndex)
proto native void Synchronize()
Force synchronizes the weapon state from Server to Client. Use with caution.
proto native float GetZoomInit(int muzzleIndex)
gets FOV value, when entering optics
proto native bool SetStepZoom(int step)
sets zoom to fov value defined at given position in zoom fov config array
proto native int GetInternalMagazineMaxCartridgeCount(int muzzleIndex)
proto native bool IsFlashlightOn()
query state of flashlight
proto native bool IsChamberEjectable(int muzzleIndex)
detects presence of ejectable cartridge in muzzle's chamber
proto native void EffectBulletHide(int muzzleIndex)
reset effect cartridge in weapon
proto native bool IsChamberFull(int muzzleIndex)
maximum number of cartridges in chamber
proto native float GetZoomMax(int muzzleIndex)
gets FOV maximum
proto native int GetStepZoom()
returns position of currently used value in zoom config array
proto native bool CanAttachMagazine(int muzzleIndex, Magazine mag)
query if a magazine can be attached to weapon
proto native bool ZoomOut()
moves current zoom by 1% down
proto bool GetCartridgeInfo(int muzzleIndex, out float ammoDamage, out string ammoTypeName)
get info about the cartridge in the chamber of a muzzle
proto native bool AttachMagazine(int muzzleIndex, Magazine mag)
perform attachment of a magazine to weapon
proto native int GetCurrentMuzzle()
proto native bool StepZoomIn()
sets zoom to next defined (respective to current) value in zoom fov config array
proto native bool IsChamberJammed(int muzzleIndex)
detects presence of damaged cartridge in chamber
proto native int GetInternalMagazineCartridgeCount(int muzzleIndex)
proto native int GetTotalCartridgeCount(int muzzleIndex)
proto bool PopCartridgeFromInternalMagazine(int muzzleIndex, out float ammoDamage, out string ammoTypeName)
removes top-most cartridge from internal magazine
proto native void SelectionBulletShow()
proto native bool SetStepZeroing(int muzzleIndex, int step)
proto native bool HasInternalMagazine(int muzzleIndex)
proto native bool ExitOptics()
switches out of optics mode (if possible)
proto native void SelectionMagazineHide()
proto native bool EjectCasing(int muzzleIndex)
ejects casing from chamber
proto native int GetMagazineTypeCount(int muzzleIndex)
proto native owned string GetMaxMagazineTypeName(int muzzleIndex)
proto native bool SetZoom(float percent)
sets current zoom (in %)
proto native bool ZoomIn()
moves current zoom by 1% up
proto native bool IsChamberFiredOut(int muzzleIndex)
detects presence of fired out casing in chamber
proto native float GetZeroingDistanceZoomMin(int muzzleIndex)
Gets Zeroing distance at opticsZoomMin.
proto native bool GetCurrentModeAutoFire(int muzzleIndex)
proto native int GetSlotFromMuzzleIndex(int muzzleIndex)
conversion muzzleIndex -> slotId
proto native bool FlashlightOff()
attempt to turn off flashlight
void StepZeroingDownAllMuzzles()
proto native float GetCurrentZeroing(int muzzleIndex=0)
returns currently used value of zeroing in config array of weapon or attached optics
proto native float GetZoomMin(int muzzleIndex)
gets FOV minimum
proto native float GetZeroingDistanceZoomMax(int muzzleIndex)
Gets Zeroing distance at opticsZoomMax.
proto native bool TestAttachMagazine(int muzzleIndex, Magazine mag, bool do_occupancy_test, bool do_script_check)
query if a magazine can be attached to weapon
proto native float GetZeroingClamp(int muzzleIndex=0)
returns maximum allowed discrete distance for the muzzle. Limits attached optics zeroing only!...
bool IsChamberFullEx(int muzzleIndex)
bool IsInternalMagazineFull(int muzzleIndex)
maximum number of cartridges in internal magazine
proto native bool Fire(int muzzleIndex, vector pos, vector dir, vector speed)
proto native int GetCurrentMode(int muzzleIndex)
proto native void SelectionMagazineShow()
proto native bool StepZeroingDown(int muzzleIndex=0)
sets zeroing to previous (respective to current) defined value in zeroing config array
proto native bool CanFire(int muzzleIndex)
query whether the weapon can be fired or not
proto native bool PushCartridgeToChamber(int muzzleIndex, float ammoDamage, string ammoTypeName)
push cartridge to chamber
proto native Magazine GetMagazine(int muzzleIndex)
proto native owned string GetChamberAmmoTypeName(int muzzleIndex)
proto native bool IsChamberEmpty(int muzzleIndex)
detects empty chamber
proto native bool FlashlightOn()
attempt to turn on flashlight
proto native int GetMuzzleCount()
proto native void SetGroundAnimFrameIndex(int groundAnimFrameIndex)
sets animation frame for ground state when animation is specified in config
proto native void SelectionBulletHide()
proto native int GetMuzzleModeCount(int muzzleIndex)
proto native int GetCurrentModeBurstSize(int muzzleIndex)
proto native float GetZoom()
returns current percentage of zoom
proto native float GetReloadTime(int muzzleIndex)
defines time from one shot to another
proto native bool EnterOptics()
switches to optics mode if possible
proto native void GetCameraPoint(int muzzleIndex, out vector pos, out vector dir)
gets camera position & direction in model space of weapon entity
proto native void SetNextMuzzleMode(int muzzleIndex)
proto native bool IsInOptics()
is weapon in optics mode or not
proto native UnderSlugLauncher GetAttachedLauncher()
proto native void SetCurrentMode(int muzzleIndex, int mode)
proto native bool PushCartridgeToInternalMagazine(int muzzleIndex, float ammoDamage, string ammoTypeName)
push cartridge into internal magazine
proto native void EffectBulletShow(int muzzleIndex, float dmg, string type)
push effect cartridge to Weapon
void StepZeroingUpAllMuzzles()
proto native owned string GetChamberedCartridgeMagazineTypeName(int muzzleIndex)
query the type of magazine the cartridge can be unloaded to
proto native owned string GetRandomMagazineTypeName(int muzzleIndex)
proto native bool StepZoomOut()
sets zoom to previous (respective to current) defined value in zoom fov config array
proto native void SetCurrentMuzzle(int muzzleIndex)
sets index of active muzzle
proto native bool CanChamberFromMag(int muzzleIndex, Magazine mag)
query if a bullet from magazine can be loaded into chamber
proto native ItemSuppressor GetAttachedSuppressor()
script counterpart to engine's class Weapon