10 return PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
60 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND:
64 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND_PATTERN_GRID:
68 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_CURSOR:
72 case ERPCs.DEV_RPC_SPAWN_ITEM_IN_INVENTORY:
76 case ERPCs.DEV_RPC_CLEAR_INV:
80 case ERPCs.DEV_RPC_SEND_SERVER_LOG:
84 case ERPCs.RPC_SYNC_SCENE_OBJECT:
88 case ERPCs.DEV_RPC_PLUGIN_DZCREATURE_DEBUG:
92 case ERPCs.DEV_RPC_SPAWN_PRESET:
102 case ERPCs.DEV_RPC_SET_TIME:
167 Param5<int, int, int, int, int> p5 =
new Param5<int, int, int, int, int>(0, 0, 0, 0, 0);
238 Param7<string, float, float, float, bool, string, bool> p =
new Param7<string, float, float, float, bool, string, bool>(
"", 0, 0, 0,
false,
"",
false);
245 Param6<string, float, float, vector, bool, bool> p =
new Param6<string, float, float, vector, bool, bool>(
"", 0, 0,
"0 0 0",
false,
false);
252 auto p =
new Param10<string, int, float, float, int, int, float, float, bool, bool>(
"", 0, 0, 0, 0, 0, 0, 0,
false,
false);
254 SpawnEntityOnGroundPatternGrid(
player,
p.param1,
p.param2,
p.param3,
p.param4,
p.param5,
p.param6,
p.param7,
p.param8,
p.param9,
p.param10);
287 PrintString(
"PluginDeveloper.SpawnEntity() Warning- Cant spawn object: " +
name);
289 PrintString(
"PluginDeveloper.SpawnEntity() Warning END");
297 player.m_PresetItems.Clear();
298 player.m_PresetSpawned =
false;
303 plr.OnSpawnedFromConsole();
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)
353 ent.PlaceOnSurface();
357 item.ThrowPhysically(
null,
"0 0 0");
369 auto params =
new Param10<string, int, float, float, int, int, float, float, bool, bool>(
item_name,
count,
health,
quantity,
rows,
columns,
gapRow,
gapColumn,
special,
withPhysics);
370 player.RPCSingleParam(
ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND_PATTERN_GRID,
params,
true);
423 item.ThrowPhysically(
null,
"0 0 0");
429 Param6<string, float, float, vector, bool, bool> params =
new Param6<string, float, float, vector, bool, bool>(
item_name,
health,
quantity, pos,
special,
withPhysics);
461 item.ThrowPhysically(
null,
"0 0 0");
468 Param7<string, float, float, float, bool, string, bool> params =
new Param7<string, float, float, float, bool, string, bool>(
item_name,
quantity,
distance,
health,
special,
presetName,
withPhysics);
524 if (!
GetGame().IsMultiplayer())
657 if (!
GetGame().GetWorld().Is3rdPersonDisabled())
713 g_Game.GetUIManager().Back();
723 GetGame().GetMission().AddActiveInputExcludes({
"menu"});
728 g_Game.GetUIManager().Back();
729 GetGame().GetMission().RemoveActiveInputExcludes({
"menu"},
true);
739 g_Game.GetUIManager().Back();
740 GetGame().GetMission().RemoveActiveInputExcludes({
"menu"},
true);
744 if (
g_Game.GetUIManager().GetMenu())
745 g_Game.GetUIManager().GetMenu().Close();
748 GetGame().GetMission().AddActiveInputExcludes({
"menu"});
847 GetGame().GetMission().ResetGUI();
856 GetGame().GetInput().ChangeGameFocus(1);
857 GetGame().GetUIManager().ShowUICursor(
true);
886 ActionTarget
at =
player.GetActionManager().FindActionTarget();
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
const CallID CALL_ID_SCR_CNSL_HISTORY_NEXT
const CallID CALL_ID_SCR_CNSL_HISTORY_BACK
const CallID CALL_ID_SCR_CNSL_ADD_PRINT
Param CallMethod(CallID call_id, Param params)
FindInventoryLocationType
flags for searching locations in inventory
void SetupSpawnedItem(ItemBase item, float health, float quantity)
override void ClearInventory()
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.
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
static void ReceivedLogMessageFromServer(string message)
static void OnSetFreeCameraEvent(PlayerBase player, FreeDebugCamera camera)
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
provides access to slot configuration
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
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)
void PrintLogClient(string msg_log)
void ToggleScriptConsole()
void OnSpawnErrorReport(string name)
void OnRPCSyncSceneObject(ParamsReadContext ctx)
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)
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 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 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)
Serialization general interface. Serializer API works with:
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
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.