DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Weapon.c
См. документацию.
1
4class Weapon extends InventoryItemSuper
5{
6 override bool IsWeapon() { return true; }
7
11 proto native void Synchronize();
12
16 proto native int GetMuzzleCount();
17
23 //proto native int GetMuzzleIndexFromMagazineSlot (int magazineSlotId);
24
30 proto native int GetSlotFromMuzzleIndex(int muzzleIndex);
31
35 proto native int GetCurrentMuzzle();
36
41 proto native void SetCurrentMuzzle(int muzzleIndex);
42
43 proto native int GetMuzzleModeCount(int muzzleIndex);
44 proto native void SetMuzzleMode(int muzzleIndex, int modeIndex);
45 proto native void SetNextMuzzleMode(int muzzleIndex);
46 proto native int GetCurrentModeBurstSize(int muzzleIndex);
47 proto native bool GetCurrentModeAutoFire(int muzzleIndex);
48 proto native int GetCurrentMode(int muzzleIndex);
49 proto native void SetCurrentMode(int muzzleIndex, int mode);
50
51 proto native owned string GetCurrentModeName(int muzzleIndex);
52
57 proto native bool CanFire(int muzzleIndex);
58 proto native bool Fire(int muzzleIndex, vector pos, vector dir, vector speed);
59 proto native bool DryFire(int muzzleIndex);
60 proto native bool DryDryFire(int muzzleIndex);
64 proto native bool EjectCasing(int muzzleIndex);
68 proto native bool CreateRound(int muzzleIndex);
69
74 proto native bool IsChamberEmpty(int muzzleIndex);
79 proto native bool IsChamberFiredOut(int muzzleIndex);
84 proto native bool IsChamberJammed(int muzzleIndex);
90 proto native bool IsChamberEjectable(int muzzleIndex);
91
96 proto native bool IsChamberFull(int muzzleIndex);
97 bool IsChamberFullEx(int muzzleIndex)
98 {
99 return IsChamberFull(muzzleIndex);
100 }
101
106 proto native bool HasInternalMagazine(int muzzleIndex);
107
111 proto native int GetInternalMagazineCartridgeCount(int muzzleIndex);
112
116 proto native int GetInternalMagazineMaxCartridgeCount(int muzzleIndex);
117
122 bool IsInternalMagazineFull(int muzzleIndex) { return GetInternalMagazineMaxCartridgeCount(muzzleIndex) == GetInternalMagazineCartridgeCount(muzzleIndex); }
123
127 proto native int GetTotalCartridgeCount(int muzzleIndex);
128
132 proto native int GetTotalMaxCartridgeCount(int muzzleIndex);
133
137 //proto native int GetChamberAmmoTypeCount(int muzzleIndex);
138
143 proto native owned string GetRandomChamberableAmmoTypeName(int muzzleIndex);
144
145
150 proto native owned string GetChamberAmmoTypeName(int muzzleIndex);
151
159 proto bool GetCartridgeInfo(int muzzleIndex, out float ammoDamage, out string ammoTypeName);
160
169 proto bool GetInternalMagazineCartridgeInfo(int muzzleIndex, int cartridgeIndex, out float ammoDamage, out string ammoTypeName);
170
174 proto bool PopCartridgeFromChamber(int muzzleIndex, out float ammoDamage, out string ammoTypeName);
175
179 proto native bool PushCartridgeToChamber(int muzzleIndex, float ammoDamage, string ammoTypeName);
180
187 proto native void EffectBulletShow(int muzzleIndex, float dmg, string type);
188
193 proto native void EffectBulletHide(int muzzleIndex);
194
195
199 proto native void SetGroundAnimFrameIndex(int groundAnimFrameIndex);
200
204 proto bool PopCartridgeFromInternalMagazine(int muzzleIndex, out float ammoDamage, out string ammoTypeName);
208 proto native bool PushCartridgeToInternalMagazine(int muzzleIndex, float ammoDamage, string ammoTypeName);
209
216 proto native bool CanAttachMagazine(int muzzleIndex, Magazine mag);
217
226 proto native bool TestAttachMagazine(int muzzleIndex, Magazine mag, bool do_occupancy_test, bool do_script_check);
227
234 proto native bool AttachMagazine(int muzzleIndex, Magazine mag);
235
240 proto native Magazine GetMagazine(int muzzleIndex);
241
247 proto native float GetReloadTime(int muzzleIndex);
248
255 proto native bool CanChamberFromMag(int muzzleIndex, Magazine mag);
256
262 proto native owned string GetChamberedCartridgeMagazineTypeName(int muzzleIndex);
263
268 proto native owned string GetRandomMagazineTypeName(int muzzleIndex);
269
274 proto native owned string GetMaxMagazineTypeName(int muzzleIndex);
275
280 proto native int GetMagazineTypeCount(int muzzleIndex);
281
286 proto native bool EnterOptics();
291 proto native bool IsInOptics();
296 proto native bool ExitOptics();
297
302 proto native float GetZoom();
308 proto native bool SetZoom(float percent);
313 proto native bool ZoomIn();
318 proto native bool ZoomOut();
319
324 proto native int GetStepZoom();
330 proto native bool SetStepZoom(int step);
335 proto native bool StepZoomIn();
340 proto native bool StepZoomOut();
341
346 proto native int GetStepZeroing(int muzzleIndex = 0);
352 proto native bool SetStepZeroing(int muzzleIndex, int step);
358 proto native bool StepZeroingUp(int muzzleIndex = 0);
364 proto native bool StepZeroingDown(int muzzleIndex = 0);
369 proto native float GetCurrentZeroing(int muzzleIndex = 0);
374 proto native float GetZeroingClamp(int muzzleIndex = 0);
380 proto native bool FlashlightOn();
381
387 proto native bool FlashlightOff();
388
394 proto native bool IsFlashlightOn();
395
399 proto native UnderSlugLauncher GetAttachedLauncher();
408
413 proto native void GetCameraPoint(int muzzleIndex, out vector pos, out vector dir);
414
419 proto native float GetZoomInit(int muzzleIndex);
420
425 proto native float GetZoomMin(int muzzleIndex);
426
431 proto native float GetZoomMax(int muzzleIndex);
432
437 proto native float GetZeroingDistanceZoomMin(int muzzleIndex);
438
443 proto native float GetZeroingDistanceZoomMax(int muzzleIndex);
444
445 proto native void SelectionBulletShow();
446 proto native void SelectionBulletHide();
447 proto native void SelectionMagazineShow();
448 proto native void SelectionMagazineHide();
449
451 {
452 for (int i = 0; i < GetMuzzleCount(); i++)
453 {
454 StepZeroingUp(i);
455 }
456 }
457
459 {
460 for (int i = 0; i < GetMuzzleCount(); i++)
461 {
463 }
464 }
465};
466
467
bool IsChamberFull(int idx)
Определения WeaponStableState.c:154
proto native float GetCurrentZeroing(int muzzleIndex=0)
returns currently used value of zeroing in config array of weapon or attached optics
proto native bool PushCartridgeToChamber(int muzzleIndex, float ammoDamage, string ammoTypeName)
push cartridge to chamber
proto native owned string GetCurrentModeName(int muzzleIndex)
proto native float GetZoomMin(int muzzleIndex)
gets FOV minimum
proto native bool CreateRound(int muzzleIndex)
proto native UnderSlugLauncher GetAttachedLauncher()
proto native bool IsChamberFiredOut(int muzzleIndex)
detects presence of fired out casing in chamber
proto native bool CanAttachMagazine(int muzzleIndex, Magazine mag)
query if a magazine can be attached to weapon
proto native bool DryDryFire(int muzzleIndex)
proto native void SetMuzzleMode(int muzzleIndex, int modeIndex)
proto native bool EjectCasing(int muzzleIndex)
ejects casing from chamber
proto native bool DryFire(int muzzleIndex)
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 native float GetZeroingDistanceZoomMin(int muzzleIndex)
Gets Zeroing distance at opticsZoomMin.
proto native ItemOptics GetAttachedOptics()
proto native bool IsChamberEmpty(int muzzleIndex)
detects empty chamber
proto native int GetInternalMagazineMaxCartridgeCount(int muzzleIndex)
proto native bool SetZoom(float percent)
sets current zoom (in %)
proto native bool FlashlightOff()
attempt to turn off flashlight
proto native float GetReloadTime(int muzzleIndex)
defines time from one shot to another
proto native void EffectBulletHide(int muzzleIndex)
reset effect cartridge in weapon
proto native int GetStepZeroing(int muzzleIndex=0)
returns position of currently used value in zeroing config array
proto native bool StepZeroingUp(int muzzleIndex=0)
sets zeroing to next defined (respective to current) value in zeroing config array
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 int GetTotalCartridgeCount(int muzzleIndex)
proto bool PopCartridgeFromChamber(int muzzleIndex, out float ammoDamage, out string ammoTypeName)
removes cartridge from chamber
proto native bool IsChamberFull(int muzzleIndex)
maximum number of cartridges in chamber
proto native int GetInternalMagazineCartridgeCount(int muzzleIndex)
bool IsInternalMagazineFull(int muzzleIndex)
maximum number of cartridges in internal magazine
Определения Weapon.c:122
proto native void SelectionBulletShow()
proto native bool SetStepZeroing(int muzzleIndex, int step)
proto native owned string GetRandomChamberableAmmoTypeName(int muzzleIndex)
proto native bool CanFire(int muzzleIndex)
query whether the weapon can be fired or not
proto native float GetZoom()
returns current percentage of zoom
proto native void Synchronize()
Force synchronizes the weapon state from Server to Client. Use with caution.
proto native bool StepZoomIn()
sets zoom to next defined (respective to current) value in zoom fov config array
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 SelectionMagazineHide()
proto native bool IsInOptics()
is weapon in optics mode or not
proto native owned string GetMaxMagazineTypeName(int muzzleIndex)
proto native int GetMagazineTypeCount(int muzzleIndex)
proto native void SetCurrentMuzzle(int muzzleIndex)
sets index of active muzzle
proto native int GetSlotFromMuzzleIndex(int muzzleIndex)
conversion muzzleIndex -> slotId
proto native int GetMuzzleCount()
proto native bool GetCurrentModeAutoFire(int muzzleIndex)
proto native Magazine GetMagazine(int muzzleIndex)
override bool IsWeapon()
Определения Weapon.c:6
proto native void EffectBulletShow(int muzzleIndex, float dmg, string type)
push effect cartridge to Weapon
proto native void SetGroundAnimFrameIndex(int groundAnimFrameIndex)
sets animation frame for ground state when animation is specified in config
void StepZeroingDownAllMuzzles()
Определения Weapon.c:458
proto native ItemSuppressor GetAttachedSuppressor()
proto native float GetZeroingDistanceZoomMax(int muzzleIndex)
Gets Zeroing distance at opticsZoomMax.
proto native bool AttachMagazine(int muzzleIndex, Magazine mag)
perform attachment of a magazine to weapon
bool IsChamberFullEx(int muzzleIndex)
Определения Weapon.c:97
proto native bool ZoomOut()
moves current zoom by 1% down
proto native owned string GetChamberedCartridgeMagazineTypeName(int muzzleIndex)
query the type of magazine the cartridge can be unloaded to
proto bool PopCartridgeFromInternalMagazine(int muzzleIndex, out float ammoDamage, out string ammoTypeName)
removes top-most cartridge from internal magazine
proto native int GetStepZoom()
returns position of currently used value in zoom config array
proto native bool Fire(int muzzleIndex, vector pos, vector dir, vector speed)
proto native int GetCurrentMode(int muzzleIndex)
proto native void SelectionMagazineShow()
proto native int GetTotalMaxCartridgeCount(int muzzleIndex)
proto native owned string GetChamberAmmoTypeName(int muzzleIndex)
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 PushCartridgeToInternalMagazine(int muzzleIndex, float ammoDamage, string ammoTypeName)
push cartridge into internal magazine
proto native bool IsFlashlightOn()
query state of flashlight
proto native float GetZoomMax(int muzzleIndex)
gets FOV maximum
proto native bool ZoomIn()
moves current zoom by 1% up
proto native bool SetStepZoom(int step)
sets zoom to fov value defined at given position in zoom fov config array
proto native void SelectionBulletHide()
proto native bool EnterOptics()
switches to optics mode if possible
proto native int GetMuzzleModeCount(int muzzleIndex)
proto native bool ExitOptics()
switches out of optics mode (if possible)
proto native int GetCurrentModeBurstSize(int muzzleIndex)
proto native bool IsChamberEjectable(int muzzleIndex)
detects presence of ejectable cartridge in muzzle's chamber
proto native bool IsChamberJammed(int muzzleIndex)
detects presence of damaged cartridge in chamber
proto native void SetNextMuzzleMode(int muzzleIndex)
proto native int GetCurrentMuzzle()
proto native void SetCurrentMode(int muzzleIndex, int mode)
proto native float GetZeroingClamp(int muzzleIndex=0)
returns maximum allowed discrete distance for the muzzle. Limits attached optics zeroing only!...
proto native bool HasInternalMagazine(int muzzleIndex)
proto native float GetZoomInit(int muzzleIndex)
gets FOV value, when entering optics
proto native bool StepZoomOut()
sets zoom to previous (respective to current) defined value in zoom fov config array
proto native bool CanChamberFromMag(int muzzleIndex, Magazine mag)
query if a bullet from magazine can be loaded into chamber
proto native bool StepZeroingDown(int muzzleIndex=0)
sets zeroing to previous (respective to current) defined value in zeroing config array
void StepZeroingUpAllMuzzles()
Определения Weapon.c:450
proto native bool FlashlightOn()
attempt to turn on flashlight
proto native owned string GetRandomMagazineTypeName(int muzzleIndex)
Определения ItemOptics.c:2
script counterpart to engine's class Weapon
Определения InventoryItem.c:49
Определения EnConvert.c:106