DayZ 1.24
Loading...
Searching...
No Matches
PluginDeveloper.c
Go to the documentation of this file.
1typedef Param7<EntityAI, string, float, float, bool, string, FindInventoryLocationType> DevSpawnItemParams;//(target, item_name, health, quantity, special, presetName, locationType );
2class PluginDeveloper extends PluginBase
3{
4 protected bool m_IsWinHolding;
5 protected int m_FeaturesMask;
7
8 static PluginDeveloper GetInstance()
9 {
10 return PluginDeveloper.Cast(GetPlugin(PluginDeveloper));
11 }
12
18
24
30
36
41
42 // System Public Events
44 {
45
46 }
47
48 override void OnInit()
49 {
50 super.OnInit();
51
53 }
54
56 {
57#ifdef DIAG_DEVELOPER
58 switch (rpc_type)
59 {
60 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND:
61 {
63 }
64 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND_PATTERN_GRID:
65 {
67 }
68 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_CURSOR:
69 {
71 }
72 case ERPCs.DEV_RPC_SPAWN_ITEM_IN_INVENTORY:
73 {
75 }
76 case ERPCs.DEV_RPC_CLEAR_INV:
77 {
79 }
80 case ERPCs.DEV_RPC_SEND_SERVER_LOG:
81 {
83 }
84 case ERPCs.RPC_SYNC_SCENE_OBJECT:
85 {
87 }
88 case ERPCs.DEV_RPC_PLUGIN_DZCREATURE_DEBUG:
89 {
91 }
92 case ERPCs.DEV_RPC_SPAWN_PRESET:
93 {
94 string presetName;
96
97 ctx.Read(presetName);
98 ctx.Read(target);
99
101 }
102 case ERPCs.DEV_RPC_SET_TIME:
103 {
104 HandleSetTime(player, ctx); break;
105 }
106 }
107
109#endif
110 }
111
112 // Public API
113 // Send Print to scripted console
115 {
116 if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
117 {
120 }
121 }
122
123 // Server Log Synch: Server Side
125 {
126 if (GetGame())
127 {
129 GetGame().GetPlayers(players);
130
131 for (int i = 0; i < players.Count(); ++i)
132 {
134 Man player = players.Get(i);
135
136 if (player && player.HasNetworkID())
137 player.RPCSingleParam(ERPCs.DEV_RPC_SEND_SERVER_LOG, param, true, player.GetIdentity());
138 }
139 }
140 }
141
143 {
145
146 if (ctx.Read(par))
147 {
148 PluginSceneManager module_scene_editor = PluginSceneManager.Cast(GetPlugin(PluginSceneManager));
149 SceneData scene_data = module_scene_editor.GetLoadedScene();
150 SceneObject scene_object = scene_data.GetSceneObjectByEntityAI(par.param2);
151
152 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallByName(scene_object, par.param1, par.param3);
153 }
154 }
155
162
164 {
165#ifdef DEVELOPER
166
168
169 if (ctx.Read(p5))
170 {
171 //float time01 = p5.param4 / 100;
172 //int time_minutes = Math.Lerp(0, 24*60, time01 );
173
174 int year = p5.param1;
175 int month = p5.param2;
176 int day = p5.param3;
177 int hour = p5.param4;
178 int minute = p5.param5;
179
180
181 GetGame().GetWorld().SetDate(year, month, day, hour, minute);
182 /*
183 Debug.Log("year:" + year);
184 Debug.Log("month:" + month);
185 Debug.Log("day:" + day);
186 Debug.Log("hour:" + hour);
187 Debug.Log("minute:" + minute);
188 */
189 }
190
191#endif
192 }
193
195 {
196#ifdef DEVELOPER
197
199
200 if (target)
202 if (!targetPlayer)
203 return;
204
205 targetPlayer.m_PresetSpawned = true;
206 string class_name = presetName + "_Preset";
207 typename type = class_name.ToType();
208
209 if (type)
210 {
211 PresetSpawnBase presetObj = PresetSpawnBase.Cast(type.Spawn());
212
213 if (presetObj)
215 }
216
217#endif
218 }
219
220 // RPC Events
221 // Server Log Synch: Client Side
223 {
225
226 if (ctx.Read(param) && param.param1 != "")
228 }
229
234
235 // Client -> Server Spawning: Server Side
237 {
239 if (ctx.Read(p))
240 SpawnEntityOnCursorDir(player, p.param1, p.param2, p.param3, p.param4, p.param5, p.param6, p.param7);
241 }
242
244 {
246 if (ctx.Read(p))
247 SpawnEntityOnGroundPos(player, p.param1, p.param2, p.param3, p.param4, p.param5, p.param6);
248 }
249
251 {
252 auto p = new Param10<string, int, float, float, int, int, float, float, bool, bool>("", 0, 0, 0, 0, 0, 0, 0, false, false);
253 if (ctx.Read(p))
254 SpawnEntityOnGroundPatternGrid(player, p.param1, p.param2, p.param3, p.param4, p.param5, p.param6, p.param7, p.param8, p.param9, p.param10);
255 }
257 {
258#ifdef DEVELOPER
260 if (ctx.Read(p))
261 {
262 EntityAI target = EntityAI.Cast(p.param1);
264
265 EntityAI ent = SpawnEntityInInventory(target, p.param2, p.param3, p.param4, p.param5, "", p.param7);
266 if (playerTarget && p.param5)
267 {
268 if (playerTarget.m_PresetSpawned)
269 {
270 playerTarget.m_PresetSpawned = false;
271 playerTarget.m_PresetItems.Clear();
272 }
273 if (ent)
274 playerTarget.m_PresetItems.Insert(ent);
275 }
276 }
277#endif
278 }
279
284
286 {
287 PrintString("PluginDeveloper.SpawnEntity() Warning- Cant spawn object: " + name);
288 //DumpStack();
289 PrintString("PluginDeveloper.SpawnEntity() Warning END");
290 }
291
292 void SetupSpawnedEntity(PlayerBase player, EntityAI entity, float health, float quantity = -1, bool special = false, string presetName = "")
293 {
294#ifdef DEVELOPER
295 if (presetName && player.m_PresetSpawned)//this is how we ascertain this is the first item being spawned from a new preset after a previous preset was already spawned in
296 {
297 player.m_PresetItems.Clear();
298 player.m_PresetSpawned = false;//is set to 'true' elsewhere after all the items have been spawned in
299 }
300 if (entity.IsInherited(PlayerBase))
301 {
303 plr.OnSpawnedFromConsole();
304 }
305 else if (entity.IsInherited(ItemBase))
306 {
309 }
310 else if (entity.IsInherited(House))
311 {
312 entity.PlaceOnSurface();
313 vector pos = entity.GetPosition();
314 vector ori = GetGame().GetSurfaceOrientation(pos[0], pos[2]);
315 entity.SetOrientation(ori);
316 }
317 if (presetName)
318 player.m_PresetItems.Insert(entity);
319
320 if (special)
321 {
322 auto debugParams = DebugSpawnParams.WithPlayer(player);
323 entity.OnDebugSpawnEx(debugParams);
324 }
325#endif
326 }
327
328
329 void SpawnEntityOnGroundPatternGrid(PlayerBase player, string item_name, int count, float health, float quantity, int rows, int columns, float gapRow = 1, float gapColumn = 1, bool special = false, bool withPhysics = false)
330 {
331 if (!item_name)
332 return;
333 if (GetGame().IsServer())
334 {
335 float rowDist = 0;
336 float columnDist = 0;
337
338 vector playerPos = player.GetPosition();
339 vector camDirForward = player.GetDirection();
340 vector camDirRight = camDirForward.Perpend() * -1;
341 int countLoop = 0;
342 for (int i = 0; i < rows; i++)
343 {
346 columnDist = 0;
347 for (int j = 0; j < columns; j++)
348 {
351 float hlth = health * MiscGameplayFunctions.GetTypeMaxGlobalHealth(item_name);
353 ent.PlaceOnSurface();
354
357 item.ThrowPhysically(null, "0 0 0");
358
359 countLoop++;
360 if (countLoop == count)
361 return;
363 }
364 rowDist += gapRow;
365 }
366 }
367 else
368 {
370 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND_PATTERN_GRID, params, true);
371 }
372 }
373
374 void SpawnItemOnCrosshair(notnull PlayerBase player, string itemName, float health, float quantity, float maxDist = 100, bool allowFreeflight = false, bool special = false, bool withPhysics = false)
375 {
376 vector from, to;
377 if (allowFreeflight && FreeDebugCamera.GetInstance().IsActive())
378 {
379 from = FreeDebugCamera.GetInstance().GetPosition();
380 to = from + FreeDebugCamera.GetInstance().GetDirection() * maxDist;
381 }
382 else
383 {
384 from = GetGame().GetCurrentCameraPosition();
385 to = from + GetGame().GetCurrentCameraDirection() * maxDist;
386 }
387
388 float hitFraction;
391
393 Object obj;
394
397
398 // something is hit
399 if (hitPos != vector.Zero)
401 }
402
411 EntityAI SpawnEntityOnGroundPos(PlayerBase player, string item_name, float health, float quantity, vector pos, bool special = false, bool withPhysics = false)
412 {
413 if (GetGame().IsServer())
414 {
415 EntityAI entity = player.SpawnEntityOnGroundPos(item_name, pos);
416 if (entity)
418 else
420
423 item.ThrowPhysically(null, "0 0 0");
424
425 return entity;
426 }
427 else
428 {
430 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND, params, true);
431 }
432 return NULL;
433 }
442 EntityAI SpawnEntityOnCursorDir(PlayerBase player, string item_name, float quantity, float distance, float health = -1, bool special = false, string presetName = "", bool withPhysics = false)
443 {
444
445 if (GetGame().IsServer())
446 {
447 // Client -> Server Spawning: Server Side
448 EntityAI entity = player.SpawnEntityOnGroundOnCursorDir(item_name, distance);
449
450 if (entity)
451 {
452 if (!entity.IsBuilding() && health < 0 && entity.GetMaxHealth() > 0) //check for default (-1)
453 health = entity.GetMaxHealth();
455 }
456 else
458
461 item.ThrowPhysically(null, "0 0 0");
462
463 return entity;
464 }
465 else
466 {
467 // Client -> Server Spawning: Client Side
469 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_ON_CURSOR, params, true);
470 }
471 return NULL;
472 }
484 {
485 if (target.IsPlayer())
487 if (GetGame().IsServer())
488 {
490 if (target.GetInventory() && target.GetInventory().FindFirstFreeLocationForNewEntity(className, FindInventoryLocationType.ANY, il))
491 {
493 if (eai && eai.IsInherited(ItemBase))
494 {
495 if (health < 0) //check for default (-1)
496 health = eai.GetMaxHealth();
497 ItemBase i = ItemBase.Cast(eai);
499 if (special)
500 {
501 auto debugParams = DebugSpawnParams.WithPlayer(null);
502 eai.OnDebugSpawnEx(debugParams);
503 }
504 }
505 return eai;
506 }
507 }
508 else
509 {
511 GetGame().GetPlayer().RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_IN_INVENTORY, params, true, GetGame().GetPlayer().GetIdentity());
512 }
513 return null;
514 }
515
517 {
518 if (player)
519 {
520 if (GetGame().IsServer())
521 {
522 if (locationType == FindInventoryLocationType.HANDS && player.GetItemInHands())
523 {
524 if (!GetGame().IsMultiplayer())
525 player.DropItem(player.GetItemInHands());
526 else
527 player.ServerDropEntity(player.GetItemInHands());
528 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(SpawnEntityInPlayerInventory, 100, false, player, item_name, health, quantity, special, presetName, locationType);
529 return null;
530 }
531
532
533#ifdef DEVELOPER
534 if (GetGame().IsKindOf(item_name, "Transport"))
535 {
537
538 auto debugParams = DebugSpawnParams.WithPlayer(player);
539 car.OnDebugSpawnEx(debugParams);
540
541 if (GetGame().IsMultiplayer())
542 DayZPlayerSyncJunctures.SendGetInCar(player, car);
543 else
544 player.SetGetInVehicleDebug(car);
545
546 return car;
547 }
548#endif
549
551 if (player.GetInventory() && player.GetInventory().FindFirstFreeLocationForNewEntity(item_name, locationType, il))
552 {
553 Weapon_Base wpn = Weapon_Base.Cast(il.GetParent());
554 bool is_mag = il.GetSlot() == InventorySlots.MAGAZINE || il.GetSlot() == InventorySlots.MAGAZINE2 || il.GetSlot() == InventorySlots.MAGAZINE3;
555 if (wpn && is_mag)
556 {
557 vector pos = player.GetPosition();
560 if (mag_gnd && player.GetWeaponManager().CanAttachMagazine(wpn, mag_gnd))
561 player.GetWeaponManager().AttachMagazine(mag_gnd);
562 return eai_gnd;
563 }
564 else
565 {
567 if (eai && eai.IsInherited(ItemBase))
568 {
569 if (health < 0) //check for default (-1)
570 health = eai.GetMaxHealth();
571 ItemBase i = ItemBase.Cast(eai);
573 if (special)
574 {
575 auto debugParams2 = DebugSpawnParams.WithPlayer(player);
576 eai.OnDebugSpawnEx(debugParams2);
577 }
578 }
579 return eai;
580 }
581 }
582 else
584 return NULL;
585 }
586 else
587 {
588 // Client -> Server Spawning: Client Side
590 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_IN_INVENTORY, params, true);
591 }
592 }
593 return NULL;
594 }
603 {
604 if (GetGame().IsServer())
605 {
606 Weapon_Base wpn = Weapon_Base.Cast(parent);
607 if (wpn)
608 {
609 GameInventory inventory = parent.GetInventory();
610 return inventory.CreateInInventory(att_name);
611 /*
612 vector pos = player.GetPosition();
613 EntityAI eai_gnd = SpawnEntityOnGroundPos(player, att_name, health, quantity, pos);
614 Magazine mag_gnd = Magazine.Cast(eai_gnd);
615 if (mag_gnd && player.GetWeaponManager().CanAttachMagazine(wpn, mag_gnd))
616 {
617 player.GetWeaponManager().AttachMagazine(mag_gnd);
618 }
619 return eai_gnd;
620 */
621 }
622 else
623 {
624 EntityAI eai = parent.GetInventory().CreateAttachment(att_name);
625 if (eai)
626 {
627 if (eai.IsInherited(ItemBase))
628 {
629 ItemBase i = ItemBase.Cast(eai);
631 }
632 return eai;
633 }
634 else
636 }
637 return NULL;
638 }
639 else
640 {
641 // Client -> Server Spawning: Client Side
643 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_AS_ATTACHMENT, params, true);
644 }
645 return NULL;
646 }
647
649 {
650 UIScriptedMenu menu_curr = GetGame().GetUIManager().GetMenu();
651
652 if (menu_curr == NULL)
653 {
655 if (player)
656 {
657 if (!GetGame().GetWorld().Is3rdPersonDisabled())
658 {
659 player.SetIsInThirdPerson(!player.IsInThirdPerson());//this counters the effect of switching camera through pressing the 'V' key
660 }
661
662 vector pos_player = player.GetPosition();
663
664 // Get item from clipboard
665 string clipboard;
666 GetGame().CopyFromClipboard(clipboard);
667
668 if (!clipboard.Contains(","))
669 {
670 //single item
672 SpawnItemOnCrosshair(player, clipboard.Trim(), -1, 1, 40, true);
673 else
675 }
676 else
677 {
679 clipboard.Split(",", items);
680
681 foreach (string item: items)
682 {
684 SpawnItemOnCrosshair(player, item.Trim(), -1, 1, 40, true);
685 else
686 SpawnEntityOnCursorDir(player, item.Trim(), 1, 1);
687 }
688 }
689
690 }
691 }
692
693 return NULL;
694 }
695
696 // Clear Entity Inventory
698 {
699 if (GetGame().IsServer())
700 entity.ClearInventory();
701 else
702 {
704 entity.RPCSingleParam(ERPCs.DEV_RPC_CLEAR_INV, params, true);
705 }
706 }
707
709 {
710 if (g_Game.GetUIManager().GetMenu() == NULL)
711 g_Game.GetUIManager().EnterScriptedMenu(MENU_HELP_SCREEN, NULL);
712 else if (g_Game.GetUIManager().IsMenuOpen(MENU_HELP_SCREEN))
713 g_Game.GetUIManager().Back();
714 }
715
717 {
718 if (GetGame() != null && !g_Game.IsLoading() && GetGame().GetMission())
719 {
720 if (g_Game.GetUIManager().GetMenu() == NULL)
721 {
722 m_ScriptConsole = g_Game.GetUIManager().EnterScriptedMenu(MENU_SCRIPTCONSOLE, NULL);
723 GetGame().GetMission().AddActiveInputExcludes({"menu"});
724
725 }
726 else if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
727 {
728 g_Game.GetUIManager().Back();
729 GetGame().GetMission().RemoveActiveInputExcludes({"menu"}, true);
730 }
731 }
732 }
733
734 // Mission Editor
736 {
737 if (g_Game.GetUIManager().IsMenuOpen(MENU_MISSION_LOADER))
738 {
739 g_Game.GetUIManager().Back();
740 GetGame().GetMission().RemoveActiveInputExcludes({"menu"}, true);
741 return;
742 }
743
744 if (g_Game.GetUIManager().GetMenu())
745 g_Game.GetUIManager().GetMenu().Close();
746
747 g_Game.GetUIManager().EnterScriptedMenu(MENU_MISSION_LOADER, NULL);
748 GetGame().GetMission().AddActiveInputExcludes({"menu"});
749
750
751 }
752
753 // Script Editor History
754 private void ScriptHistoryNext()
755 {
756 // Console key press
757 if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
759 }
760
761 private void ScriptHistoryBack()
762 {
763 // Console key press
764 if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
766 }
767
768 private bool IsIngame()
769 {
770 UIScriptedMenu menu_curr = GetGame().GetUIManager().GetMenu();
771
772 if (menu_curr == NULL)
773 return true;
774
775 return false;
776 }
777
778 private bool IsInConsole()
779 {
780 UIScriptedMenu menu_curr = GetGame().GetUIManager().GetMenu();
781
782 if (menu_curr != NULL && menu_curr.GetID() == MENU_SCRIPTCONSOLE)
783 return true;
784
785 return false;
786 }
787
788 // Tools
790 {
791 string pivot = arr.Get(left);
792 int i = left;
793 int j = right + 1;
794 string temp;
795
796 while (true)
797 {
798 while (true)
799 {
800 i++;
801 if (i > right || arr.Get(i) > pivot)
802 break;
803 }
804
805 while (true)
806 {
807 j--;
808 if (arr.Get(j) <= pivot)
809 break;
810 }
811
812 if (i >= j)
813 break;
814
815 temp = arr.Get(i);
816 arr.Set(i, arr.Get(j));
817 arr.Set(j, temp);
818 }
819
820 temp = arr.Get(left);
821 arr.Set(left, arr.Get(j));
822 arr.Set(j, temp);
823
824 return j;
825 }
826
828 {
829 int j;
830
831 if (left < right)
832 {
834 QuickSort(arr, left, j - 1);
835 QuickSort(arr, j + 1, right);
836 }
837 }
838
840 {
841 QuickSort(arr, 0, arr.Count() - 1);
842 }
843
844 void ResetGUI()
845 {
846 if (GetGame() && GetGame().GetMission())
847 GetGame().GetMission().ResetGUI();
848 }
849
851 {
853
854 if (getFocus)
855 {
856 GetGame().GetInput().ChangeGameFocus(1);
857 GetGame().GetUIManager().ShowUICursor(true);
858 }
859
860 if (GetGame().IsMultiplayer())
861 GetGame().RPCSingleParam(GetGame().GetPlayer(), ERPCs.DEV_SET_DEV_ITEM, new Param1<Object>(entity), true, GetGame().GetPlayer().GetIdentity());
862 else
863 {
865 mid2.RegisterDebugItem(entity, player);
866 }
867#ifdef DEVELOPER
869#endif
870 }
871
873 {
874#ifdef DEVELOPER
877
879 if (debugCam && debugCam.GetCurrentCamera())
880 entity = debugCam.GetCrosshairObject();
881 else
882 {
883
884 if (player && player.GetActionManager())
885 {
886 ActionTarget at = player.GetActionManager().FindActionTarget();
887 entity = at.GetObject();
888 }
889 }
890
891 if (entity)
893#endif
894 }
895}
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
const int RF_DEFAULT
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Definition DayZGame.c:3528
PhxInteractionLayers
Definition DayZPhysics.c:2
const CallID CALL_ID_SCR_CNSL_HISTORY_NEXT
Definition Dispatcher.c:5
const CallID CALL_ID_SCR_CNSL_HISTORY_BACK
Definition Dispatcher.c:4
const CallID CALL_ID_SCR_CNSL_ADD_PRINT
Definition Dispatcher.c:6
Param CallMethod(CallID call_id, Param params)
Definition Dispatcher.c:36
ERPCs
Definition ERPCs.c:2
FindInventoryLocationType
flags for searching locations in inventory
void SetupSpawnedItem(ItemBase item, float health, float quantity)
Definition ItemBase.c:4700
override void ClearInventory()
Definition ItemBase.c:8119
PlayerBase GetPlayer()
class OptionSelectorMultistate extends OptionSelector class_name
void PluginDayZCreatureAIDebug()
Param7< EntityAI, string, float, float, bool, string, FindInventoryLocationType > DevSpawnItemParams
void PluginItemDiagnostic()
PluginBase GetPlugin(typename plugin_type)
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
Definition Debug.c:14
static void ReceivedLogMessageFromServer(string message)
Definition Debug.c:383
static void OnSetFreeCameraEvent(PlayerBase player, FreeDebugCamera camera)
static void OnInit()
static bool IsFreeCameraEnabled()
static void FreeCameraToggle(PlayerBase player, bool teleport_player=false)
Enable / Disable Free camera (Fly mod) - disable of camera will teleport player at current free camer...
static void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
static void TeleportAtCursorEx()
static void SetPlayerPosition(PlayerBase player, vector position, bool breakSync=false)
script counterpart to engine's class Inventory
Definition Inventory.c:79
InventoryLocation.
provides access to slot configuration
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
void ToggleFreeCamera()
Enable / Disable Free camera (Fly mod) - disable of camera will teleport player at current free camer...
void HandlePresetSpawn(PlayerBase player, string presetName, EntityAI target)
void OnRPCSpawnEntityOnCursorDir(PlayerBase player, ParamsReadContext ctx)
override void OnInit()
void PrintLogClient(string msg_log)
void ToggleScriptConsole()
void OnSpawnErrorReport(string name)
void OnRPCSyncSceneObject(ParamsReadContext ctx)
bool m_IsWinHolding
int QuickSortPartition(TStringArray arr, int left, int right)
EntityAI SpawnFromClipboard()
void SpawnItemOnCrosshair(notnull PlayerBase player, string itemName, float health, float quantity, float maxDist=100, bool allowFreeflight=false, bool special=false, bool withPhysics=false)
void SortStringArray(TStringArray arr)
EntityAI SpawnEntityOnCursorDir(PlayerBase player, string item_name, float quantity, float distance, float health=-1, bool special=false, string presetName="", bool withPhysics=false)
spawns entity in direction of cursor at specified distance
void SpawnEntityOnGroundPatternGrid(PlayerBase player, string item_name, int count, float health, float quantity, int rows, int columns, float gapRow=1, float gapColumn=1, bool special=false, bool withPhysics=false)
void OnSetFreeCameraEvent(PlayerBase player, FreeDebugCamera camera)
void HandleSetTime(PlayerBase player, ParamsReadContext ctx)
void ToggleFreeCameraBackPos()
Enable / Disable Free camera (Fly mod)
void ScriptHistoryBack()
UIScriptedMenu m_ScriptConsole
EntityAI SpawnEntityAsAttachment(PlayerBase player, EntityAI parent, string att_name, float health, float quantity)
tries to spawn item as attachment
EntityAI SpawnEntityInPlayerInventory(PlayerBase player, string item_name, float health, float quantity, bool special=false, string presetName="", FindInventoryLocationType locationType=FindInventoryLocationType.ANY)
static PluginDeveloper GetInstance()
void ToggleHelpScreen()
void OnRPCSpawnEntity(PlayerBase player, ParamsReadContext ctx)
EntityAI SpawnEntityInInventory(notnull EntityAI target, string className, float health, float quantity, bool special=false, string presetName="", FindInventoryLocationType locationType=FindInventoryLocationType.ANY)
tries to spawn item somewhere in inventory
void OnRPCSpawnEntityOnGroundPatternGrid(PlayerBase player, ParamsReadContext ctx)
void OnRPCServerLogRecieved(ParamsReadContext ctx)
void TeleportAtCursor()
Set Player position at his cursor position in the world.
void PluginDeveloper()
void OnRPCSpawnEntityOnGround(PlayerBase player, ParamsReadContext ctx)
static void SetDeveloperItemClientEx(notnull Object entity, bool getFocus=false)
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
void OnRPCPluginDayzCreatureDebug(PlayerBase player, int rpc_type, ParamsReadContext ctx)
EntityAI SpawnEntityOnGroundPos(PlayerBase player, string item_name, float health, float quantity, vector pos, bool special=false, bool withPhysics=false)
spawns entity on exact position
void ToggleMissionLoader()
void SetupSpawnedEntity(PlayerBase player, EntityAI entity, float health, float quantity=-1, bool special=false, string presetName="")
void ClearInventory(EntityAI entity)
void SetDeveloperItemClient()
bool IsEnabledFreeCamera()
void OnRPCClearInventory(PlayerBase player)
void SendServerLogToClient(string msg)
void Teleport(PlayerBase player, vector position)
Teleport player at position.
void QuickSort(TStringArray arr, int left, int right)
void ScriptHistoryNext()
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
static const vector Zero
Definition EnConvert.c:110
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
Definition EnScript.c:666
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Definition EnScript.c:344
const int MENU_HELP_SCREEN
Definition constants.c:183
const int MENU_SCRIPTCONSOLE
Definition constants.c:175
const int MENU_MISSION_LOADER
Definition constants.c:204
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8