Page MenuHomeFeedback Tracker

DayZ Server 1.0 - Create Object
Closed, ResolvedPublic

Description

PC version 1.0.150192

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 7 x64
Operating System Version
6.1(7601)
Category
Dedicated Server
Steps To Reproduce
  1. Start server
  2. Create from script this:
void SpawnItemToPlayer(PlayerBase player, string item_type)
	{		
		if (player)
		{
			private PlayerIdentity identify_player = player.GetIdentity();
			if (identify_player)
			{
				private EntityAI item = player.GetHumanInventory().CreateInInventory(item_type);
				private ItemBase item_Bass;
				if (item == NULL)
				{
					item = player.GetHumanInventory().CreateInHands(item_type);
					if (item == NULL)
					{
						private vector pos_player = player.GetPosition();
						Object spawned_obj = GetGame().CreateObject(item_type, pos_player);
						if (spawned_obj)
						{
							//EntityAI obj = EntityAI.Cast(spawned_obj);
							Print("[SpawnItem]: CREATED FOR PLAYER - " + identify_player.GetName() + " ITEM " + item_type + " Around Player");
						} else
						{
							Print("[SpawnItem]: CAN'T BE CREATED FOR PLAYER - " + identify_player.GetName() + " ITEM " + item_type + " Around Player in position " + pos_player.ToString());
						}
					} else
					{
						item_Bass = ItemBase.Cast(item);
						Print("[SpawnItem]: CREATED FOR PLAYER - " + identify_player.GetName() + " ITEM " + item_type + " In Hands Player");
					}
				} else
				{
					item_Bass = ItemBase.Cast(item);
					Print("[SpawnItem]: CREATED FOR PLAYER - " + identify_player.GetName() + " ITEM " + item_type + " IN Inventoiry Player or Hands");
				}	
			} else
			{
				Print("[SpawnItem]: Can't be created item ITEM " + item_type + " for player: " + player.ToString() + " - Player identify is not correct!");
			}
		} else
		{
			Print("[SpawnItem]: Can't be created item ITEM " + item_type + " for player: " + player.ToString() + " - Player is not alive or not correct!");
		}			
	}

item:
Bandage

  1. Get in script.log error:

SCRIPT : [SpawnItem]: CAN'T BE CREATED FOR PLAYER - Survivor ITEM Bandage Around Player in position <13105.463867, 1.631361, 7965.671387>

  1. Create from this script this item:

Rag

  1. Get this in scritp.log

SCRIPT : [SpawnItem]: CREATED FOR PLAYER - Survivor ITEM Rag IN Inventoiry Player or Hands

What is a problem?

Event Timeline

AXEL7 created this task.Jan 28 2019, 7:47 PM
AXEL7 added a comment.Jan 28 2019, 8:54 PM

Oh, i am fix this, Bandage changed to BandageDressing

Geez closed this task as Resolved.Jan 29 2019, 3:52 PM
Geez claimed this task.