216 {
217 spawned_objects.Clear();
219
221 {
223
225 {
227 string color = item.ConfigGetString("color");
229 item_to_spawn = new_class_name;
230 }
231
233 {
235
236
237
238
239
240
241
242 object = player.GetInventory().CreateInInventory(item_to_spawn);
243 }
245 {
246
247
248
249
250
251
252 }
253
254
255 if (!object)
256 {
258
259 if (!object)
260 Error(
"failed to spawn entity "+item_to_spawn+
" , make sure the classname exists and item can be spawned");
261 }
262 spawned_objects.Insert(
ItemBase.Cast(
object));
263 object = null;
264 }
265 }
int m_ResultToInventory[MAXIMUM_RESULTS]
string m_ItemsToCreate[MAXIMUM_RESULTS]
int m_ResultInheritsColor[MAXIMUM_RESULTS]
float m_ResultSpawnDistance[MAXIMUM_RESULTS]
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
void Error(string err)
Messagebox with error message.