566 {
567
570 {
573
574 if (is_preset_fixed)
575 {
577
578 }
579 else
580 {
582 }
583
584 if (clear_inventory)
585 {
587 }
588
589 for (int i = 0; i < preset_array.Count(); i++)
590 {
591 float health = -1;
592 int quantity = 1;
593 bool with_physics = false;
594 if (is_preset_fixed)
595 {
599 }
600 else
601 {
605 }
607 EntityAI ent =
m_Developer.SpawnEntityInInventory(target, preset_array.Get(i), -1, quantity,
false, preset_name);
608
610 {
611 m_Developer.SpawnEntityOnCursorDir(player, preset_array.Get(i), quantity, distance, health,
false, preset_name, with_physics);
612 }
613 }
615 {
616 ScriptRPC rpc = new ScriptRPC();
617 rpc.
Write(preset_name);
619 rpc.
Send(player,
ERPCs.DEV_RPC_SPAWN_PRESET,
true, player.GetIdentity());
620 }
621 else
622 {
623 PluginDeveloper plugin = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
624 plugin.HandlePresetSpawn(player,preset_name,target);
625 }
626 }
627 }
InventoryLocationType
types of Inventory Location
PluginBase GetPlugin(typename plugin_type)
bool IsCurrentPresetFixed()
PluginDeveloper m_Developer
int GetCurrentPresetIndex()
PluginConfigDebugProfile m_ConfigDebugProfile
PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed
proto native void Send(Object target, int rpc_type, bool guaranteed, PlayerIdentity recipient=NULL)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto bool Write(void value_out)
proto native CGame GetGame()
array< string > TStringArray