635 {
637 {
638 Weapon_Base wpn = Weapon_Base.Cast(parent);
639 if (wpn)
640 {
641 GameInventory inventory = parent.GetInventory();
643
644
645
646
647
648
649
650
651
652
653 }
654 else
655 {
656 EntityAI eai = parent.GetInventory().CreateAttachment(att_name);
657 if (eai)
658 {
660 {
663 }
664 return eai;
665 }
666 else
668 }
669 return NULL;
670 }
671 else
672 {
673
674 Param3<string, float, float> params = new Param3<string, float, float>(att_name, health, quantity);
675 player.RPCSingleParam(
ERPCs.DEV_RPC_SPAWN_ITEM_AS_ATTACHMENT, params,
true);
676 }
677 return NULL;
678 }
class GP5GasMask extends MaskBase ItemBase
void SetupSpawnedItem(ItemBase item, float health, float quantity)
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
void OnSpawnErrorReport(string name)
proto native CGame GetGame()