DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ CreateWeaponWithAmmo()

static Weapon_Base Weapon::CreateWeaponWithAmmo ( string weaponType,
string magazineType = "",
int flags = WeaponWithAmmoFlags.CHAMBER )
inlinestaticprotected

Create weapon with ammo.

Аргументы
[in]weaponTypestring The weapon to create
[in]magazineTypestring The magazine to attach or ammo to load, passing in empty string will select random
[in]flagsint Setup flags, please read WeaponWithAmmoFlags
Возвращает
The created weapon

См. определение в файле Weapon_Base.c строка 728

729 {
730 Weapon_Base wpn = Weapon_Base.Cast(GetGame().CreateObjectEx( weaponType, vector.Zero, ECE_PLACE_ON_SURFACE ));
731
732 if ( !wpn )
733 {
734 ErrorEx(string.Format("%1 does not exist or is not a weapon.", weaponType));
735 return null;
736 }
737
738 wpn.SpawnAmmo(magazineType, flags);
739 return wpn;
740 }
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
void Weapon_Base()
Определения Weapon_Base.c:79
proto native CGame GetGame()
enum ShapeType ErrorEx

Перекрестные ссылки ECE_PLACE_ON_SURFACE, ErrorEx, GetGame(), Weapon_Base() и vector::Zero.