From 90725f671fbd626d7ad2f46ceb11c9cc38868d86 Mon Sep 17 00:00:00 2001 From: SchnitzelPommes <41128311+SchnitzelPommes@users.noreply.github.com> Date: Mon, 26 Nov 2018 21:42:11 +0100 Subject: [PATCH] Initial Upload --- DayZ-Sa-Tomato/Config/Admins.txt | 3 + DayZ-Sa-Tomato/Config/Test.txt | 1 + DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo | Bin 0 -> 146919 bytes DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ | 1 + .../addons/DayZ-SA-Tomato/$REVISION$ | 1 + .../addons/DayZ-SA-Tomato/PBOPREFIX.txt | 6 + .../addons/DayZ-SA-Tomato/config.cpp | 10 + .../DayZ-SA-Tomato/scripts/4_World/COMCam.c | 265 +++++ .../scripts/4_World/MiscGameplayFunctions.c | 4 + .../scripts/5_Mission/M_MissionG.c | 98 ++ .../DayZ-SA-Tomato/scripts/5_Mission/M_RPCs.c | 57 ++ .../5_Mission/core/CommunityOfflineServer.c | 355 +++++++ .../scripts/5_Mission/core/KeyMouseBinding.c | 243 +++++ .../scripts/5_Mission/core/StaticFunctions.c | 452 +++++++++ .../5_Mission/core/modules/AdminMenu.c | 924 ++++++++++++++++++ .../scripts/5_Mission/core/modules/DevCam.c | 70 ++ .../5_Mission/core/modules/DevTeleport.c | 63 ++ .../core/modules/GUI/AdminMenuCommands.c | 198 ++++ .../5_Mission/core/modules/GUI/AdminMenuGui.c | 302 ++++++ .../core/modules/GUI/AdminMenuManager.c | 58 ++ .../5_Mission/core/modules/GUI/AdminMenuMap.c | 108 ++ .../core/modules/GUI/AdminMenuPlayer.c | 293 ++++++ .../core/modules/GUI/AdminMenuSpawn.c | 474 +++++++++ .../modules/GUI/Layouts/Admin_Commands.layout | 178 ++++ .../modules/GUI/Layouts/Admin_Main.layout | 577 +++++++++++ .../core/modules/GUI/Layouts/Admin_Map.layout | 57 ++ .../modules/GUI/Layouts/Admin_Player.layout | 283 ++++++ .../modules/GUI/Layouts/Admin_Spawn.layout | 255 +++++ DayZ-Sa-Tomato/mod.cpp | 41 + 29 files changed, 5377 insertions(+) create mode 100644 DayZ-Sa-Tomato/Config/Admins.txt create mode 100644 DayZ-Sa-Tomato/Config/Test.txt create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$REVISION$ create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/PBOPREFIX.txt create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/COMCam.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/MiscGameplayFunctions.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionG.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_RPCs.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/CommunityOfflineServer.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/KeyMouseBinding.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/StaticFunctions.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/AdminMenu.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevCam.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevTeleport.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuCommands.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuGui.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuManager.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMap.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuPlayer.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuSpawn.c create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Commands.layout create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Main.layout create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Map.layout create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Player.layout create mode 100644 DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Spawn.layout create mode 100644 DayZ-Sa-Tomato/mod.cpp diff --git a/DayZ-Sa-Tomato/Config/Admins.txt b/DayZ-Sa-Tomato/Config/Admins.txt new file mode 100644 index 0000000..f6e81e1 --- /dev/null +++ b/DayZ-Sa-Tomato/Config/Admins.txt @@ -0,0 +1,3 @@ +76561198017833573 +76561198134309775 +76561198065995341 diff --git a/DayZ-Sa-Tomato/Config/Test.txt b/DayZ-Sa-Tomato/Config/Test.txt new file mode 100644 index 0000000..d012d14 --- /dev/null +++ b/DayZ-Sa-Tomato/Config/Test.txt @@ -0,0 +1 @@ +TestString \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo b/DayZ-Sa-Tomato/addons/DayZ-SA-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aOqKkKazdfpSrYgnGWh9-iA zkdJV+ZW(rwH9D`-x0vM>F-)P|hsbndcJ9TUp~EBNMN$*W9lA7_gD~C1SQTOK&|qx< zI=e(=*gJH~HUOSnvm)#ryJrM`?3-n0DV-W+`f7D@HJP0x5>Ngxc4D3yWiLn5vTd5Z zKTMX~l3pn&o?0SnK;N-;A{{2iVTGL?FIH=>kB*EIW#!)t2PiZdjZn$Rd&&s%Xv;2l z#mW=v@pfI5=hutL514I&!Vy6JRvh8dKC%!r%wgrQ)R~bMCt?OhixNZv8yaWYL+9Ca zK0nueVykEzMyx@x+&1y}BPP1Mecvu3W|;_$LP;a84EI^8RMgt!igA`&;)p>+i4Xqc#tu+zBYdZ}Cu^%7}wd4|^-j}vp9gEHE7Zt(D z?D{5+i#M3!7h*`W7Td*elRYBR=kI1?8P77#`;-9OWYWYH*b-~-bk7mX)%zg`9KefX zkTFe14%Zg#}{Fs;W+wjksZa0tIIpmeYH5jAp zn<-m$Kk=c?=VEp4T>>R*?tsLsxlNF}9WXae$)3@0+G#Em+X>v6Ozb)pa(1&=&KJbO zSnCnAVI-0!^|WgrMO}Z%F!=JY4&rdKs&!Z}^S&c+|Gb#rgn`p_;7(>gU?A^&k)9hf zM1;K?0^4J}eHzE!Aj|CwDsyJz;s&ES5)a}eLF*2a3Ixx0CRkkNnpKE5U0w4iVY@2~HH9vQbfk(4poawI-(nN(jVUPK1(J8t$D!*I|oXwx#`2)+F$+b9`(G zQP95N)!E-8GFk5kT7dURj2gY*8^OC@{p;KB=l}c7XFq-RbMx+Zzy9~{|MUHSfBSz) C{pc+K literal 0 HcmV?d00001 diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ new file mode 100644 index 0000000..6c342f1 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ @@ -0,0 +1 @@ +com\DayZ-SA-Tomato \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$REVISION$ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$REVISION$ new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$REVISION$ @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/PBOPREFIX.txt b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/PBOPREFIX.txt new file mode 100644 index 0000000..c822bc2 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/PBOPREFIX.txt @@ -0,0 +1,6 @@ +///'scripts.pbo' from Mikero's dos tools, dll version 5.66/// +prefix=com\DayZ-SA-Tomato +revision=1 +Pbo Type is: Arma Unknown pbo typ (no config). +Sha: '5CAF7A50CB0D1CACBB90A6A0DA4EFC47B8998E0D' +//////////// diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp new file mode 100644 index 0000000..0e071a0 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp @@ -0,0 +1,10 @@ +class CfgPatches +{ + class DayZSATomato + { + units[]={}; + weapons[]={}; + requiredVersion=0.1; + requiredAddons[]={}; + }; +}; \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/COMCam.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/COMCam.c new file mode 100644 index 0000000..8c2c77f --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/COMCam.c @@ -0,0 +1,265 @@ +modded class DayZSpectator +{ + protected float forwardVelocity; + protected float strafeVelocity; + protected float altitudeVelocity; + + protected float yawVelocity; + protected float pitchVelocity; + + protected float m_CamDrag = 0.95; + + protected float m_CamFOV = 1.0; // default FOV + protected float m_TargetFOV = 1.0; + protected float m_TargetRoll; + protected float m_DistanceToObject; + protected bool m_FollowTarget = false; + protected bool m_FreezePlayer = false; + protected bool m_OrbitalCam = false; + protected bool m_FreezeCam = false; + + protected bool m_FreezeMouse = false; + + static float CAMERA_FOV = 1.0; + static float CAMERA_TARGETFOV = 1.0; + static float CAMERA_FOV_SPEED_MODIFIER = 6.0; + static float CAMERA_SPEED = 2.0; + static float CAMERA_MAXSPEED = 1.0; + static float CAMERA_VELDRAG; + static float CAMERA_MSENS = 0.8; // acceleration + static float CAMERA_SMOOTH = 0.8; // drag + + static bool CAMERA_DOF = false; + static bool CAMERA_AFOCUS = true; + static float CAMERA_BLUR = 0.0; // modified via ui + static float CAMERA_FLENGTH = 50.0; // modified via ui + static float CAMERA_FNEAR = 50.0; // modified via ui + static float CAMERA_FDIST = 0.0; + static float CAMERA_DOFFSET = 0.0; + + static float CAMERA_SMOOTH_BLUR = 0.0; + + protected vector m_CamOffset; + + protected Object m_Target; + protected vector m_TargetPos; // Static position + + protected float m_CurrentSmoothBlur; + + override void EOnFrame(IEntity other, float timeSlice) + { + // zoom camera + int i = GetMouseState( MouseState.WHEEL ); + + if ( i != 0 ) + { + if ( CTRL() ) + { + vector ori = GetOrientation(); + m_TargetRoll = ori[2] - Math.RAD2DEG * i*0.06; + } + else + { + m_TargetFOV-=i*0.06; // invert + if ( m_TargetFOV < 0.01 ) + { + m_TargetFOV = 0.01; + } + } + } + + if ( m_CamFOV != m_TargetFOV ) + { + m_CamFOV = Math.Lerp( m_CamFOV, m_TargetFOV, timeSlice*CAMERA_FOV_SPEED_MODIFIER ); + SetFOV( m_CamFOV ); + } + + vector oldOrient = GetOrientation(); + if ( oldOrient[2] != m_TargetRoll ) + { + oldOrient[2] = Math.Lerp( oldOrient[2], m_TargetRoll, timeSlice*CAMERA_FOV_SPEED_MODIFIER ); + SetOrientation( oldOrient ); + } + + // Camera movement + Input input = GetGame().GetInput(); + + if ( !m_FreezeCam ) + { + float forward = input.GetAction(UAMoveForward) - input.GetAction(UAMoveBack); // -1, 0, 1 + float strafe = input.GetAction(UATurnRight) - input.GetAction(UATurnLeft); + + float altitude = input.GetAction(UACarShiftGearUp) - input.GetAction(UACarShiftGearDown); + altitudeVelocity = altitudeVelocity + altitude * CAMERA_SPEED * timeSlice; + + Math.Clamp( altitudeVelocity, -CAMERA_MAXSPEED, CAMERA_MAXSPEED); + vector up = vector.Up * altitudeVelocity; + + vector direction = GetDirection(); + vector directionAside = vector.Up * direction; + + altitudeVelocity *= m_CamDrag; + + vector oldPos = GetPosition(); + + forwardVelocity = forwardVelocity + forward * CAMERA_SPEED * timeSlice; + strafeVelocity = strafeVelocity + strafe * CAMERA_SPEED * timeSlice; + + Math.Clamp ( forwardVelocity, -CAMERA_MAXSPEED, CAMERA_MAXSPEED); + Math.Clamp ( strafeVelocity, -CAMERA_MAXSPEED, CAMERA_MAXSPEED); + + vector forwardChange = forwardVelocity * direction; + vector strafeChange = strafeVelocity * directionAside; + + forwardVelocity *= m_CamDrag; + strafeVelocity *= m_CamDrag; + + vector newPos = oldPos + forwardChange + strafeChange + up; + + float surfaceY = GetGame().SurfaceY( newPos[0], newPos[2] ) + 0.25; + if ( newPos[1] < surfaceY ) + { + newPos[1] = surfaceY; + } + + SetPosition(newPos); + } + + if ( !m_FreezeMouse ) + { + float yawDiff = input.GetAction(UAAimHeadLeft) - input.GetAction(UAAimHeadRight); + float pitchDiff = input.GetAction(UAAimHeadDown) - input.GetAction(UAAimHeadUp); + + yawVelocity = yawVelocity + yawDiff * CAMERA_MSENS; + pitchVelocity = pitchVelocity + pitchDiff * CAMERA_MSENS; // 0.8 + + vector newOrient = oldOrient; + + Math.Clamp ( yawVelocity, -1.5, 1.5); + Math.Clamp ( pitchVelocity, -1.5, 1.5); + + newOrient[0] = newOrient[0] - Math.RAD2DEG * yawVelocity * timeSlice; + newOrient[1] = newOrient[1] - Math.RAD2DEG * pitchVelocity * timeSlice; + + yawVelocity *= CAMERA_SMOOTH; // drag 0.9 + pitchVelocity *= CAMERA_SMOOTH; + + if( newOrient[1] < -89 ) + newOrient[1] = -89; + if( newOrient[1] > 89 ) + newOrient[1] = 89; + + SetOrientation( newOrient ); + } + + + // Camera targetting + float dist = 0.0; + vector from = GetGame().GetCurrentCameraPosition(); + + if ( m_Target ) + { + vector targetPos; + + if ( m_Target.IsInherited( SurvivorBase ) ) + { + targetPos = GetTargetCenter(); + } + else + { + vector pos = m_Target.GetPosition(); + pos[1] = GetGame().SurfaceY(pos[0], pos[2]); + + vector clippingInfo; + vector objectBBOX; + + m_Target.GetCollisionBox(objectBBOX); + + pos[1] = (pos[1] - objectBBOX[1] + clippingInfo[1] - objectBBOX[1]) + 1.5; + + targetPos = pos; + } + + if ( m_OrbitalCam ) + { + LookAt( targetPos ); + } + + dist = vector.Distance( from, targetPos ); + + if ( m_FollowTarget ) + { + if ( m_DistanceToObject == 0.0 ) + { + m_DistanceToObject = vector.Distance(GetTargetCenter(), GetPosition()); + m_CamOffset = vector.Direction( GetTargetCenter() , GetPosition() ); + m_CamOffset.Normalize(); + } + + if ( m_OrbitalCam ) + { + direction = vector.Direction( GetTargetCenter() , GetPosition() ); + direction.Normalize(); + newPos = GetTargetCenter() + ( direction * m_DistanceToObject ); + } + else + { + newPos = GetTargetCenter() + ( m_CamOffset * m_DistanceToObject ); + } + + SetPosition( newPos ); + dist = m_DistanceToObject; + } + } + else if ( m_TargetPos != vector.Zero ) + { + LookAt( m_TargetPos ); // auto orbital + dist = vector.Distance( from, m_TargetPos ); + } + + if ( CAMERA_DOF ) // DOF enabled + { + if ( CAMERA_AFOCUS && !m_Target ) //auto focus + { + vector to = from + (GetGame().GetCurrentCameraDirection() * 9999); + vector contact_pos; + + DayZPhysics.RaycastRV( from, to, contact_pos, NULL, NULL, NULL , NULL, NULL, false, false, ObjIntersectIFire); + dist = vector.Distance( from, contact_pos ); + } + if ( dist > 0 ) CAMERA_FDIST = dist; + + PPEffects.OverrideDOF(true, CAMERA_FDIST, CAMERA_FLENGTH, CAMERA_FNEAR, CAMERA_BLUR, CAMERA_DOFFSET); + } + } + + vector GetTargetCenter() + { + vector targetPosition; + + if ( m_Target.IsInherited( SurvivorBase )) + { + targetPosition = m_Target.GetPosition(); + targetPosition[1] = targetPosition[1] + 1.5; + } + else + { + targetPosition = m_Target.GetPosition(); + targetPosition[1] = GetGame().SurfaceY(targetPosition[0], targetPosition[2]); + + vector clippingInfo; + vector objectBBOX; + + m_Target.GetCollisionBox(objectBBOX); + + targetPosition[1] = (targetPosition[1] - objectBBOX[1] + clippingInfo[1] - objectBBOX[1]) + 1.5; + } + + return targetPosition; + } +} + +static bool CTRL() // static functions arent scope global? +{ + return( ( KeyState( KeyCode.KC_LCONTROL ) > 0 ) || ( KeyState( KeyCode.KC_RCONTROL ) > 0 ) ); +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/MiscGameplayFunctions.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/MiscGameplayFunctions.c new file mode 100644 index 0000000..7d9779b --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/MiscGameplayFunctions.c @@ -0,0 +1,4 @@ +static float GetWaterMetabolicSpeed(int movement_speed) +{ + return 0.0; +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionG.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionG.c new file mode 100644 index 0000000..a870c9e --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionG.c @@ -0,0 +1,98 @@ +/* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +modded class MissionGameplay +{ + ref DevTeleport devTeleport; + ref DevCam devCam; + ref AdminMenu adminMenu; + ref AdminMenuManager adminMenuManager; + //ref AdminMenuMain AdminMenumain; + + bool isSpectating = false; + bool MenuOpen = false; + void MissionGameplay() + { + Print( " Mission Gameplay Constructor "); + + devTeleport = new DevTeleport(); + devCam = new DevCam(); + adminMenu = new AdminMenu(); + adminMenuManager = new AdminMenuManager(); + } + + override void OnInit() + { + super.OnInit(); + + Print( " Mission Gameplay "); + } + + override void OnMissionStart() + { + super.OnMissionStart(); + + Widget welcomeMenu = GetGame().GetWorkspace().CreateWidgets( "DZ\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\WelcomeMenu.layout", NULL ); + //welcomeMenu.Show(true); + + GetGame().GetCallQueue( CALL_CATEGORY_GUI ).CallLater( welcomeMenu.Show, 5000, false, false ); + } + + + override void OnKeyRelease( int key ) + { + super.OnKeyRelease( key ); + PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer()); + if ( key == KeyCode.KC_N ) + { + adminMenuManager.Teleport(); + if ( GetGame().IsClient() ) + { + } + } + + if ( key == KeyCode.KC_INSERT ) + { + + //devCam.SendRPC( isSpectating, GetCursorPos() ); + adminMenuManager.CamTeleport( isSpectating, GetCursorPos() ); + + isSpectating = !isSpectating; + } + if ( key == KeyCode.KC_M ) + { + if(GetGame().IsClient() || !GetGame().IsMultiplayer()) + { + if ( player ) + { + adminMenuManager.MenuOpen(); + } + } + } + } +} + +Mission CreateCustomMission(string path) +{ + if ( GetGame().IsServer() && GetGame().IsMultiplayer() ) { + return new CommunityOfflineServer(); // this always runs because createcustommission isnt a client side function + } + return new MissionGameplay(); +} +// class, function, params \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_RPCs.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_RPCs.c new file mode 100644 index 0000000..a532b6b --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_RPCs.c @@ -0,0 +1,57 @@ +/* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +enum M_RPCs +{ + M_SPAWN_OBJECT = 7000; + M_SET_GODMODE = 7001; + M_SET_CAM = 7002; + M_TELEPORT = 7003; + M_Admin_Menu = 7004; + M_Admin_Menu_OK = 7005; + M_Admin_Menu_Spawn_Ground = 7006; + M_Admin_Menu_Spawn_Cursor = 7007; + M_Admin_Menu_Spawn_Inventory = 7008; + M_Admin_Menu_Heal = 7009; + M_Admin_Menu_Strip = 7010; + M_Admin_Menu_TpTo = 7011; + M_Admin_Menu_TpMe = 7012; + M_Admin_Menu_TpAllMe = 7013; + M_Admin_Menu_Spawn_Car = 7014; + M_Admin_Menu_Day = 7015; + M_Admin_Menu_Night = 7016; + M_Admin_Menu_Car_Refill = 7017; + M_Admin_Menu_TpToPos = 7018; + M_Admin_Menu_Kill = 7019; + M_Admin_Menu_SpWear = 7020; + M_Admin_Menu_Spawn_ItemPrev = 7021; + M_Admin_Menu_Spawn_ItemPrev_ok = 7022; + M_Admin_Menu_KillAll = 7023; + M_Admin_Menu_StripAll = 7024; + M_Admin_Menu_HealAll = 7025; + M_Admin_Menu_Stamina_Enable = 7026; + M_Admin_Menu_Stamina_Dissable = 7027; + M_Admin_Menu_PM = 7028; + M_Admin_Menu_Map_Player = 7029; + M_Admin_Menu_Map_Player_Request = 7030; + M_Admin_Menu_Player_Health_Request = 7031; + M_Admin_Menu_Player_Health = 7032; + M_Admin_Menu_Player_Stamina_Request = 7033; + M_Admin_Menu_Player_Stamina_ok = 7034; +} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/CommunityOfflineServer.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/CommunityOfflineServer.c new file mode 100644 index 0000000..b2b9542 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/CommunityOfflineServer.c @@ -0,0 +1,355 @@ +/* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class CommunityOfflineServer : MissionServer +{ + protected bool m_bLoaded; + ref DevTeleport devTeleport; + ref DevCam devCam; + ref AdminMenu adminMenu; + protected float m_LogInTimerLength = 1; + //admin list + PlayerBase Admin = null; + protected ref map m_AdminList; + static ref map m_StaminaList; + protected string m_AdminListPath = "$CurrentDir:\\DayZ-SA-Tomato\\Config\\"; + void CommunityOfflineServer() + { + Print( "CommunityOfflineServer::CommunityOfflineServer()" ); + m_bLoaded = false; + devTeleport = new DevTeleport(); + devCam = new DevCam(); + adminMenu = new AdminMenu(); + } + + void ~CommunityOfflineServer() + { + Print( "CommunityOfflineServer::~CommunityOfflineServer()" ); + } + + + //Create Mags And Custom Guns + void addMags(PlayerBase player, string mag_type, int count) + { + if (count < 1) + return; + + EntityAI mag; + + for (int i = 0; i < count; i++) { + mag = player.GetInventory().CreateInInventory(mag_type); + } + + player.SetQuickBarEntityShortcut(mag, 1, true); + } + EntityAI SVD(int ground, PlayerBase player) + { + EntityAI item; + ItemBase itemBs + vector NewPosition; + vector OldPosition; + if (ground == 1) + { + OldPosition = player.GetPosition(); + NewPosition[0] = OldPosition[0] + 1.5; + NewPosition[1] = OldPosition[1] + 0.1; + NewPosition[2] = OldPosition[2] + 1.5; + EntityAI gun = GetGame().CreateObject( "SVD", NewPosition, false, true ); + gun.GetInventory().CreateAttachment("PSO1Optic"); + gun.GetInventory().CreateAttachment("ImprovisedSuppressor"); + gun.GetInventory().CreateAttachment("GhillieAtt_Tan"); + }else + { + EntityAI gun1 = player.GetHumanInventory().CreateInHands("SVD"); + gun1.GetInventory().CreateAttachment("PSO1Optic"); + gun1.GetInventory().CreateAttachment("ImprovisedSuppressor"); + gun1.GetInventory().CreateAttachment("GhillieAtt_Tan"); + addMags(player, "Mag_SVD_10Rnd", 3); + } + return gun; +} + + override void OnEvent(EventType eventTypeId, Param params) + { + super.OnEvent(eventTypeId,params); + + + } + + + override void TickScheduler(float timeslice) + { + GetGame().GetWorld().GetPlayerList(m_Players); + if( m_Players.Count() == 0 ) return; + for(int i = 0; i < SCHEDULER_PLAYERS_PER_TICK; i++) + { + if(m_currentPlayer >= m_Players.Count() ) + { + m_currentPlayer = 0; + } + + PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(m_currentPlayer)); + string PlayerName; + PlayerIdentity PlayerIdent; + string PlayerSteam64ID; + vector PlayerPos; + + PlayerIdent = currentPlayer.GetIdentity(); + PlayerName = PlayerIdent.GetName(); + PlayerSteam64ID = PlayerIdent.GetPlainId(); + PlayerPos = currentPlayer.GetPosition() + currentPlayer.OnTick(); + + if (m_StaminaList.Contains(PlayerName)) + { + currentPlayer.GetStaminaHandler().SyncStamina(1000,1000); + currentPlayer.GetStatStamina().Set(currentPlayer.GetStaminaHandler().GetStaminaCap()); + + } + + if (IsAdmin(PlayerName, PlayerSteam64ID )) + { + currentPlayer.GetStaminaHandler().SyncStamina(1000,1000); + currentPlayer.GetStatStamina().Set(currentPlayer.GetStaminaHandler().GetStaminaCap()); + } + + m_currentPlayer++; + + + } + } + + void SendPosTOAdmins() + { + array players = new array; + GetGame().GetPlayers( players ); + + for (int i = 0; i < players.Count(); ++i) + { + + PlayerBase currentPlayer = players.Get(i); + string PlayerName; + PlayerIdentity PlayerIdent; + string PlayerSteam64ID; + PlayerName = PlayerIdent.GetName() + PlayerIdent = currentPlayer.GetIdentity(); + PlayerSteam64ID = PlayerIdent.GetPlainId(); + vector pos; + + pos = currentPlayer.GetPosition() + + SendPosToAdmins(PlayerName, pos) + + + } + } + void SendPosToAdmins(string PlayerName, vector pos) + { + array players = new array; + GetGame().GetPlayers( players ); + + for (int i = 0; i < players.Count(); ++i) + { + PlayerBase currentPlayer = players.Get(i); + string AdminPlayerName; + PlayerIdentity AdminIdent; + string PlayerSteam64ID; + AdminPlayerName = AdminIdent.GetName() + AdminIdent = currentPlayer.GetIdentity(); + PlayerSteam64ID = AdminIdent.GetPlainId(); + if (IsAdmin(AdminPlayerName, PlayerSteam64ID )) + { + ScriptRPC PPos = new ScriptRPC(); + PPos.Write(PlayerName); + PPos.Write(pos); + PPos.Send(NULL, M_RPCs.M_Admin_Menu_Map_Player, false, AdminIdent); + } + } + } + void AddStamina(string name) + { + m_StaminaList.Insert(name, "null"); + } + + void RemoveStamina(string name) + { + m_StaminaList.Remove(m_StaminaList.GetKeyByValue(name)); + } + bool StaminaContains(string name) + { + if (m_StaminaList.Contains(name)) + { + return true; + } + return false; + } + + + + bool IsAdmin( string name, string ID ) + { + array players = new array; + GetGame().GetPlayers( players ); + for (int i = 0; i < players.Count(); ++i) + { + if (players.Get(i).GetIdentity().GetName() == name && m_AdminList.Contains(ID)) + { + return true; + } + return false; + } + return false; + } + + PlayerBase IsAdminID(string name, string ID ) + { + array players = new array; + GetGame().GetPlayers( players ); + for (int i = 0; i < players.Count(); ++i) + { + if (players.Get(i).GetIdentity().GetName() == name && m_AdminList.Contains(ID)) + { + Admin = players.Get(i); + //AdminIdentity = Admin.GetIdentity(); + //AdminUID = AdminIdentity.GetPlainId(); + return Admin; + } + return Admin; + } + return Admin; // temp true + } + + ref Man GetPlayerFromIdentity( PlayerIdentity identity ) + { + foreach( ref Man manBase : m_Players ) + { + Print( "Getter: " + manBase + " : " + manBase.GetIdentity().GetName() + " : " + manBase.GetIdentity().GetId() + ":" + manBase.GetIdentity().GetPlainId()); + if ( manBase.GetIdentity().GetPlayerId() == identity.GetPlayerId() ) + { + return manBase; + } + } + return NULL; + } + + override void OnInit() + { + super.OnInit(); + SetupWeather(); + + //Admin list Insert from text + m_AdminList = new map; //UID, name + m_StaminaList = new map; //UID, name + FileHandle AdminUIDSFile = OpenFile(m_AdminListPath + "Admins.txt", FileMode.READ); + if (AdminUIDSFile != 0) + { + string line_content = ""; + while ( FGets(AdminUIDSFile,line_content) > 0 ) + { + m_AdminList.Insert(line_content,"null"); //UID , NAME + Print("Adding Admin: "+ line_content + " To the Admin List!"); + } + CloseFile(AdminUIDSFile); + } + + } + + override void OnMissionStart() + { + super.OnMissionStart(); + + + } + + override void OnMissionFinish() + { + + + super.OnMissionFinish(); + } + + void OnMissionLoaded() + { + + } + + override void OnUpdate( float timeslice ) + { + super.OnUpdate( timeslice ); + + if( !m_bLoaded && !GetDayZGame().IsLoading() ) + { + m_bLoaded = true; + OnMissionLoaded(); + } + } + + static void SetupWeather() + { + //Offical DayZ SA weather code + Weather weather = g_Game.GetWeather(); + + weather.GetOvercast().SetLimits( 0.0 , 2.0 ); + weather.GetRain().SetLimits( 0.0 , 2.0 ); + weather.GetFog().SetLimits( 0.0 , 2.0 ); + + weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.0 ); + weather.GetRain().SetForecastChangeLimits( 0.0, 0.0 ); + weather.GetFog().SetForecastChangeLimits( 0.0, 0.0 ); + + weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 ); + weather.GetRain().SetForecastTimeLimits( 600 , 600 ); + weather.GetFog().SetForecastTimeLimits( 600 , 600 ); + + weather.GetOvercast().Set( 0.0, 0, 0 ); + weather.GetRain().Set( 0.0, 0, 0 ); + weather.GetFog().Set( 0.0, 0, 0 ); + + weather.SetWindMaximumSpeed( 50 ); + weather.SetWindFunctionParams( 0, 0, 1 ); + } + + override void OnPreloadEvent(PlayerIdentity identity, out bool useDB, out vector pos, out float yaw, out int queueTime) + { + if (GetHive()) + { + queueTime = m_LogInTimerLength; + } + else + { + queueTime = m_LogInTimerLength; + } +} + + + void InitHive() + { + Hive oHive = GetHive(); + + if( !oHive ) + { + oHive = CreateHive(); + } + + if( oHive ) + { + oHive.InitOffline(); + } + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/KeyMouseBinding.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/KeyMouseBinding.c new file mode 100644 index 0000000..285c45d --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/KeyMouseBinding.c @@ -0,0 +1,243 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class KeyMouseBinding +{ + const int KB_EVENT_PRESS = 0; + const int KB_EVENT_RELEASE = 1; + const int KB_EVENT_HOLD = 2; + + const int MB_EVENT_PRESS = 0; + const int MB_EVENT_CLICK = 1; + const int MB_EVENT_RELEASE = 2; + const int MB_EVENT_DOUBLECLICK = 3; + const int MB_EVENT_DRAG = 4; + const int MB_EVENT_HOLD = 5; + + protected typename m_Object; + protected ref map m_KeyBinds; + protected ref map m_MouseBinds; + protected string m_strCallbackFunction; + protected string m_strShortcut; + protected string m_strDescription; + protected bool canUseInMenu; + + void KeyMouseBinding( typename object, string callback, string shortcut, string description, bool menu = false ) + { + m_Object = object; + m_KeyBinds = new map< int, int >; + m_MouseBinds = new map< int, int >; + + m_strCallbackFunction = callback; + m_strShortcut = shortcut; + m_strDescription = description; + + canUseInMenu = menu; + } + + bool canUseInMenu() + { + return canUseInMenu; + } + + bool Check() + { + bool k_m_Pressed = true; + for ( int kb = 0; kb < m_KeyBinds.Count(); ++kb ) + { + int keyCode = m_KeyBinds.GetKey(kb); + int keyEvent = m_KeyBinds.Get(keyCode); + + if ( keyEvent == KB_EVENT_RELEASE ) + { // Skip checking for release keys + continue; + } + if ( KeyState( keyCode ) == 0 ) + { + k_m_Pressed = false; + } + } + + for ( int mb = 0; mb < m_MouseBinds.Count(); ++mb ) + { + int mouseButton = m_MouseBinds.GetKey(mb); + int mouseEvent = m_MouseBinds.Get(mouseButton); + + if ( mouseEvent == MB_EVENT_RELEASE || mouseEvent == MB_EVENT_CLICK || mouseEvent == MB_EVENT_DOUBLECLICK || mouseButton == MouseState.WHEEL || mouseEvent == MB_EVENT_DRAG ) + { + continue; // Skip checking for release buttons, click or double click, or mouse drag/wheel (handled else where) + } + if ( !(GetMouseState( mouseButton ) & MB_PRESSED_MASK ) ) + { + k_m_Pressed = false; + } + } + return k_m_Pressed; + } + + bool IsRecurring() // Recurring if both mouse or keys are hold, drag OR wheel + { + bool recurring = true; + + for ( int kb = 0; kb < m_KeyBinds.Count(); ++kb ) + { + int keyCode = m_KeyBinds.GetKey(kb); + int keyEvent = m_KeyBinds.Get(keyCode); + + + if ( keyEvent != KB_EVENT_HOLD ) + { + return false; // a key is found that is not hold or drag. so it should not be recurring + } + } + + for ( int mb = 0; mb < m_MouseBinds.Count(); ++mb ) + { + int mouseButton = m_MouseBinds.GetKey(mb); + int mouseEvent = m_MouseBinds.Get(mouseButton); + + if ( mouseEvent != MB_EVENT_DRAG && mouseEvent != MB_EVENT_HOLD && mouseButton != MouseState.WHEEL ) + { + return false; + } + } + + + return recurring; + } + + bool IsHold() + { + bool release = false; + + for ( int kb = 0; kb < GetKeyBinds().Count(); ++kb) + { + int keyCode = m_KeyBinds.GetKey(kb); + int keyEvent = m_KeyBinds.Get(keyCode); + + if ( keyEvent == KB_EVENT_RELEASE ) + { + + } + } + + return ( m_KeyBinds.GetKeyByValue(KB_EVENT_RELEASE) || m_MouseBinds.GetKeyByValue(MB_EVENT_RELEASE) ); + } + + bool HasKeyEvent( int key_Event ) + { + for ( int kb = 0; kb < GetKeyBinds().Count(); ++kb) + { + int keyCode = m_KeyBinds.GetKey(kb); + int keyEvent = m_KeyBinds.Get(keyCode); + + if ( keyEvent == key_Event ) + { + return true; + } + } + + return false; + } + + bool ContainsKey( int key ) + { + return m_KeyBinds.Contains( key ); + } + + bool ContainsButton( int button ) + { + return m_MouseBinds.Contains( button ); + } + + bool ContainsKeyEvent( int key, int key_Event ) + { + int kc = -1; + for ( int kb = 0; kb < GetKeyBinds().Count(); ++kb) + { + int keyCode = m_KeyBinds.GetKey(kb); + int keyEvent = m_KeyBinds.Get(keyCode); + + if ( keyCode == key && keyEvent == key_Event ) + { + kc = keyCode; + } + } + + return kc > -1; + } + + bool ContainsButtonEvent( int button, int button_Event ) + { + int m = -1; + for ( int mb = 0; mb < GetMouseBinds().Count(); ++mb) + { + int mouseBind = m_MouseBinds.GetKey(mb); + int mouseEvemt = m_MouseBinds.Get(mouseBind); + + if ( mouseBind == button && mouseEvemt == button_Event ) + { + m = mouseBind; + } + } + + return m > -1; + } + + void AddKeyBind( int key, int key_event ) + { + m_KeyBinds.Insert( key, key_event ); + } + + void AddMouseBind( int button, int mouse_event ) + { + m_MouseBinds.Insert( button, mouse_event ); + } + + ref map GetKeyBinds() + { + return m_KeyBinds; + } + + ref map GetMouseBinds() + { + return m_MouseBinds; + } + + typename GetObject() + { + return m_Object; + } + + string GetShortcut() + { + return m_strShortcut; + } + + string GetDescription() + { + return m_strDescription; + } + + string GetCallBackFunction() + { + return m_strCallbackFunction; + } + +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/StaticFunctions.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/StaticFunctions.c new file mode 100644 index 0000000..875f4de --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/StaticFunctions.c @@ -0,0 +1,452 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +static string FormatFloat( float value, int decimals ) +{ + string result = ""; + array output = new array; + + value.ToString().Split(".", output); + + if ( output.Count() == 0 ) return value.ToString(); + + if ( decimals == 0 ) return output.Get(0); + + string right = output.Get(1).Substring(0, decimals); + result = output.Get(0) + "." + right; + + return result; +} + +static string VectorToString( vector vec ) +{ + string result = vec.ToString(); + result.Replace( "<", "" ); + result.Replace( ">", "" ); + result.Replace( ",", "" ); + + return result; +} + +static string VectorToString( vector vec, int decimals ) +{ + string result = ""; + result = FormatFloat(vec[0], decimals) + "|" + FormatFloat(vec[1], decimals) + "|" + FormatFloat(vec[2], decimals); + + return result; +} + +static TStringArray GetChildrenFromBaseClass( string strConfigName, string strBaseClass ) +{ + string child_name = ""; + int count = GetGame().ConfigGetChildrenCount ( strConfigName ); + TStringArray class_names = new TStringArray; + + for (int p = 0; p < count; p++) + { + GetGame().ConfigGetChildName ( strConfigName, p, child_name ); + + if ( GetGame().IsKindOf(child_name, strBaseClass ) && ( child_name != strBaseClass ) ) + { + class_names.Insert(child_name); + } + } + + return class_names; +} + +static TVectorArray GetSpawnPoints() +{ + return { "15135.1 0 13901.1", "15017.8 0 13892.4", "14887.1 0 14547.9", "14749.7 0 13248.7", + "14697.6 0 13418.4", "14537.3 0 14755.7", "14415.3 0 14025.2", "14338.0 0 12859.5", + "14263.8 0 12748.7", "14172.2 0 12304.9", "14071.4 0 12033.3", "14054.9 0 11341.3", + "14017.8 0 2959.1", "13905.5 0 12489.7", "13852.4 0 11686.0", "13846.6 0 12050.0", + "13676.0 0 12262.1", "13617.4 0 12759.8", "13610.1 0 11223.6", "13594.3 0 4064.0", + "13587.8 0 6026.5", "13571.1 0 3056.8", "13552.6 0 4653.7", "13529.9 0 3968.3", + "13520.8 0 4223.7", "13504.0 0 5004.5", "13476.7 0 6136.3", "13441.6 0 5262.2", + "13426.6 0 5747.3", "13416.8 0 11840.4", "13400.8 0 4120.7", "13395.8 0 5902.8", + "13385.0 0 3946.6", "13374.4 0 6454.3", "13367.1 0 10837.1", "13366.3 0 4906.0", + "13337.1 0 5120.8", "13326.7 0 5489.1", "13312.7 0 6771.1", "13288.7 0 11415.1", + "13261.6 0 11785.2", "13171.6 0 6534.8", "13159.8 0 5401.7", "13155.2 0 5475.2", + "13084.9 0 7938.6", "13056.8 0 4848.5", "13048.1 0 8357.6", "13048.1 0 3867.7", + "12991.7 0 7287.1", "12983.0 0 5539.1", "12978.9 0 9727.8", "12950.2 0 5226.7", + "12942.1 0 8393.1", "12891.5 0 3673.9", "12628.7 0 10495.2", "12574.3 0 3592.8", + "12566.3 0 6682.6", "12465.2 0 8009.0", "12354.5 0 3480.0", "13262.8 0 7225.8" }; +} + +static TStringArray WorkingZombieClasses() +{ + return { "ZmbM_HermitSkinny_Base","ZmbM_HermitSkinny_Beige","ZmbM_HermitSkinny_Black","ZmbM_HermitSkinny_Green", + "ZmbM_HermitSkinny_Red","ZmbM_FarmerFat_Base","ZmbM_FarmerFat_Beige","ZmbM_FarmerFat_Blue","ZmbM_FarmerFat_Brown", + "ZmbM_FarmerFat_Green","ZmbF_CitizenANormal_Base","ZmbF_CitizenANormal_Beige","ZmbF_CitizenANormal_Brown", + "ZmbF_CitizenANormal_Blue","ZmbM_CitizenASkinny_Base","ZmbM_CitizenASkinny_Blue","ZmbM_CitizenASkinny_Brown", + "ZmbM_CitizenASkinny_Grey","ZmbM_CitizenASkinny_Red","ZmbM_CitizenBFat_Base","ZmbM_CitizenBFat_Blue","ZmbM_CitizenBFat_Red", + "ZmbM_CitizenBFat_Green","ZmbF_CitizenBSkinny_Base","ZmbF_CitizenBSkinny","ZmbM_PrisonerSkinny_Base","ZmbM_PrisonerSkinny", + "ZmbM_FirefighterNormal_Base","ZmbM_FirefighterNormal","ZmbM_FishermanOld_Base","ZmbM_FishermanOld_Blue","ZmbM_FishermanOld_Green", + "ZmbM_FishermanOld_Grey","ZmbM_FishermanOld_Red","ZmbM_JournalistSkinny_Base","ZmbM_JournalistSkinny","ZmbF_JournalistNormal_Base", + "ZmbF_JournalistNormal_Blue","ZmbF_JournalistNormal_Green","ZmbF_JournalistNormal_Red","ZmbF_JournalistNormal_White", + "ZmbM_ParamedicNormal_Base","ZmbM_ParamedicNormal_Blue","ZmbM_ParamedicNormal_Green","ZmbM_ParamedicNormal_Red", + "ZmbM_ParamedicNormal_Black","ZmbF_ParamedicNormal_Base","ZmbF_ParamedicNormal_Blue","ZmbF_ParamedicNormal_Green", + "ZmbF_ParamedicNormal_Red","ZmbM_HikerSkinny_Base","ZmbM_HikerSkinny_Blue","ZmbM_HikerSkinny_Green","ZmbM_HikerSkinny_Yellow", + "ZmbF_HikerSkinny_Base","ZmbF_HikerSkinny_Blue","ZmbF_HikerSkinny_Grey","ZmbF_HikerSkinny_Green","ZmbF_HikerSkinny_Red", + "ZmbM_HunterOld_Base","ZmbM_HunterOld_Autumn","ZmbM_HunterOld_Spring","ZmbM_HunterOld_Summer","ZmbM_HunterOld_Winter", + "ZmbF_SurvivorNormal_Base","ZmbF_SurvivorNormal_Blue","ZmbF_SurvivorNormal_Orange","ZmbF_SurvivorNormal_Red", + "ZmbF_SurvivorNormal_White","ZmbM_SurvivorDean_Base","ZmbM_SurvivorDean_Black","ZmbM_SurvivorDean_Blue","ZmbM_SurvivorDean_Grey", + "ZmbM_PolicemanFat_Base","ZmbM_PolicemanFat","ZmbF_PoliceWomanNormal_Base","ZmbF_PoliceWomanNormal","ZmbM_PolicemanSpecForce_Base", + "ZmbM_PolicemanSpecForce","ZmbM_SoldierNormal_Base","ZmbM_SoldierNormal","ZmbM_usSoldier_normal_Base", + "ZmbM_usSoldier_normal_Woodland","ZmbM_usSoldier_normal_Desert","ZmbM_CommercialPilotOld_Base","ZmbM_CommercialPilotOld_Blue", + "ZmbM_CommercialPilotOld_Olive","ZmbM_CommercialPilotOld_Brown","ZmbM_CommercialPilotOld_Grey","ZmbM_PatrolNormal_Base", + "ZmbM_PatrolNormal_PautRev","ZmbM_PatrolNormal_Autumn","ZmbM_PatrolNormal_Flat","ZmbM_PatrolNormal_Summer","ZmbM_JoggerSkinny_Base", + "ZmbM_JoggerSkinny_Blue","ZmbM_JoggerSkinny_Green","ZmbM_JoggerSkinny_Red","ZmbF_JoggerSkinny_Base","ZmbF_JoggerSkinny_Blue", + "ZmbF_JoggerSkinny_Brown","ZmbF_JoggerSkinny_Green","ZmbF_JoggerSkinny_Red","ZmbM_MotobikerFat_Base","ZmbM_MotobikerFat_Beige", + "ZmbM_MotobikerFat_Black","ZmbM_MotobikerFat_Blue","ZmbM_VillagerOld_Base","ZmbM_VillagerOld_Blue","ZmbM_VillagerOld_Green", + "ZmbM_VillagerOld_White","ZmbM_SkaterYoung_Base","ZmbM_SkaterYoung_Blue","ZmbM_SkaterYoung_Brown","ZmbM_SkaterYoung_Green", + "ZmbM_SkaterYoung_Grey","ZmbF_SkaterYoung_Base","ZmbF_SkaterYoung_Brown","ZmbF_SkaterYoung_Striped","ZmbF_SkaterYoung_Violet", + "ZmbF_DoctorSkinny_Base","ZmbF_DoctorSkinny","ZmbF_BlueCollarFat_Base","ZmbF_BlueCollarFat_Blue","ZmbF_BlueCollarFat_Green", + "ZmbF_BlueCollarFat_Red","ZmbF_BlueCollarFat_White","ZmbF_MechanicNormal_Base","ZmbF_MechanicNormal_Beige","ZmbF_MechanicNormal_Green", + "ZmbF_MechanicNormal_Grey","ZmbF_MechanicNormal_Orange","ZmbM_MechanicSkinny_Base","ZmbM_MechanicSkinny_Blue","ZmbM_MechanicSkinny_Grey", + "ZmbM_MechanicSkinny_Green","ZmbM_MechanicSkinny_Red","ZmbM_ConstrWorkerNormal_Base","ZmbM_ConstrWorkerNormal_Beige", + "ZmbM_ConstrWorkerNormal_Black","ZmbM_ConstrWorkerNormal_Green","ZmbM_ConstrWorkerNormal_Grey","ZmbM_HeavyIndustryWorker_Base", + "ZmbM_HeavyIndustryWorker","ZmbM_OffshoreWorker_Base","ZmbM_OffshoreWorker_Green","ZmbM_OffshoreWorker_Orange","ZmbM_OffshoreWorker_Red", + "ZmbM_OffshoreWorker_Yellow","ZmbF_NurseFat_Base","ZmbF_NurseFat","ZmbM_HandymanNormal_Base","ZmbM_HandymanNormal_Beige", + "ZmbM_HandymanNormal_Blue","ZmbM_HandymanNormal_Green","ZmbM_HandymanNormal_Grey","ZmbM_HandymanNormal_White","ZmbM_DoctorFat_Base", + "ZmbM_DoctorFat","ZmbM_Jacket_Base","ZmbM_Jacket_beige","ZmbM_Jacket_black","ZmbM_Jacket_blue","ZmbM_Jacket_bluechecks", + "ZmbM_Jacket_brown","ZmbM_Jacket_greenchecks","ZmbM_Jacket_grey","ZmbM_Jacket_khaki","ZmbM_Jacket_magenta","ZmbM_Jacket_stripes", + "ZmbF_PatientOld_Base","ZmbF_PatientOld","ZmbM_PatientSkinny_Base","ZmbM_PatientSkinny","ZmbF_ShortSkirt_Base","ZmbF_ShortSkirt_beige", + "ZmbF_ShortSkirt_black","ZmbF_ShortSkirt_brown","ZmbF_ShortSkirt_green","ZmbF_ShortSkirt_grey","ZmbF_ShortSkirt_checks", + "ZmbF_ShortSkirt_red","ZmbF_ShortSkirt_stripes","ZmbF_ShortSkirt_white","ZmbF_ShortSkirt_yellow","ZmbF_VillagerOld_Base", + "ZmbF_VillagerOld_Blue","ZmbF_VillagerOld_Green","ZmbF_VillagerOld_Red","ZmbF_VillagerOld_White","ZmbM_Soldier","ZmbM_SoldierAlice", + "ZmbM_SoldierHelmet","ZmbM_SoldierVest","ZmbM_SoldierAliceHelmet","ZmbM_SoldierVestHelmet","ZmbF_MilkMaidOld_Base", + "ZmbF_MilkMaidOld_Beige","ZmbF_MilkMaidOld_Black","ZmbF_MilkMaidOld_Green","ZmbF_MilkMaidOld_Grey","ZmbM_priestPopSkinny_Base", + "ZmbM_priestPopSkinny","ZmbM_ClerkFat_Base","ZmbM_ClerkFat_Brown","ZmbM_ClerkFat_Grey","ZmbM_ClerkFat_Khaki","ZmbM_ClerkFat_White", + "ZmbF_Clerk_Normal_Base","ZmbF_Clerk_Normal_Blue","ZmbF_Clerk_Normal_White","ZmbF_Clerk_Normal_Green","ZmbF_Clerk_Normal_Red" }; +} + +static set< Object > GetObjectsAt( vector from, vector to, Object ignore = NULL, float radius = 0.5, Object with = NULL ) +{ + vector contact_pos; + vector contact_dir; + int contact_component; + + set< Object > geom = new set< Object >; + set< Object > view = new set< Object >; + + DayZPhysics.RaycastRV( from, to, contact_pos, contact_dir, contact_component, geom, with, ignore, false, false, ObjIntersectGeom, radius ); + DayZPhysics.RaycastRV( from, to, contact_pos, contact_dir, contact_component, view, with, ignore, false, false, ObjIntersectView, radius ); + + if ( geom.Count() > 0 ) + { + return geom; + } + if ( view.Count() > 0 ) + { + return view; + } + return NULL; +} + +static Object GetPointerObject( Object ignore = NULL, float radius = 0.5, Object with = NULL ) +{ + vector dir = GetGame().GetPointerDirection(); + + vector from = GetGame().GetCurrentCameraPosition(); + + vector to = from + ( dir * 10000 ); + + auto objs = GetObjectsAt( from, to, ignore, radius, with ); + + if( objs.Count() > 0 ) + { + return objs[ 0 ]; + } + + return NULL; +} + +static Object GetCursorObject() +{ + vector rayStart = GetGame().GetCurrentCameraPosition(); + vector rayEnd = rayStart + GetGame().GetCurrentCameraDirection() * 10000; + + auto objs = GetObjectsAt( rayStart, rayEnd ); + + if( objs.Count() > 0 ) + { + return objs[ 0 ]; + } + + return NULL; +} + +static vector GetPointerPos() +{ + if ( !GetPlayer() ) + { + return "0 0 0"; + } + + vector dir = GetGame().GetPointerDirection(); + + vector from = GetGame().GetCurrentCameraPosition(); + + vector to = from + ( dir * 10000 ); + + vector rayStart = from; + vector rayEnd = to; + vector hitPos; + vector hitNormal; + int hitComponentIndex; + DayZPhysics.RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, NULL, NULL, GetPlayer()); + + return hitPos; +} + +static vector GetCursorPos() +{ + if ( !GetPlayer() ) + { + return "0 0 0"; + } + + vector rayStart = GetGame().GetCurrentCameraPosition(); + vector rayEnd = rayStart + GetGame().GetCurrentCameraDirection() * 10000; + vector hitPos; + vector hitNormal; + int hitComponentIndex; + DayZPhysics.RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, NULL, NULL, GetPlayer()); + + return hitPos; +} + + + +static Weapon GetWeaponInHands() +{ + Weapon weapon_in_hands; + if( GetPlayer() && GetPlayer().GetItemInHands() ) Class.CastTo(weapon_in_hands, GetPlayer().GetItemInHands()); + + return weapon_in_hands; +} + +static MissionBase GetMission() +{ + return MissionBase.Cast( GetGame().GetMission() ); +} + +static void SetFreezePlayer( ref PlayerBase player, bool freeze ) +{ + player.GetInputController().OverrideMovementSpeed( freeze, 0 ); + player.GetInputController().OverrideAimChangeX( freeze, 0 ); + player.GetInputController().OverrideAimChangeY( freeze, 0 ); +} + +static CommunityOfflineServer GetServerMission() +{ + return CommunityOfflineServer.Cast( GetGame().GetMission() ); +} + +static ref PlayerBase GetPlayer() +{ + return GetGame().GetPlayer(); +} + +static bool SHIFT() +{ + return( ( KeyState( KeyCode.KC_LSHIFT ) > 0 ) || ( KeyState( KeyCode.KC_RSHIFT ) > 0 ) ); +} + +static bool CTRL() +{ + return( ( KeyState( KeyCode.KC_LCONTROL ) > 0 ) || ( KeyState( KeyCode.KC_RCONTROL ) > 0 ) ); +} + +static bool ALT() +{ + return( ( KeyState( KeyCode.KC_LMENU ) > 0 ) || ( KeyState( KeyCode.KC_RMENU ) > 0 ) ); +} + +static bool WINKEY() +{ + return( ( KeyState( KeyCode.KC_LWIN ) > 0 ) || ( KeyState( KeyCode.KC_RWIN ) > 0 ) ); +} + +static ZombieBase SpawnInfected(vector pos) +{ + return ZombieBase.Cast(GetGame().CreateObject( WorkingZombieClasses().GetRandomElement(), pos, false, true )); +} + +/* +static Weapon_Base CreateWeapon( PlayerBase oPlayer ) +{ + Weapon_Base oWpn = Weapon_Base.Cast(oPlayer.GetInventory().CreateInInventory( "M4A1_Black" )); + oWpn.GetInventory().CreateAttachment( "M4_Suppressor" ); + oWpn.GetInventory().CreateAttachment( "M4_RISHndgrd_Black" ); + oWpn.GetInventory().CreateAttachment( "M4_MPBttstck_Black" ); + oWpn.GetInventory().CreateAttachment( "ACOGOptic" ); + + return oWpn; +} +*/ + +static Weapon_Base CreateWeapon( PlayerBase oPlayer, string sWeapon ) +{ + Weapon_Base oWpn = Weapon_Base.Cast(oPlayer.GetInventory().CreateInInventory( sWeapon )); + oWpn.GetInventory().CreateAttachment( "PistolSuppressor" ); + EntityAI optic = oWpn.GetInventory().CreateAttachment( "ReflexOptic" ); + optic.GetInventory().CreateAttachment("Battery9V"); + + return oWpn; +} + +static Magazine LoadMag( PlayerBase oPlayer, Weapon_Base oWpn ) +{ + Magazine oMag = Magazine.Cast(oPlayer.GetInventory().CreateInInventory( "Mag_UMP_25Rnd" )); + oPlayer.GetWeaponManager().AttachMagazine( oMag ); + + return oMag; +} + +static PlayerBase CreateCustomDefaultCharacter() +{ + PlayerBase oPlayer = PlayerBase.Cast( GetGame().CreatePlayer( NULL, GetGame().CreateRandomPlayer(), GetSpawnPoints().GetRandomElement(), 0, "NONE") ); + + EntityAI item = NULL; + + item = oPlayer.GetInventory().CreateInInventory( "AviatorGlasses" ); + item = oPlayer.GetInventory().CreateInInventory( "MilitaryBeret_UN" ); + item = oPlayer.GetInventory().CreateInInventory( "M65Jacket_Black" ); + item = oPlayer.GetInventory().CreateInInventory( "PlateCarrierHolster" ); + item = oPlayer.GetInventory().CreateInInventory( "TacticalGloves_Black" ); + item = oPlayer.GetInventory().CreateInInventory( "HunterPants_Autumn" ); + item = oPlayer.GetInventory().CreateInInventory( "MilitaryBoots_Black" ); + item = oPlayer.GetInventory().CreateInInventory( "AliceBag_Camo" ); + + item = oPlayer.GetInventory().CreateInInventory( "Mag_UMP_25Rnd" ); + + Weapon_Base oWpn = CreateWeapon(oPlayer, "UMP45"); + LoadMag(oPlayer, oWpn); + + oPlayer.LocalTakeEntityToHands( oWpn ); + oPlayer.SetQuickBarEntityShortcut( oWpn, 0, true ); + + return oPlayer; +} + +static string FileAttributeToString( FileAttr attr ) +{ + string fileType = ""; + if ( attr & FileAttr.DIRECTORY ) + { + fileType = fileType + "DIRECTORY"; + } + if ( attr & FileAttr.HIDDEN ) + { + fileType = fileType + "HIDDEN"; + } + if ( attr & FileAttr.READONLY ) + { + fileType = fileType + "READONLY"; + } + if ( attr & FileAttr.INVALID ) + { + fileType = fileType + "INVALID"; + } + return fileType; +} + +static vector SnapToGround(vector pos) +{ + float pos_x = pos[0]; + float pos_z = pos[2]; + float pos_y = GetGame().SurfaceY( pos_x, pos_z ); + vector tmp_pos = Vector( pos_x, pos_y, pos_z ); + tmp_pos[1] = tmp_pos[1] + pos[1]; + + return tmp_pos; +} + +static bool m_GodMode; // move these to player saves? Edit: Jacob says "yes" +static bool m_OldAiming; +static bool bc_Visible; + +static void SnapToGroundNew( Object object ) +{ + vector pos = object.GetPosition(); + pos[1] = GetGame().SurfaceY(pos[0], pos[2]); + + vector clippingInfo[2]; + vector objectBBOX[2]; + + object.GetCollisionBox( objectBBOX ); + object.ClippingInfo( clippingInfo ); + + //float clipY = objectBBOX[1][1] / 2.0//- clippingInfo[0][1]; + //pos[1] = pos[1] + objectBBOX[1][1] - clipY; + pos[1] = pos[1] + clippingInfo[1][1] / 2.0;//objectBBOX[0][1] - clipY + + object.SetPosition(pos); + + ForceTargetCollisionUpdate( object ); +} + +static void ForceTargetCollisionUpdate( Object oObj ) +{ + if ( !oObj ) return; + + vector roll = oObj.GetOrientation(); + roll [ 2 ] = roll [ 2 ] - 1; + oObj.SetOrientation( roll ); + roll [ 2 ] = roll [ 2 ] + 1; + oObj.SetOrientation( roll ); +} + +static void ToggleCursor() +{ + if ( GetGame().GetInput().HasGameFocus( INPUT_DEVICE_MOUSE ) ) + { + GetGame().GetInput().ChangeGameFocus( 1 ); + GetGame().GetUIManager().ShowUICursor( true ); + } + else + { + GetGame().GetUIManager().ShowUICursor( false ); + GetGame().GetInput().ResetGameFocus(); + } +} + +/* + Token types: + 0 - error, no token + 1 - defined token (special characters etc. . / * ) + 2 - quoted string. Quotes are removed -> TODO + 3 - alphabetic string + 4 - number + 5 - end of line -> TODO +*/ +static bool CheckStringType( string str, int type ) +{ + for(int i = 0; i. + */ +class AdminMenu //extends UIScriptedMenu +{ + protected ref map m_TPLocations; + + ref AdminMenuGui m_adMenu; + ref AdminMenuGuiMap m_map; + PlayerBase Admin; + PlayerIdentity AdminIdentity; + string AdminUID; + + void AdminMenu() + { + GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); + //adminMenuMain = new AdminMenuMain(); + } + + void Message (string strMessage) + { + Param1 Msgparam1; + Msgparam1 = new Param1( strMessage ); + GetGame().RPCSingleParam(Admin, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam1, true, AdminIdentity); + } + + void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) + { + array players = new array; + GetGame().GetPlayers( players ); + PlayerIdentity selectedIdentity; + PlayerBase selectedPlayer; + string strMessage; + Param1 Msgparam; + string PlayerName; + string cData; + ItemBase oItem = NULL; + PlayerIdentity AdminIdent; + bool ai = false; + + int quantity = 0; + string text = ""; + + + + switch(rpc_type) + { + + case (int)M_RPCs.M_Admin_Menu: + if ( GetGame().IsServer() ) + { + Print("Admin Menu RPC"); + //GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu, new Param1( GetCursorPos() ), false, NULL ); + // permission check - server mission file + + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + Print("Admin Menu sender name : " + sender.GetName() + "PlainID : " + sender.GetPlainId()); + AdminIdentity = Admin.GetIdentity(); + AdminUID = AdminIdentity.GetPlainId(); + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_OK, new Param1( "Test" ), false, NULL ); + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + // UIScriptedMenu adminMenuGui = NULL; + // adminMenuGui = new AdminMenuGui(); + // if ( g_Game.GetUIManager().GetMenu() == NULL ) + // { + // g_Game.GetUIManager().ShowScriptedMenu( adminMenuGui, NULL ); + // } + } + break; + + case (int)M_RPCs.M_Admin_Menu_OK: + Print("Admin Menu OK RPC"); + if ( GetGame().IsServer() ) + { + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + UIScriptedMenu adminMenuGui = NULL; + adminMenuGui = new AdminMenuGui(); + if ( g_Game.GetUIManager().GetMenu() == NULL ) + { + g_Game.GetUIManager().ShowScriptedMenu( adminMenuGui, NULL ); + } + } + break; + + case M_RPCs.M_Admin_Menu_Spawn_Ground: + //read stuff + string GroundN_Item; //ItemName + string GroundN_ai; //ai Bool + string QuantityItem; //Textbox + ctx.Read(GroundN_Item); + ctx.Read(GroundN_ai); + ctx.Read(QuantityItem); + + if (GroundN_ai == "true") + { + ai = true; + } + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID( sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + + EntityAI oObj = GetGame().CreateObject( GroundN_Item, Admin.GetPosition(), false, ai ); + //obEditor.addObject( oObj ); + if ( oObj.IsInherited( ItemBase ) ) + { + oItem = ( ItemBase ) oObj; + SetupSpawnedItem( oItem, oItem.GetMaxHealth(), 1 ); + + quantity = 0; + text = QuantityItem; + text.ToUpper(); + //TODO ?? Check IsInherited EntetyAI + if (text == "MAX") + { + quantity = oItem.GetQuantityMax(); + } else + { + quantity = text.ToInt(); + } + oItem.SetQuantity(quantity); + return; + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Spawn_ItemPrev: + //read stuff + string ItemPrev_Item; //ItemName + ctx.Read(ItemPrev_Item); + + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID( sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + + EntityAI oObjp = GetGame().CreateObject( ItemPrev_Item, vector.Zero, false, false ); + //obEditor.addObject( oObj ); + + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_ItemPrev_ok, new Param1( oObjp ), false, NULL ); + + + + + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + + + case M_RPCs.M_Admin_Menu_Spawn_Inventory: + //read stuff + string Inventory_Item; //ItemName + string Inventory_ai; //ai Bool + string Inventory_QuantityItem; //Textbox + ctx.Read(Inventory_Item); + ctx.Read(Inventory_ai); + ctx.Read(Inventory_QuantityItem); + + if (Inventory_ai == "true") + { + ai = true; + } + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID( sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + + + + EntityAI oInvItem = Admin.GetInventory().CreateInInventory( Inventory_Item ); + oInvItem.SetHealth( oInvItem.GetMaxHealth() ); + if ( oInvItem.IsInherited( ItemBase ) ) + { + oItem = ( ItemBase ) oObj; + SetupSpawnedItem( oItem, oItem.GetMaxHealth(), 1 ); + quantity = 0; + text = Inventory_QuantityItem; + text.ToUpper(); + if (text == "MAX") + { + quantity = oItem.GetQuantityMax(); + } else + { + quantity = text.ToInt(); + } + oItem.SetQuantity(quantity); + return; + } + + + + + + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Spawn_Cursor: + //read stuff + string Cursor_Item; //ItemName + vector Cursor_Pos //Vector Postition + string Cursor_ai; //ai Bool + string Cursor_QuantityItem; //Textbox + ctx.Read(Cursor_Item); + ctx.Read(Cursor_Pos); + ctx.Read(Cursor_ai); + ctx.Read(Cursor_QuantityItem); + if (Cursor_ai == "true") + { + ai = true; + } + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + EntityAI oCursorObj = GetGame().CreateObject( Cursor_Item, Cursor_Pos, false, ai ); + //obEditor.addObject( oCursorObj ); + + if ( oCursorObj.IsInherited( ItemBase ) ) + { + oItem = ( ItemBase ) oCursorObj; + SetupSpawnedItem( oItem, oItem.GetMaxHealth(), 1 ); + + quantity = 0; + text = Cursor_QuantityItem; + text.ToUpper(); + + if (text == "MAX") + { + quantity = oItem.GetQuantityMax(); + } else + { + quantity = text.ToInt(); + } + oItem.SetQuantity(quantity); + oCursorObj.PlaceOnSurface(); + return; + } + + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Heal: + if ( GetGame().IsServer() ) + { + + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + //AdminIdentity = Admin.GetIdentity(); + //AdminUID = AdminIdentity.GetPlainId(); + Print(AdminUID); + Admin.SetHealth( Admin.GetMaxHealth( "", "" ) ); + Admin.SetHealth( "","Blood", Admin.GetMaxHealth( "", "Blood" ) ); + Admin.GetStatEnergy().Add(250); + Admin.GetStatWater().Add(250); + Admin.SetBleedingBits(0); + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Strip: + string item; + Param1 stringParam; + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int a = 0; a < players.Count(); ++a ) + { + selectedPlayer = players.Get(a); + selectedIdentity = selectedPlayer.GetIdentity(); + if ( selectedIdentity.GetName() == PlayerName ) + { + selectedPlayer.RemoveAllItems(); + } + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_TpTo: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int z = 0; z < players.Count(); ++z ) + { + selectedPlayer = players.Get(z); + selectedIdentity = selectedPlayer.GetIdentity(); + if ( selectedIdentity.GetName() == PlayerName ) + { + selectedPlayer.SetPosition(Admin.GetPosition()); + + Msgparam = new Param1( "You were teleported by the admin!" ); + GetGame().RPCSingleParam(Admin, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, selectedIdentity); + + strMessage = "Player " + PlayerName + " was teleported to your location!"; + Msgparam = new Param1( strMessage ); + GetGame().RPCSingleParam(Admin, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, AdminIdentity); + } + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_TpMe: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int zm = 0; zm < players.Count(); ++zm ) + { + if ( players.Get(zm).GetIdentity().GetName() == PlayerName ) + { + Admin.SetPosition(players.Get(zm).GetPosition()); + } + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_TpAllMe: + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + int tpCount = TeleportAllPlayersTo(Admin); + string msgc = "All " + tpCount.ToString() + " Players Teleported to my POS!"; + Msgparam = new Param1( msgc ); + GetGame().RPCSingleParam(Admin, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, AdminIdentity); + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Spawn_Car: + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + Car MyNiva; + vector position = Admin.GetPosition(); + float adminHeading = MiscGameplayFunctions.GetHeadingAngle(Admin); + vector posModifier = Vector(-(3 * Math.Sin(adminHeading)), 0, 3 * Math.Cos(adminHeading)); + + MyNiva = Car.Cast(GetGame().CreateObject( "OffroadHatchback", position + posModifier, false, true, true )); + MyNiva.GetInventory().CreateAttachment("HatchbackHood"); + MyNiva.GetInventory().CreateAttachment("HatchbackTrunk"); + MyNiva.GetInventory().CreateAttachment("HatchbackDoors_CoDriver"); + MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); + MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); + MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); + MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); + MyNiva.GetInventory().CreateAttachment("SparkPlug"); + MyNiva.GetInventory().CreateAttachment("EngineBelt"); + MyNiva.GetInventory().CreateAttachment("CarBattery"); + + MyNiva.Fill( CarFluid.FUEL, MyNiva.GetFluidCapacity( CarFluid.FUEL ) ); + MyNiva.Fill( CarFluid.OIL, MyNiva.GetFluidCapacity( CarFluid.OIL ) ); + MyNiva.Fill( CarFluid.BRAKE, MyNiva.GetFluidCapacity( CarFluid.BRAKE ) ); + MyNiva.Fill( CarFluid.COOLANT, MyNiva.GetFluidCapacity( CarFluid.COOLANT ) ); + + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Car_Refill: + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + ref array nearest_objects = new array; + ref array proxy_cargos = new array; + Car toBeFilled; + vector position1 = Admin.GetPosition(); + GetGame().GetObjectsAtPosition ( position1, 10, nearest_objects, proxy_cargos ); + + for (int i = 0; i < nearest_objects.Count(); i++) + { + if (nearest_objects[i].IsKindOf("CarScript")) + { + toBeFilled = Car.Cast(nearest_objects[i]); + float fuelReq = toBeFilled.GetFluidCapacity( CarFluid.FUEL ) - (toBeFilled.GetFluidCapacity( CarFluid.FUEL ) * toBeFilled.GetFluidFraction( CarFluid.FUEL )); + float oilReq = toBeFilled.GetFluidCapacity( CarFluid.OIL ) - (toBeFilled.GetFluidCapacity( CarFluid.OIL ) * toBeFilled.GetFluidFraction( CarFluid.OIL )); + float coolantReq = toBeFilled.GetFluidCapacity( CarFluid.COOLANT ) - (toBeFilled.GetFluidCapacity( CarFluid.COOLANT ) * toBeFilled.GetFluidFraction( CarFluid.COOLANT )); + float brakeReq = toBeFilled.GetFluidCapacity( CarFluid.BRAKE ) - (toBeFilled.GetFluidCapacity( CarFluid.BRAKE ) * toBeFilled.GetFluidFraction( CarFluid.BRAKE )); + toBeFilled.Fill( CarFluid.FUEL, fuelReq ); + toBeFilled.Fill( CarFluid.OIL, oilReq ); + toBeFilled.Fill( CarFluid.COOLANT, coolantReq ); + toBeFilled.Fill( CarFluid.BRAKE, brakeReq ); + } + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Day: + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + GetGame().GetWorld().SetDate( 1988, 5, 23, 12, 0 ); + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Night: + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + GetGame().GetWorld().SetDate( 1988, 9, 23, 22, 0 ); + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_TpToPos: + ctx.Read( stringParam ); + cData = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + vector position3 = "0 0 0"; + m_TPLocations.Find( cData, position3 ); + + vector ofixPlayerPos; + ofixPlayerPos[0] = position3[0]; + ofixPlayerPos[2] = position3[2]; + + ofixPlayerPos = SnapToGround( ofixPlayerPos ); + + Admin.SetPosition(ofixPlayerPos); + + strMessage = "Teleported To Location: " + cData; + Msgparam = new Param1( strMessage ); + GetGame().RPCSingleParam(Admin, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, AdminIdentity); + + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Kill: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int ig = 0; ig < players.Count(); ++ig ) + { + PlayerBase Target = players.Get(ig); + if ( Target.GetIdentity().GetName() == PlayerName ) + { + Target.SetHealth(0); + } + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_KillAll: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int ig1 = 0; ig1 < players.Count(); ++ig1 ) + { + PlayerBase Target1 = players.Get(ig1); + Target1.SetHealth(0); + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_HealAll: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int ig2 = 0; ig2 < players.Count(); ++ig2 ) + { + PlayerBase Target2 = players.Get(ig2); + Target2.SetHealth( Admin.GetMaxHealth( "", "" ) ); + Target2.SetHealth( "","Blood", Admin.GetMaxHealth( "", "Blood" ) ); + Target2.GetStatEnergy().Add(250); + Target2.GetStatWater().Add(250); + Target2.SetBleedingBits(0); + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_StripAll: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int ig3 = 0; ig3 < players.Count(); ++ig3 ) + { + PlayerBase Target3 = players.Get(ig3); + Target3.RemoveAllItems(); + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Stamina_Enable: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + GetServerMission().RemoveStamina(PlayerName) + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Stamina_Dissable: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + GetServerMission().AddStamina(PlayerName) + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Player_Stamina_Request: + ctx.Read( stringParam ); + PlayerName = stringParam.param1; + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + if (GetServerMission().StaminaContains(PlayerName)) + { + ScriptRPC IsStamina = new ScriptRPC(); + IsStamina.Write(PlayerName); + IsStamina.Send(NULL, M_RPCs.M_Admin_Menu_Player_Stamina_ok, false, sender); + }else + { + ScriptRPC IsStamina2 = new ScriptRPC(); + IsStamina2.Write("NULL"); + IsStamina2.Send(NULL, M_RPCs.M_Admin_Menu_Player_Stamina_ok, false, sender); + } + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_PM: + string MSG; + string MSGName;//Vector Postition + ctx.Read(MSG); + ctx.Read(MSGName); + if ( GetGame().IsServer() ) + { + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + for ( int z1 = 0; z1 < players.Count(); ++z1 ) + { + selectedPlayer = players.Get(z1); + selectedIdentity = selectedPlayer.GetIdentity(); + if ( selectedIdentity.GetName() == MSGName ) + { + Msgparam = new Param1( MSG ); + GetGame().RPCSingleParam(Admin, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, sender); + } + } + } + } + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + } + break; + + case M_RPCs.M_Admin_Menu_Map_Player_Request: + string PosName; + vector Pos1; //Vector Postition + ctx.Read(PosName); + ctx.Read(Pos1); + if ( GetGame().IsServer() ) + { + + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + GetServerMission().SendPosTOAdmins(); + } + } + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + + } + break; + + case M_RPCs.M_Admin_Menu_Player_Health_Request: + + PlayerBase HealthPlayer; + ctx.Read(HealthPlayer); + if ( GetGame().IsServer() ) + { + + Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId()); + if ( Admin != null ) + { + DebugMonitorValues values = HealthPlayer.GetDebugMonitorValues(); + float Value1; + Value1 = HealthPlayer.GetHealth("", "Health"); + string health = string.Format(" %1", Value1.ToString()); + Print("Name : " + HealthPlayer.GetIdentity().GetName() + "Health :" + health); + + float Value2; + Value2 = HealthPlayer.GetHealth("", "Blood"); + string blood = string.Format(" %1", Value2.ToString()); + Print("Name : " + HealthPlayer.GetIdentity().GetName() + "blood :" + blood); + + vector Value; + Value = HealthPlayer.GetPosition() + string positionP = string.Format(" %1 %2 %3", Value[0].ToString(), Value[1].ToString(), Value[2].ToString()); + Print("Name : " + HealthPlayer.GetIdentity().GetName() + "positionP :" + positionP); + + ScriptRPC PPos = new ScriptRPC(); + PPos.Write(health); + PPos.Write(blood); + PPos.Write(positionP); + PPos.Send(NULL, M_RPCs.M_Admin_Menu_Player_Health, false, sender); + } + } + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + + } + break; + + + + } + } + + void SendRPC() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu, new Param1( GetCursorPos() ), false, NULL ); + } + + void SendRPCItem(string item) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_Ground, new Param1(item), false, NULL ); + } + + + void SendRPCHeal() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Heal, new Param1(""), false, NULL ); + } + + void SendRPCStrip(string PlayerName) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Strip, new Param1(PlayerName), false, NULL ); + } + + void SendRPCTpTo(string PlayerName) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpTo, new Param1(PlayerName), false, NULL ); + } + + void SendRPCTpMe(string PlayerName) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpMe, new Param1(PlayerName), false, NULL ); + } + + void SendRPCTpAllMe() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpAllMe, new Param1(""), false, NULL ); + } + + void SendRPCSpCar() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_Car, new Param1(""), false, NULL ); + } + + void SendRPCDay() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Day, new Param1(""), false, NULL ); + } + + void SendRPCNight() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Night, new Param1(""), false, NULL ); + } + + void SendRPCRefill() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Car_Refill, new Param1(""), false, NULL ); + } + + + + void SendRPCTpToPos(string pos) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpToPos, new Param1(pos), false, NULL ); + } + + void SendRPCKill(string PlayerName) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Kill, new Param1(PlayerName), false, NULL ); + } + + void SendRPCSpWear() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_SpWear, new Param1(""), false, NULL ); + } + + + + + vector SnapToGround(vector pos) + { + float pos_x = pos[0]; + float pos_z = pos[2]; + float pos_y = GetGame().SurfaceY( pos_x, pos_z ); + vector tmp_pos = Vector( pos_x, pos_y, pos_z ); + tmp_pos[1] = tmp_pos[1] + pos[1]; + + return tmp_pos; + } + + int TeleportAllPlayersTo(PlayerBase Admin) + { + array players = new array; + GetGame().GetPlayers( players ); + + vector AdminPos; + AdminPos = Admin.GetPosition(); + + for ( int i = 0; i < players.Count(); ++i ) + { + PlayerBase Target = players.Get(i); + Target.SetPosition( AdminPos ); + } + return i; + } + + + void oSpawnItemFunc(int ground, string ClassName)//2nd PlayerBase player + { + EntityAI item; + ItemBase itemBs + + vector NewPosition; + vector OldPosition; + + if (ground == 1) + { + OldPosition = Admin.GetPosition(); + + NewPosition[0] = OldPosition[0] + 1.5; + NewPosition[1] = OldPosition[1] + 0.1; + NewPosition[2] = OldPosition[2] + 1.5; + GetGame().CreateObject( ClassName, NewPosition, false, true ); + }else{ + + item = Admin.GetInventory().CreateInInventory( ClassName ); + itemBs = ItemBase.Cast(item); + itemBs.SetQuantity(1); + } + } + + + + + + + + +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevCam.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevCam.c new file mode 100644 index 0000000..bcee922 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevCam.c @@ -0,0 +1,70 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class DevCam +{ + void DevCam() + { + GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); + } + + void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) + { + if ( rpc_type == M_RPCs.M_SET_CAM ) + { + if ( GetGame().IsServer() ) + { + Print( " receive rpc dev cam is server"); + + ref PlayerBase player = GetServerMission().GetPlayerFromIdentity( sender ); + + Param2< bool, vector > camParams; + ctx.Read( camParams ); + + bool spectating = camParams.param1; + vector pos = camParams.param2; + if ( GetServerMission().IsAdmin( sender.GetName(), sender.GetPlainId() ) ) + { + if ( spectating ) + { + player.SetPosition( pos ); + SetFreezePlayer( player, false ); + GetGame().SelectPlayer( sender, player ); + } + else + { + SetFreezePlayer( player, true ); + GetGame().SelectSpectator( sender, "DayZSpectator", GetServerMission().GetPlayerFromIdentity( sender ).GetPosition() ); + } + } + } + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { // test if setting camera works on client side. instead of server side ^ + GetPlayer().MessageStatus("Toggle Free cam"); + } + + } + } + + void SendRPC( bool isSpectating, vector toPos ) + { + Print("Send Cam RPC"); + GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM, new Param2< bool, vector >( isSpectating, toPos ), false, NULL ); + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevTeleport.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevTeleport.c new file mode 100644 index 0000000..fe26b0a --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevTeleport.c @@ -0,0 +1,63 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class DevTeleport +{ + void DevTeleport() + { + GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); + } + + void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) + { + if ( rpc_type == M_RPCs.M_TELEPORT ) + { + vector positionToTeleport; + + Param1 vectorParam; + ctx.Read( vectorParam ); + + positionToTeleport = vectorParam.param1; + + if ( GetGame().IsServer() ) + { + ref PlayerBase player = GetServerMission().GetPlayerFromIdentity( sender ); + // permission check - server mission file + // if has permissions send message back to client + if ( GetServerMission().IsAdmin( sender.GetName(), sender.GetPlainId()) + { + player.SetPosition( positionToTeleport ); //set player position on server side + + GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, vectorParam, false, NULL ); + } + } + + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + //GetPlayer().SetPosition( positionToTeleport ); //client side + GetPlayer().MessageStatus( "Teleported "); + } + } + } + + void SendRPC() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, new Param1( GetCursorPos() ), false, NULL ); + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuCommands.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuCommands.c new file mode 100644 index 0000000..9f72452 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuCommands.c @@ -0,0 +1,198 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class AdminMenuGuiCommands extends ScriptedWidgetEventHandler +{ + protected Widget m_Root; + + + + protected AdminMenuGui m_Menu; + CheckBoxWidget m_Config_Teleport; + CheckBoxWidget m_Config_Cam; + protected ref map> m_TextMap; + + protected ButtonWidget m_Command_Day; + protected ButtonWidget m_Command_Night; + protected ButtonWidget m_Command_Refill; + protected ButtonWidget m_Command_HealButton; + protected ButtonWidget m_Command_SpCar; + protected ButtonWidget m_Command_Cam; + protected ButtonWidget m_Command_CamTp; + protected ButtonWidget m_Command_Test; + protected ref map m_TestList; + protected string m_TestListPath = "$CurrentDir:\\DayZ-SA-Tomato\\Config\\"; + + ref AdminMenuManager AMenuM; + + void AdminMenuGuiCommands( Widget parent, AdminMenuGui menu ) + { + + m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Commands.layout", parent ); + + m_Menu = menu; + + m_Config_Teleport = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Config_Teleport" ) ); + m_Config_Cam = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Config_Cam" ) ); + + m_Command_HealButton = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Heal" ) ); + m_Command_SpCar = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_SpCar" ) ); + m_Command_Day = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Day" ) ); + m_Command_Night = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Night" ) ); + m_Command_Refill = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Refill" ) ); + m_Command_Cam = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Cam" ) ); + m_Command_CamTp = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_CamTp" ) ); + + m_Command_Test = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Test" ) ); + + if (AMenuM.Config_Cam) + { + m_Config_Cam.SetChecked(true); + }else + { + m_Config_Cam.SetChecked(false); + } + + if (AMenuM.Config_Teleport) + { + m_Config_Teleport.SetChecked(true); + }else + { + m_Config_Teleport.SetChecked(false); + } + + + //-----Add Admins from txt----- + FileHandle AdminUIDSFile = OpenFile(m_TestListPath + "Test.txt",FileMode.READ); + if (AdminUIDSFile != 0) + { + m_TestList = new map; //UID, name + string line_content = ""; + while ( FGets(AdminUIDSFile,line_content) > 0 ) + { + m_TestList.Insert(line_content,"null"); //UID , NAME + } + CloseFile(AdminUIDSFile); + } + + + } + + bool Click(Widget w, int x, int y, int button) + { + PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() ); + if (player) + { + if( ( w == m_Command_HealButton ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Heal, new Param1(""), false, NULL ); + Message("1 Up"); + return true; + } + + + if( ( w == m_Command_SpCar ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_Car, new Param1(""), false, NULL ); + Message("Going fast"); + return true; + } + + if( ( w == m_Command_Day ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Day, new Param1(""), false, NULL ); + Message("DayTime"); + return true; + } + + if( ( w == m_Command_Night ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Night, new Param1(""), false, NULL ); + Message("NightTime"); + return true; + } + + if( ( w == m_Command_Refill ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Car_Refill, new Param1(""), false, NULL ); + Message("Gas Station"); + return true; + } + + if( ( w == m_Command_Test ) ) + { + return true; + } + return true; + } + return false; + } + + void Set_Teleport() + { + if (AMenuM.Config_Teleport) + { + AMenuM.Config_Teleport = false; + }else + { + AMenuM.Config_Teleport = true; + } + } + + void Set_Cam() + { + if (AMenuM.Config_Cam) + { + AMenuM.Config_Cam = false; + }else + { + AMenuM.Config_Cam = true; + } + } + + void ~AdminMenuGuiCommands() + { + } + + void Focus() + { + + } + + + override bool OnFocus( Widget w, int x, int y ) + { + if( m_Menu ) + m_Menu.OnFocus( w, x, y ); + if( w ) + { + Param2 p = m_TextMap.Get( w.GetUserID() ); + if( p ) + { + return true; + } + } + return ( w != null ); + } + + void Message( string txt ) + { + GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); + } +} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuGui.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuGui.c new file mode 100644 index 0000000..971af4f --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuGui.c @@ -0,0 +1,302 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class AdminMenuGui extends UIScriptedMenu +{ + protected TabberUI m_Tabber; + protected ref AdminMenuGuiCommands m_CommandTab; + protected ref AdminMenuGuiSpawn m_SpawnTab; + protected ref AdminMenuGuiPlayer m_PlayerTab; + protected ref AdminMenuGuiMap m_MapTab; + protected ref map m_TestListS; + protected string m_TestListPath = "$CurrentDir:\\DayZ-SA-Tomato\\"; + + protected ButtonWidget m_Back; + + void AdminMenuGui() + { + + } + + override bool OnItemSelected( Widget w, int x, int y, int row, int column, int oldRow, int oldColumn ) + { + bool okstap; + okstap = false; + if ( w == m_SpawnTab.m_classList ) { + okstap = m_SpawnTab.OnItemSelect(w, x, y, row, column, oldRow, oldColumn) + return okstap; + } + return okstap; + } + + void Message( string txt ) + { + GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); + } + override bool OnChange( Widget w, int x, int y, bool finished ) + { + if ( w == m_PlayerTab.m_PlayerList ) + { + m_PlayerTab.PlayerSelect(); + return true; + } + + if ( w == m_SpawnTab.m_Spawn_SearchBox ) + { + m_SpawnTab.UpdateList( "All" ); + return true; + } + + if ( w == m_CommandTab.m_Config_Teleport ) + { + m_CommandTab.Set_Teleport(); + return true; + } + + if ( w == m_CommandTab.m_Config_Cam ) + { + m_CommandTab.Set_Cam(); + return true; + } + + if ( w == m_PlayerTab.m_Cb_Player_Stamina ) + { + m_PlayerTab.Set_Stamina(); + return true; + } + + return false; + } + void ItemPrevCall(EntityAI item) + { + m_SpawnTab.OnItemSelect2(item); + } + + + + + + override Widget Init() + { + layoutRoot = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Main.layout", null ); + + layoutRoot.FindAnyWidget( "Tabber" ).GetScript( m_Tabber ); + + + + m_CommandTab = new AdminMenuGuiCommands( layoutRoot.FindAnyWidget( "Tab_0" ), this ); + m_SpawnTab = new AdminMenuGuiSpawn( layoutRoot.FindAnyWidget( "Tab_1" ), this ); + m_PlayerTab = new AdminMenuGuiPlayer( layoutRoot.FindAnyWidget( "Tab_2" ), this ); + m_MapTab = new AdminMenuGuiMap( layoutRoot.FindAnyWidget( "Tab_3" ), this ); + + m_Back = ButtonWidget.Cast( layoutRoot.FindAnyWidget( "back" ) ); + + + SetFocus( layoutRoot ); + + + m_Tabber.m_OnTabSwitch.Insert( OnTabSwitch ); + + /* + //-----Add Admins from txt----- + FileHandle AdminUIDSFile = OpenFile(m_AdminListPath + "Admins.txt",FileMode.READ); + if (AdminUIDSFile != 0) + { + m_AdminList = new map; //UID, name + string line_content = ""; + while ( FGets(AdminUIDSFile,line_content) > 0 ) + { + m_AdminList.Insert(line_content,"null"); //UID , NAME + Print("Adding Admin: "+ line_content + " To the Admin List!"); + } + CloseFile(AdminUIDSFile); + } + + */ + return layoutRoot; + } + + void ~AdminMenuGui() + { + + } + + override bool OnClick( Widget w, int x, int y, int button ) + { + //SpawnTab + bool ok = false; + if ( w.GetName().Contains("_spawn_") ) + { + ok = m_SpawnTab.Click(w, x, y, button) + return ok; + } + + //CommandTab + if ( w.GetName().Contains("_Command_") ) + { + ok = m_CommandTab.Click(w, x, y, button) + return ok; + } + + //PlayerTab + if ( w.GetName().Contains("_Player_") ) + { + ok = m_PlayerTab.Click(w, x, y, button) + return ok; + } + + //Main Widget + if( button == MouseState.LEFT ) + { + if( w == m_Back ) + { + Back(); + return true; + } + } + return false; + } + + void OnTabSwitch( int tab ) + { + switch( tab ) + { + case 0: + { + m_CommandTab.Focus(); + break; + } + case 1: + { + m_SpawnTab.Focus(); + break; + } + case 2: + { + m_PlayerTab.Focus(); + break; + } + case 3: + { + m_MapTab.Focus(); + break; + } + } + } + + + void Back() + { + GetGame().EndOptionsVideo(); + GetGame().GetUIManager().Back(); + + } + + + + + override bool OnMouseEnter( Widget w, int x, int y ) + { + if( w && IsFocusable( w ) ) + { + ColorRed( w ); + return true; + } + return false; + } + + override bool OnMouseLeave( Widget w, Widget enterW, int x, int y ) + { + if( w && IsFocusable( w ) ) + { + ColorWhite( w, enterW ); + return true; + } + return false; + } + + override bool OnFocus( Widget w, int x, int y ) + { + if( w && IsFocusable( w ) ) + { + ColorRed( w ); + return true; + } + return false; + } + + override bool OnFocusLost( Widget w, int x, int y ) + { + if( w && IsFocusable( w ) ) + { + ColorWhite( w, null ); + return true; + } + return false; + } + + bool IsFocusable( Widget w ) + { + if( w ) + { + return ( w == m_Back ); + } + return false; + } + + + override void OnShow() + { + super.OnShow(); + GetGame().GetUIManager().ShowUICursor( true ); + GetGame().GetInput().ChangeGameFocus( 1 ); + } + + override void OnHide() + { + super.OnHide(); + GetGame().GetUIManager().ShowUICursor( false ); + GetGame().GetInput().ResetGameFocus( ); + } + + //Coloring functions (Until WidgetStyles are useful) + void ColorRed( Widget w ) + { + SetFocus( w ); + + ButtonWidget button = ButtonWidget.Cast( w ); + if( button ) + { + button.SetTextColor( ARGB( 255, 200, 0, 0 ) ); + } + } + + void ColorWhite( Widget w, Widget enterW ) + { + #ifdef PLATFORM_WINDOWS + SetFocus( null ); + #endif + + ButtonWidget button = ButtonWidget.Cast( w ); + if( button ) + { + button.SetTextColor( ARGB( 255, 255, 255, 255 ) ); + } + } +} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuManager.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuManager.c new file mode 100644 index 0000000..489d63b --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuManager.c @@ -0,0 +1,58 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class AdminMenuManager +{ + + static bool Config_Teleport = false; + static bool Config_Cam = false; + static ref map m_PlayerLocations; + + void ~AdminMenuManager() + { + + } + + void AdminMenuManager() + { + m_PlayerLocations = new map; //name of town, pos + } + void Teleport() + { + if (Config_Teleport) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, new Param1( GetCursorPos() ), false, NULL ); + } + } + + void CamTeleport( bool isSpectating, vector toPos ) + { + if (Config_Cam) + { + Print("Send Cam RPC"); + GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM, new Param2< bool, vector >( isSpectating, toPos ), false, NULL ); + } + } + + void MenuOpen() + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu, new Param1( GetCursorPos() ), false, NULL ); + } + +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMap.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMap.c new file mode 100644 index 0000000..3d64f31 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMap.c @@ -0,0 +1,108 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class AdminMenuGuiMap extends ScriptedWidgetEventHandler +{ + protected Widget m_Root; + +protected MapWidget m_Map_Map; + + protected AdminMenuGui m_Menu; + + protected ref map> m_TextMap; + + void AdminMenuGuiMap( Widget parent, AdminMenuGui menu ) + { + GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); + m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Map.layout", parent ); + + m_Menu = menu; + m_Map_Map = MapWidget.Cast( m_Root.FindAnyWidget( "Map" ) ); + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Map_Player_Request, new Param1(""), false, NULL ); + + + { + //GetMarkers(); + /* + m_Map_Map.AddUserMark("2681 4.7 1751", "Lalal", ARGB(255,255,0,0), "\\dz\\gear\\navigation\\data\\map_tree_ca.paa"); + m_Map_Map.AddUserMark("2683 4.7 1851", "Lala2", ARGB(255,0,255,0), "\\dz\\gear\\navigation\\data\\map_bunker_ca.paa"); + m_Map_Map.AddUserMark("2670 4.7 1651", "Lala3", ARGB(255,0,0,255), "\\dz\\gear\\navigation\\data\\map_busstop_ca.paa"); */ + } + } + + void ~AdminMenuGuiMap() + { + } + + void Focus() + { + + } + + void Message( string txt ) + { + GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); + } + + void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) + { + switch(rpc_type) + { + + case M_RPCs.M_Admin_Menu_Map_Player: + string PosName; + vector Pos1; //Vector Postition + ctx.Read(PosName); + ctx.Read(Pos1); + if ( GetGame().IsServer() ) + { + + } + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + AddPlayerMarker(PosName, Pos1); + } + break; + } + } + + + void AddPlayerMarker(string name, vector pos) + { + m_Map_Map.AddUserMark(pos, name, ARGB(255,255,0,0), "\\dz\\gear\\navigation\\data\\map_tree_ca.paa"); + } + + override bool OnFocus( Widget w, int x, int y ) + { + if( m_Menu ) + m_Menu.OnFocus( w, x, y ); + if( w ) + { + Param2 p = m_TextMap.Get( w.GetUserID() ); + if( p ) + { + return true; + } + } + + return ( w != null ); + } + + +} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuPlayer.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuPlayer.c new file mode 100644 index 0000000..9091e81 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuPlayer.c @@ -0,0 +1,293 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler +{ + protected Widget m_Root; + + + + protected AdminMenuGui m_Menu; + + protected ref map> m_TextMap; + protected ButtonWidget m_btn_Player_Kill; + protected ButtonWidget m_btn_Player_Strip; + protected ButtonWidget m_btn_Player_Heal; + protected ButtonWidget m_btn_Player_TpTo; + protected ButtonWidget m_btn_Player_TpMe; + protected ButtonWidget m_btn_Player_Stamina; + protected ButtonWidget m_btn_Player_KillAll; + protected ButtonWidget m_btn_Player_HealAll; + protected ButtonWidget m_btn_Player_StripAll; + protected ButtonWidget m_btn_Player_TpMeAll; + protected ButtonWidget m_btn_Player_Send; + protected TextWidget m_Text_Player_Blood; + protected TextWidget m_Text_Player_Health; + protected TextWidget m_Text_Player_Pos; + protected TextWidget m_Text_Player_Stamina; + protected EditBoxWidget m_Box_Player_Message; + CheckBoxWidget m_Cb_Player_Stamina; + TextListboxWidget m_PlayerList; + + + void AdminMenuGuiPlayer( Widget parent, AdminMenuGui menu ) + { + + m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Player.layout", parent ); + + m_Menu = menu; + GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); + m_PlayerList = TextListboxWidget.Cast( m_Root.FindAnyWidget( "Player_Player_List" ) + m_Box_Player_Message = EditBoxWidget.Cast( m_Root.FindAnyWidget( "Box_Player_Message" ) ); + m_btn_Player_Strip = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Strip" ) ); + m_btn_Player_Kill = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Kill" ) ); + m_btn_Player_Heal = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Heal" ) ); + m_btn_Player_TpMe = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_TpMe" ) ); + m_btn_Player_TpTo = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_TpTo" ) ); + m_btn_Player_Stamina = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Stamina" ) ); + m_btn_Player_KillAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_KillAll" ) ); + m_btn_Player_HealAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_HealAll" ) ); + m_btn_Player_StripAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_StripAll" ) ); + m_btn_Player_TpMeAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_TpMeAll" ) ); + m_btn_Player_Send = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Send" ) ); + m_Text_Player_Blood = TextWidget.Cast( m_Root.FindAnyWidget( "Text_Player_Blood" ) ); + m_Text_Player_Health = TextWidget.Cast( m_Root.FindAnyWidget( "Text_Player_Energy" ) ); + m_Text_Player_Pos = TextWidget.Cast( m_Root.FindAnyWidget( "Text_Player_Pos" ) ); + m_Cb_Player_Stamina = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Cb_Player_Stamina" ) ); + PlayerList(); + } + + bool Click(Widget w, int x, int y, int button) + { + PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() ); + string PlayerName; + PlayerName = GetCurrentSelection(); + if (player) + { + if( ( w == m_PlayerList ) ) + { + PlayerSelect(); + return true; + } + + if( ( w == m_btn_Player_Strip ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Strip, new Param1(PlayerName), false, NULL ); + return true; + } + + + if( ( w == m_btn_Player_Kill ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Kill, new Param1(PlayerName), false, NULL ); + return true; + } + + if( ( w == m_btn_Player_Heal ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Heal, new Param1(""), false, NULL ); + return true; + } + + if( ( w == m_btn_Player_TpMe ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpMe, new Param1(PlayerName), false, NULL ); + return true; + } + + if( ( w == m_btn_Player_TpTo ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpTo, new Param1(PlayerName), false, NULL ); + return true; + } + + + if( ( w == m_btn_Player_KillAll ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_KillAll, new Param1(""), false, NULL ); + return true; + } + + if( ( w == m_btn_Player_HealAll ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_HealAll, new Param1(""), false, NULL ); + return true; + } + + if( ( w == m_btn_Player_StripAll ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_StripAll, new Param1(""), false, NULL ); + return true; + } + + if( ( w == m_btn_Player_TpMeAll ) ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpAllMe, new Param1(""), false, NULL ); + return true; + } + + if( ( w == m_btn_Player_Send ) ) + { + ScriptRPC MSG = new ScriptRPC(); + MSG.Write(m_Box_Player_Message.GetText()); + MSG.Write(GetCurrentSelection()); + MSG.Send(NULL, M_RPCs.M_Admin_Menu_Spawn_Inventory, false, NULL); + return true; + } + return true; + } + return false; + } + void Set_Stamina() + { + + if(m_Cb_Player_Stamina.IsChecked()) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Stamina_Dissable, new Param1(GetCurrentSelection()), false, NULL ); + }else + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Stamina_Enable, new Param1(GetCurrentSelection()), false, NULL ); + + } + } + void ~AdminMenuGuiPlayer() + { + } + + void Focus() + { + + } + + + override bool OnFocus( Widget w, int x, int y ) + { + if( m_Menu ) + m_Menu.OnFocus( w, x, y ); + if( w ) + { + Param2 p = m_TextMap.Get( w.GetUserID() ); + if( p ) + { + return true; + } + } + + return ( w != null ); + } + + void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) + { + switch(rpc_type) + { + + case M_RPCs.M_Admin_Menu_Player_Health: + string health; + string blood + string position; //Vector Postition + ctx.Read(health); + ctx.Read(blood); + ctx.Read(position); + if ( GetGame().IsServer() ) + { + + } + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + m_Text_Player_Health.SetText(health); + m_Text_Player_Blood.SetText(blood); + m_Text_Player_Pos.SetText(position); + } + + + break; + + case M_RPCs.M_Admin_Menu_Player_Stamina_ok: + string StaminName; + ctx.Read(StaminName); + if ( GetGame().IsServer() ) + { + + } + if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) + { + if(StaminName == "NULL") + { + m_Cb_Player_Stamina.SetChecked(false); + }else if (StaminName == GetCurrentSelection()) + { + m_Cb_Player_Stamina.SetChecked(true); + } + } + + + break; + } + } + + void PlayerSelect() + { + array players = new array; + GetGame().GetPlayers( players ); + PlayerBase selectedPlayer; + PlayerIdentity selectedIdentity; + for ( int a = 0; a < players.Count(); ++a ) + { + selectedPlayer = players.Get(a); + selectedIdentity = selectedPlayer.GetIdentity(); + if ( selectedIdentity.GetName() == GetCurrentSelection() ) + { + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Health_Request, new Param1(selectedPlayer), false, NULL ); + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1(selectedIdentity.GetName()), false, NULL ); + } + } + } + + void PlayerList() + { + + m_PlayerList.ClearItems(); + array players = new array; + GetGame().GetPlayers( players ); + for (int i = 0; i < players.Count(); ++i) + { + m_PlayerList.AddItem( players.Get(i).GetIdentity().GetName(), NULL, 0 ); + } + } + + string GetCurrentSelection() + { + if ( m_PlayerList.GetSelectedRow() != -1 ) + { + string result; + m_PlayerList.GetItemText( m_PlayerList.GetSelectedRow(), 0, result ); + return result; + } + + return ""; + } + + void Message( string txt ) + { + GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); + } + + + +} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuSpawn.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuSpawn.c new file mode 100644 index 0000000..8417840 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuSpawn.c @@ -0,0 +1,474 @@ + /* + DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de + Copyright (C) 2018 DayZ-SA-Tomato + + This file is part of DayZ SA Tomato. + + DayZ SA Tomato is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DayZ SA Tomato is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DayZ SA Tomato. If not, see . + */ +class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler +{ + protected Widget m_Root; + protected AdminMenuGui m_Menu; + TextListboxWidget m_classList; + EditBoxWidget m_Spawn_SearchBox; + protected ButtonWidget m_Spawn_btnSpawnGround; + protected ButtonWidget m_Spawn_btnSpawnCursor; + protected ButtonWidget m_Spawn_btnSpawnInventory; + protected ButtonWidget m_Spawn_btnCancel; + protected EditBoxWidget m_Spawn_QuantityItem; + ItemPreviewWidget m_item_widget; + + //private ItemPreviewWidget m_item_widget; + protected EntityAI previewItem; + private int m_characterRotationX; + private int m_characterRotationY; // Borrowed from inspectmenu + private int m_characterScaleDelta; + private vector m_characterOrientation; + + protected EditBoxWidget m_Spawn_editBox; + protected ref map> m_TextMap; + + void AdminMenuGuiSpawn( Widget parent, AdminMenuGui menu ) + { + + m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_spawn.layout", parent ); + + m_Menu = menu; + GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); + m_classList = TextListboxWidget.Cast( m_Root.FindAnyWidget( "classlist" ) ); + m_Spawn_SearchBox = EditBoxWidget.Cast( m_Root.FindAnyWidget( "search_input" ) ); + m_Spawn_btnSpawnGround = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_spawn_ground" ) ); + m_Spawn_btnSpawnCursor = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_spawn_cursorpos" ) ); + m_Spawn_btnSpawnInventory = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_spawn_inventory" ) ); + m_Spawn_btnCancel = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_cancel" ) ); + m_item_widget = ItemPreviewWidget.Cast( m_Root.FindAnyWidget( "ItemPrev" ) ); + m_Spawn_QuantityItem = EditBoxWidget.Cast( m_Root.FindAnyWidget( "quantity_items" ) ); + + m_Spawn_editBox = m_Root.FindAnyWidget("className_spawner_box"); + + UpdateList( "All" ) + } + + //TODO + bool Click( Widget w, int x, int y, int button ) + { + string strSelection = GetCurrentSelection(); + bool ai = false; + + int quantity = 0; + string text = ""; + ItemBase oItem = NULL; + string ai_new = "" + if ( strSelection == "" ) + { + strSelection = GetEditBoxInput(); + } + + if( strSelection != "" ) + { + strSelection.ToLower(); + //ObjectEditor obEditor = GetModuleManager().GetModule( ObjectEditor ); + if ( GetGame().IsKindOf( strSelection, "DZ_LightAI" ) ) + { + ai = true; + ai_new = "true" + } + + if( w == m_Spawn_btnSpawnCursor ) + { + + text = m_Spawn_QuantityItem.GetText(); + + ScriptRPC Cursor_rpc = new ScriptRPC(); + Cursor_rpc.Write(strSelection); + Cursor_rpc.Write(GetCursorPos()) + Cursor_rpc.Write(ai_new); + Cursor_rpc.Write(text) + Cursor_rpc.Send(NULL, M_RPCs.M_Admin_Menu_Spawn_Cursor, false, NULL); + + + + + + + text = m_Spawn_QuantityItem.GetText(); + + } + else if ( w == m_Spawn_btnSpawnGround ) + { + EntityAI oObj = g_Game.CreateObject( strSelection, GetGame().GetPlayer().GetPosition(), false, ai ); + text = m_Spawn_QuantityItem.GetText(); + //RPC Build and Send + ScriptRPC rpc = new ScriptRPC(); + rpc.Write(strSelection); + rpc.Write(ai_new); + rpc.Write(text) + rpc.Send(NULL, M_RPCs.M_Admin_Menu_Spawn_Ground, false, NULL); + + } + else if ( w == m_Spawn_btnSpawnInventory ) + { + text = m_Spawn_QuantityItem.GetText(); + //RPC Build and Send + ScriptRPC Inventory_rpc = new ScriptRPC(); + Inventory_rpc.Write(strSelection); + Inventory_rpc.Write(ai_new); + Inventory_rpc.Write(text) + Inventory_rpc.Send(NULL, M_RPCs.M_Admin_Menu_Spawn_Inventory, false, NULL); + } + } + if ( w.GetName().Contains( "btn_spawn_filter" ) ) + { + string buttonName = w.GetName(); + buttonName.Replace("btn_spawn_filter_", ""); + UpdateList( buttonName ); + + return true; + } + + return false; + } + + void UpdateList( string classFilter ) // All default + { + m_classList.ClearItems(); + TStringArray configs = new TStringArray; + configs.Insert( CFG_VEHICLESPATH ); + configs.Insert( CFG_WEAPONSPATH ); + configs.Insert( CFG_MAGAZINESPATH ); + + string strSearch = m_Spawn_SearchBox.GetText(); + + strSearch.ToLower(); + + for ( int nConfig = 0; nConfig < configs.Count(); ++nConfig ) + { + string strConfigPath = configs.Get( nConfig ); + + int nClasses = g_Game.ConfigGetChildrenCount( strConfigPath ); + + for ( int nClass = 0; nClass < nClasses; ++nClass ) + { + string strName; + + g_Game.ConfigGetChildName( strConfigPath, nClass, strName ); + + int scope = g_Game.ConfigGetInt( strConfigPath + " " + strName + " scope" ); + + if ( scope == 0 ) + { + continue; + } + + if ( strName == "Mag_Scout_5Rnd") continue; // fix crash for this dumb item. dont spawn it + + string strNameLower = strName; + + strNameLower.ToLower(); + + if ( GetGame().IsKindOf( strNameLower, classFilter ) || classFilter == "All" ) // Fix for weapon_base not being child of "All" + { + + if ( (strSearch != "" && (!strNameLower.Contains( strSearch ))) ) + { + continue; + } + + if ( strName == "ItemOptics" ) + { + continue; // Fix crash + } + + m_classList.AddItem( strName, NULL, 0 ); + } + } + } + } + + string GetCurrentSelection() + { + if ( m_classList.GetSelectedRow() != -1 ) + { + string result; + m_classList.GetItemText( m_classList.GetSelectedRow(), 0, result ); + return result; + } + + return ""; + } + + string GetEditBoxInput() + { + return m_Spawn_editBox.GetText(); + } + + bool OnItemSelect( Widget w, int x, int y, int row, int column, int oldRow, int oldColumn) + { + + if ( w == m_classList ) + { + EntityAI item; + item = g_Game.CreateObject( GetCurrentSelection(), vector.Zero, false, false, false ); + GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_ItemPrev, new Param1( GetCurrentSelection() ), false, NULL ); + if (item) + { + //InspectMenuNew.UpdateItemInfo(m_Root, item); + + if (!m_item_widget) + { + if (m_item_widget) + { + float l; + float h; + m_item_widget.GetSize(l, h); + m_item_widget = ItemPreviewWidget.Cast( GetGame().GetWorkspace().CreateWidget(ItemPreviewWidgetTypeID, 0, 0, 1, 1, WidgetFlags.VISIBLE, ARGB(255, 255, 255, 255), 10, m_item_widget) ); + } + } + + m_item_widget.SetItem(item); + m_item_widget.SetView( item.GetViewIndex() ); + m_item_widget.SetModelPosition(Vector(0,0,1)); + + float v, c; + m_item_widget.GetPos(v, c); + + m_item_widget.SetSize( 1.75, 1.75 ); + + // align to center + m_item_widget.SetPos( -0.375, -0.375 ); + + //m_item_widget.SetModelOrientation + //PPEffects.SetBlurInventory(1); + } + return true; + } + return true; + + } + + void OnItemSelect2(EntityAI item) + { + + + + if (item) + { + //InspectMenuNew.UpdateItemInfo(m_Root, item); + + if (!m_item_widget) + { + Widget preview_frame = m_Root.FindAnyWidget("ItemPrev"); + if (preview_frame) + { + float l; + float h; + preview_frame.GetSize(l, h); + m_item_widget = ItemPreviewWidget.Cast( GetGame().GetWorkspace().CreateWidget(ItemPreviewWidgetTypeID, 0, 0, 1, 1, WidgetFlags.VISIBLE, ARGB(255, 255, 255, 255), 10, preview_frame) ); + } + } + + m_item_widget.SetItem(item); + m_item_widget.SetView( item.GetViewIndex() ); + m_item_widget.SetModelPosition(Vector(0,0,1)); + + float v, c; + m_item_widget.GetPos(v, c); + + m_item_widget.SetSize( 1.75, 1.75 ); + + // align to center + m_item_widget.SetPos( -0.375, -0.375 ); + + //m_item_widget.SetModelOrientation + PPEffects.SetBlurInventory(1); + } + } + + override bool OnMouseButtonDown( Widget w, int x, int y, int button ) + { + if (w == m_item_widget) + { + GetGame().GetDragQueue().Call(this, "UpdateRotation"); + g_Game.GetMousePos(m_characterRotationX, m_characterRotationY); + return true; + } + return false; + } + + override bool OnMouseWheel( Widget w, int x, int y, int wheel ) + { + if ( w == m_item_widget ) + { + GetGame().GetDragQueue().Call(this, "UpdateScale"); + m_characterScaleDelta = wheel ; + } + return false; + } + + void UpdateScale(int mouse_x, int mouse_y, int wheel, bool is_dragging) // Borrowed from inspect menu + { + float w, h, x, y; + m_item_widget.GetPos(x, y); + m_item_widget.GetSize(w,h); + w = w + ( m_characterScaleDelta / 4); + h = h + ( m_characterScaleDelta / 4 ); + if ( w > 0.5 && w < 4 ) + { + m_item_widget.SetSize( w, h ); + + //align to center + int screen_w, screen_h; + GetScreenSize(screen_w, screen_h); + float new_x = x - ( m_characterScaleDelta / 8 ); + float new_y = y - ( m_characterScaleDelta / 8 ); + m_item_widget.SetPos( new_x, new_y ); + } + } + + void UpdateRotation(int mouse_x, int mouse_y, bool is_dragging) // Borrowed from inspect menu + { + vector o = m_characterOrientation; + o[0] = o[0] + (m_characterRotationY - mouse_y); + o[1] = o[1] - (m_characterRotationX - mouse_x); + + m_item_widget.SetModelOrientation( o ); + + if (!is_dragging) + { + m_characterOrientation = o; + } + } + + void ~AdminMenuGuiSpawn() + { + if ( previewItem ) + { + GetGame().ObjectDelete( previewItem ); + delete m_item_widget + } + } + + void Focus() + { + + } + + override bool OnChange( Widget w, int x, int y, bool finished ) + { + if ( w == m_Spawn_SearchBox ) + { + UpdateList( "All" ); + return true; + } + + return false; + } + + bool OnMouseLeave( Widget w, Widget enterW, int x, int y ) + { + if ( w == m_Spawn_SearchBox ) + { + GetPlayer().GetInputController().OverrideMovementSpeed( false, 0 ); + } + return false; + } + + bool OnMouseEnter( Widget w , int x, int y ) + { + if ( w == m_Spawn_SearchBox ) + { + GetPlayer().GetInputController().OverrideMovementSpeed( true, 0 ); + } + return false; + } + + void Message( string txt ) + { + GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); + } + + void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) + { + switch(rpc_type) + { + + case M_RPCs.M_Admin_Menu_Spawn_ItemPrev_ok: + + EntityAI PrevItem; + ctx.Read(PrevItem); + SetItem(PrevItem); + + break; + } + } + + void SetItem(EntityAI item) + { + if (item) + { + //InspectMenuNew.UpdateItemInfo(m_Root, item); + //delete m_item_widget; + if (item == NULL) + { + item = GetGame().CreateObject( "WaterBottle", vector.Zero, false, false ); + } + if (!m_item_widget) + { + Widget preview_frame = m_Root.FindAnyWidget("ItemPrev"); + if (preview_frame) + { + float w; + float h; + preview_frame.GetSize(w, h); + m_item_widget = ItemPreviewWidget.Cast( GetGame().GetWorkspace().CreateWidget(ItemPreviewWidgetTypeID, 0, 0, 1, 1, WidgetFlags.VISIBLE, ARGB(255, 255, 255, 255), 10, preview_frame) ); + } + } + + m_item_widget.SetItem(item); + m_item_widget.SetView( item.GetViewIndex() ); + m_item_widget.SetModelPosition(Vector(0,0,1)); + + float x, y; + m_item_widget.GetPos(x, y); + + m_item_widget.SetSize( 1.75, 1.75 ); + + // align to center + m_item_widget.SetPos( -0.375, -0.375 ); + + //m_item_widget.SetModelOrientation + //PPEffects.SetBlurInventory(1); + } + } + + override bool OnFocus( Widget w, int x, int y ) + { + if( m_Menu ) + m_Menu.OnFocus( w, x, y ); + if( w ) + { + Param2 p = m_TextMap.Get( w.GetUserID() ); + if( p ) + { + return true; + } + } + return ( w != null ); + + + } + + +} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Commands.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Commands.layout new file mode 100644 index 0000000..64148ce --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Commands.layout @@ -0,0 +1,178 @@ +FrameWidgetClass rootFrame { + position 10 10 + size 1400 800 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + { + FrameWidgetClass command_settings_root { + ignorepointer 1 + position 0 0 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + { + ButtonWidgetClass btn_Command_Day { + position 125 360 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Day" + } + ButtonWidgetClass btn_Command_Cam { + position 750 165 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Camera" + } + ButtonWidgetClass ButtonWidget2 { + position 947.81403 -136.842 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Heal" + } + ButtonWidgetClass btn_Command_Night { + position 550 360 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Night" + } + ButtonWidgetClass btn_Command_Refill { + position 550 460 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Refill" + } + CheckBoxWidgetClass Config_Cam { + position 125 165 + size 544.16296 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Free Cam Teleport (insert Key)" + } + ButtonWidgetClass ButtonWidget5 { + position 310.56699 -154.14101 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Heal" + } + ButtonWidgetClass btn_Command_Heal { + clipchildren 1 + inheritalpha 0 + position 125 260 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + style Default + text "Heal" + } + ButtonWidgetClass btn_Command_CamTp { + position 1100 165 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Camera (Tp)" + } + ButtonWidgetClass btn_Command_SpCar { + position 125 460 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Spawn Car" + } + ButtonWidgetClass ButtonWidget9 { + position 611.57001 -97.7071 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Heal" + } + ButtonWidgetClass ButtonWidget10 { + position 1304.92004 -109.47 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Heal" + } + ButtonWidgetClass ButtonWidget11 { + position 12.8862 -89.7536 + size 300 50 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Heal" + } + TextWidgetClass TextWidget0 { + position 0 10 + size 1 50 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style Bold + text "Commands" + "exact text" 0 + "size to text h" 0 + "size to text v" 0 + "text halign" center + "text valign" center + } + PanelWidgetClass PanelWidget0 { + color 0.9333 0 0.0784 1 + position 0 75 + size 0.9 3.5 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style rover_sim_colorable + } + CheckBoxWidgetClass Config_Teleport { + position 125 100 + size 320.33899 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Teleport (n Key)" + checked 0 + } + } + } + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Main.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Main.layout new file mode 100644 index 0000000..aed7806 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Main.layout @@ -0,0 +1,577 @@ +FrameWidgetClass settings_menu_root { + size 1500 980 + halign center_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + priority 951 + { + FrameWidgetClass Tabber { + ignorepointer 1 + position 0 0 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + priority 1 + scriptclass "TabberUI" + { + SpacerWidgetClass TabControls { + visible 1 + clipchildren 0 + ignorepointer 1 + position 80 40 + size 710 60 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + "no focus" 1 + Padding 0 + Margin 0 + "Size To Content H" 1 + "Size To Content V" 1 + { + SpacerWidgetClass TabBar { + clipchildren 1 + ignorepointer 1 + position 0 0 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + "no focus" 1 + Padding 0 + Margin 0 + "Size To Content H" 1 + "Size To Content V" 1 + { + ImageWidgetClass Tabs_Background { + visible 1 + ignorepointer 1 + color 1 1 1 0.5098 + position 0 0 + size 1 1 + hexactpos 0 + vexactpos 0 + hexactsize 0 + vexactsize 0 + imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" + mode blend + "src alpha" 1 + "no wrap" 0 + stretch 1 + } + GridSpacerWidgetClass Tab_Control_Container { + ignorepointer 1 + position 0 0 + size 710 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + priority 1 + "no focus" 1 + Padding 0 + Margin 0 + "Size To Content H" 1 + "Size To Content V" 1 + Columns 10 + Rows 1 + { + PanelWidgetClass Tab_Control_0 { + visible 1 + clipchildren 1 + size 160 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + priority 200 + userID 0 + style blank + "no focus" 1 + "next down" "XComboBoxWidget1" + { + TextWidgetClass Tab_Control_0_Title { + ignorepointer 1 + position 0 0 + size 1 0.48 + halign center_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + priority 250 + text "Commands" + font "gui/fonts/sdf_MetronLight72" + "text halign" center + "text valign" center + } + ImageWidgetClass Tab_Control_0_Background { + visible 1 + disabled 0 + inheritalpha 0 + ignorepointer 1 + color 1 1 1 0.7843 + position 0 0 + size 710 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + draggable 0 + imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" + mode blend + "src alpha" 1 + "no wrap" 0 + stretch 1 + "flip u" 0 + "flip v" 0 + filter 1 + nocache 0 + } + } + } + PanelWidgetClass Tab_Control_1 { + visible 1 + clipchildren 1 + position 0 0 + size 170 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + priority 200 + userID 0 + style blank + "no focus" 1 + "next down" "XComboBoxWidget1" + { + TextWidgetClass Tab_Control_1_Title { + visible 1 + ignorepointer 1 + position 0 0 + size 1 0.48 + halign center_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + priority 250 + text "Spawn" + font "gui/fonts/sdf_MetronLight72" + "text halign" center + "text valign" center + } + ImageWidgetClass Tab_Control_1_Background { + visible 0 + disabled 0 + inheritalpha 0 + ignorepointer 1 + color 1 1 1 0.7843 + position -160 0 + size 710 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + draggable 0 + imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" + mode blend + "src alpha" 1 + "no wrap" 0 + stretch 1 + "flip u" 0 + "flip v" 0 + filter 1 + nocache 0 + } + } + } + PanelWidgetClass Tab_Control_2 { + visible 1 + clipchildren 1 + position 0 0 + size 160 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + priority 200 + userID 0 + style blank + "no focus" 1 + "next down" "XComboBoxWidget1" + { + TextWidgetClass Tab_Control_2_Title { + ignorepointer 1 + position 0 0 + size 1 0.48 + halign center_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + priority 250 + text "Player" + font "gui/fonts/sdf_MetronLight72" + "text halign" center + "text valign" center + } + ImageWidgetClass Tab_Control_2_Background { + visible 0 + disabled 0 + inheritalpha 0 + ignorepointer 1 + color 1 1 1 0.7843 + position -330 0 + size 710 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + draggable 0 + imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" + mode blend + "src alpha" 1 + "no wrap" 0 + stretch 1 + "flip u" 0 + "flip v" 0 + filter 1 + nocache 0 + } + } + } + PanelWidgetClass Tab_Control_3 { + visible 1 + clipchildren 1 + position 0 0 + size 220 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + priority 200 + userID 0 + style blank + "no focus" 1 + "next down" "XComboBoxWidget1" + { + TextWidgetClass Tab_Control_3_Title { + visible 1 + ignorepointer 1 + position 0 0 + size 1 0.48 + halign center_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + priority 250 + text "Map" + font "gui/fonts/sdf_MetronLight72" + "text halign" center + "text valign" center + } + ImageWidgetClass Tab_Control_3_Background { + visible 0 + disabled 0 + inheritalpha 0 + ignorepointer 1 + color 1 1 1 0.7843 + position -490 0 + size 710 1 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 0 + draggable 0 + imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" + mode blend + "src alpha" 1 + "no wrap" 0 + stretch 1 + "flip u" 0 + "flip v" 0 + filter 1 + nocache 0 + } + } + } + } + } + } + } + FrameWidgetClass XboxControls { + visible 0 + clipchildren 0 + ignorepointer 1 + size 1 1 + halign center_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + { + ImageWidgetClass XboxTabLeftControl { + visible 0 + clipchildren 1 + ignorepointer 1 + position -45 0 + size 38 40 + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + image0 "set:xbox_buttons image:LB" + mode blend + "src alpha" 1 + "no wrap" 1 + stretch 0 + } + ImageWidgetClass XboxTabRightControl { + visible 0 + clipchildren 1 + ignorepointer 1 + position -45 0 + size 38 40 + halign right_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + image0 "set:xbox_buttons image:RB" + mode blend + "src alpha" 1 + "no wrap" 1 + stretch 0 + } + } + } + } + } + FrameWidgetClass Tab_0 { + visible 1 + ignorepointer 1 + position 0 110 + size 1400 800 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + } + FrameWidgetClass Tab_1 { + visible 0 + ignorepointer 1 + position 0 110 + size 1400 800 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + } + FrameWidgetClass Tab_2 { + visible 0 + ignorepointer 1 + position 0 110 + size 1400 800 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + } + FrameWidgetClass Tab_3 { + visible 0 + ignorepointer 1 + position 0 110 + size 1400 800 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + } + } + } + TextWidgetClass SettingsTextWidget { + ignorepointer 1 + position 0.05 40 + size 0.38295 50 + halign right_ref + hexactpos 0 + vexactpos 1 + hexactsize 0 + vexactsize 1 + priority 1 + style Normal + text "Admin Menu" + font "gui/fonts/sdf_MetronLight72" + "text color" 0.8157 0.1255 0.7843 1 + "exact text" 0 + "text halign" center + "text valign" center + } + WrapSpacerWidgetClass play_panel_root { + visible 1 + ignorepointer 1 + position 0.01561 19.9362 + size 0.2 42.5477 + halign right_ref + valign bottom_ref + hexactpos 0 + vexactpos 1 + hexactsize 0 + vexactsize 1 + priority 1 + Padding 10 + Margin 0 + "Size To Content H" 1 + content_halign center + content_valign bottom + { + WrapSpacerWidgetClass top { + ignorepointer 1 + color 0 0 0 0.7843 + position 0 0 + size 1 48 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style DayZDefaultPanel + "no focus" 1 + Padding 0 + Margin 0 + "Size To Content V" 1 + content_valign bottom + { + ButtonWidgetClass back { + color 0.0392 0.0392 0.0392 1 + position 0 88 + size 1 38 + halign center_ref + valign bottom_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style DayZDefaultButtonBottom + "no focus" 0 + "next up" "" + "next down" "" + text "Close" + text_proportion 0.6 + font "gui/fonts/sdf_MetronLight24" + switch normal + } + PanelWidgetClass character { + visible 0 + ignorepointer 0 + position 0 172 + size 1 38 + halign center_ref + valign bottom_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style blank + { + TextWidgetClass character_name_text { + inheritalpha 1 + ignorepointer 1 + size 1 0.55 + halign center_ref + valign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + font "gui/fonts/sdf_MetronLight24" + "exact text" 0 + "text halign" center + "text valign" center + } + } + } + } + } + } + } + GridSpacerWidgetClass settings_details { + visible 0 + clipchildren 1 + ignorepointer 1 + color 0 0 0 0.8627 + position 720 160 + size 600 200 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + priority 3 + "no focus" 1 + Padding 8 + Margin 16 + "Size To Content V" 1 + Columns 1 + Rows 2 + { + TextWidgetClass details_label { + clipchildren 0 + ignorepointer 1 + position 0 0 + size 1 36 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + font "gui/fonts/sdf_MetronLight72" + text_proportion 0.9 + } + RichTextWidgetClass details_content { + clipchildren 0 + ignorepointer 1 + position 0 0 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + font "gui/fonts/sdf_MetronLight24" + "exact text" 1 + "exact text size" 22 + "size to text h" 0 + "size to text v" 1 + wrap 1 + "condense whitespace" 1 + } + } + } + WindowWidgetClass WindowWidget0 { + position 0 0 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + style rover_sim_black + } + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Map.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Map.layout new file mode 100644 index 0000000..37538d4 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Map.layout @@ -0,0 +1,57 @@ +FrameWidgetClass rootFrame { + position 10 10 + size 1400 800 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + { + FrameWidgetClass command_settings_root { + ignorepointer 1 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + { + TextWidgetClass TextWidget0 { + position 0 10 + size 1 50 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style Bold + text "Map" + "exact text" 0 + "size to text h" 0 + "size to text v" 0 + "text halign" center + "text valign" center + } + PanelWidgetClass PanelWidget0 { + color 0.9333 0 0.0784 1 + position 0 75 + size 0.9 3.5 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style rover_sim_colorable + } + MapWidgetClass Map { + position 0 20 + size 0.9 580 + halign center_ref + valign bottom_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + } + } + } + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Player.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Player.layout new file mode 100644 index 0000000..25cbf90 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Player.layout @@ -0,0 +1,283 @@ +FrameWidgetClass rootFrame { + position 10 10 + size 1400 800 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + { + FrameWidgetClass command_settings_root { + ignorepointer 1 + position -3.92 0 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + { + PanelWidgetClass PanelWidget0 { + color 0.9333 0 0.0784 1 + position 0 75 + size 0.9 3.5 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style rover_sim_colorable + } + PanelWidgetClass Panel { + position 100 150 + size 450 500 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + style rover_sim_black_2 + } + TextListboxWidgetClass Player_Player_List { + position 100 150 + size 450 500 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + lines 20 + } + TextWidgetClass TextWidget1 { + position 100 90 + size 450 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Online Player :" + "text halign" center + "text valign" center + } + TextWidgetClass TextWidget2 { + position 610 90 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Selection Commands :" + "text halign" center + "text valign" center + } + ButtonWidgetClass btn_Player_Kill { + position 610 150 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Kill Player" + } + ButtonWidgetClass btn_Player_Strip { + position 610 270 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Strip Player" + } + ButtonWidgetClass btn_Player_tpMe { + position 610 390 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Teleport Player here" + } + ButtonWidgetClass btn_Player_tpto { + position 610 330 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Teleport to Player" + } + ButtonWidgetClass btn_Player_Heal { + position 610 210 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Heal Player" + } + TextWidgetClass TextWidget0 { + position 0 10 + size 1 50 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style Bold + text "Player" + "exact text" 0 + "size to text h" 0 + "size to text v" 0 + "text halign" center + "text valign" center + } + TextWidgetClass TextWidget3 { + position 100 660 + size 100 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Pos : " + "text halign" center + "text valign" center + } + TextWidgetClass Text_Player_Pos { + position 220 660 + size 1140 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "XXX" + "text valign" center + } + EditBoxWidgetClass Box_Player_Message { + position 361.21002 720 + size 893 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + style ServerBrowser + } + ButtonWidgetClass btn_Player_Send { + position 1270.2699 720 + size 90.21 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Send" + } + TextWidgetClass TextWidget6 { + position 1020 90 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Selection Commands :" + "text halign" center + "text valign" center + } + ButtonWidgetClass btn_Player_KillAll { + position 1020 150 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Kill all Player" + } + ButtonWidgetClass btn_Player_HealAll { + position 1020 210 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Heal all Player" + } + ButtonWidgetClass btn_Player_StripAll { + position 1020 270 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Strip all Player" + } + ButtonWidgetClass btn_Player_tpMeAll { + position 1020 390 + size 350 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Teleport all here" + } + CheckBoxWidgetClass Cb_Player_Stamina { + position 610 450 + size 350 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Dissable Stamina" + } + } + } + TextWidgetClass textWidgettxt { + position 88 720 + size 265.38998 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Private Message" + "text halign" center + "text valign" center + } + TextWidgetClass TextWidget5 { + position 610 550 + size 130 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Blood :" + "text halign" center + "text valign" center + } + TextWidgetClass TextWidget7 { + position 1100 550 + size 130 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Energy :" + "text halign" center + "text valign" center + } + TextWidgetClass Text_Player_Blood { + position 610 605 + size 260 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "XXX" + "text halign" center + "text valign" center + } + TextWidgetClass Text_Player_Energy { + position 1100 605 + size 260 45 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "XXX" + "text halign" center + "text valign" center + } + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Spawn.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Spawn.layout new file mode 100644 index 0000000..1b18668 --- /dev/null +++ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Spawn.layout @@ -0,0 +1,255 @@ +FrameWidgetClass rootFrame { + position 10 10 + size 1400 800 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + { + FrameWidgetClass command_settings_root { + ignorepointer 1 + position -1.47211 0 + size 1 1 + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 0 + { + TextWidgetClass TextWidget0 { + position 0 10 + size 1 50 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style Bold + text "Spawn" + "exact text" 0 + "size to text h" 0 + "size to text v" 0 + "text halign" center + "text valign" center + } + PanelWidgetClass PanelWidget0 { + color 0.9333 0 0.0784 1 + position 0 75 + size 0.9 3.5 + halign center_ref + hexactpos 1 + vexactpos 1 + hexactsize 0 + vexactsize 1 + style rover_sim_colorable + } + TextWidgetClass search_text { + position 100 100 + size 150 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Search :" + "text halign" center + "text valign" center + } + EditBoxWidgetClass search_input { + position 280 100 + size 500 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + style ServerBrowser + } + ButtonWidgetClass btn_spawn_filter_All { + position 100 180 + size 150 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "All" + } + ButtonWidgetClass btn_spawn_filter_edible_base { + position 100 240 + size 150 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Food" + } + ButtonWidgetClass btn_spawn_filter_weapon_base { + position 100 300 + size 150 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Weapons" + } + ButtonWidgetClass btn_spawn_filter_clothing_base { + position 100 360 + size 150 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Cloth" + } + ButtonWidgetClass btn_spawn_filter_transport { + position 100 420 + size 150 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Vehicles" + } + ButtonWidgetClass btn_spawn_filter_house { + position 100 480 + size 150 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Buildings" + } + ButtonWidgetClass btn_spawn_filter_dz_lightai { + position 100 540 + size 150 47 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Ai" + } + PanelWidgetClass PanelWidget1 { + position 280 180 + size 500 410 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + style rover_sim_black_2 + } + TextListboxWidgetClass classlist { + position 280 180 + size 500 410 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + lines 20 + } + ButtonWidgetClass btn_spawn_cursorpos { + position 280 720 + size 160 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Cursor" + } + ButtonWidgetClass btn_spawn_ground { + position 460 720 + size 160 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Ground" + } + ButtonWidgetClass btn_spawn_inventory { + position 640 720 + size 160 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Inventory" + } + TextWidgetClass className_spawner { + position 45 660 + size 100 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Class Name :" + "size to text h" 1 + "size to text v" 0 + "text halign" center + "text valign" center + } + TextWidgetClass spawn_text { + position 40 720 + size 100 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Spawn Type :" + "size to text h" 1 + "size to text v" 0 + "text halign" center + "text valign" center + } + EditBoxWidgetClass className_spawner_box { + position 280 660 + size 500 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + style ServerBrowser + } + TextWidgetClass quantity_text { + position 500 660 + size 100 48 + halign right_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "Quantity Number/\"Max\" :" + "size to text h" 1 + "size to text v" 0 + "text halign" center + "text valign" center + } + EditBoxWidgetClass quantity_items { + position 1220 660 + size 120 48 + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + text "MAX" + } + ItemPreviewWidgetClass ItemPrev { + position 100 180 + size 500 410 + halign right_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + priority 5 + } + PanelWidgetClass PanelWidget2 { + visible 0 + position 100 180 + size 500 410 + halign right_ref + hexactpos 1 + vexactpos 1 + hexactsize 1 + vexactsize 1 + style rover_sim_blackbox + } + } + } + } +} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/mod.cpp b/DayZ-Sa-Tomato/mod.cpp new file mode 100644 index 0000000..8e38403 --- /dev/null +++ b/DayZ-Sa-Tomato/mod.cpp @@ -0,0 +1,41 @@ +class CfgMods +{ + class DayZSATomato + { + dir = "DayZ-SA-Tomato"; + picture = ""; + action = ""; + hideName = 1; + hidePicture = 1; + name = "DayZ-SA-Tomato"; + credits = ""; + author = "DayZ-SA-Tomato"; + authorID = "0"; + version = "1.0"; + extra = 0; + type = "mod"; + + dependencies[] = {"Game", "World", "Mission"}; + + class defs + { + class gameScriptModule + { + value = ""; + files[] = {"com/DayZ-SA-Tomato/scripts/3_Game"}; + }; + + class worldScriptModule + { + value = ""; + files[] = {"com/DayZ-SA-Tomato/scripts/4_World"}; + }; + + class missionScriptModule + { + value = ""; + files[] = {"com/DayZ-SA-Tomato/scripts/5_Mission"}; + }; + } + }; +};