mirror of
https://github.com/Tomato-dayZ/DayZ-SA-Tomato.git
synced 2024-08-30 16:22:09 +00:00
Update to Ver. 1.30
Update to Ver. 1.30
This commit is contained in:
parent
bfacbeb257
commit
c8d7f7d760
14
CHANGELOG.md
14
CHANGELOG.md
@ -2,17 +2,16 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
|
||||
## 01.12.2018 23:00
|
||||
## 15.12.2018 23:00
|
||||
|
||||
### Fixed
|
||||
- No CustomMission is Created anymore this means Init.c File works now (Custom loadout and mods Using this file)
|
||||
- This means there should be no incompatibility with any mod now
|
||||
|
||||
## 01.12.2018 23:00
|
||||
- For 1.0 Update (make sure to kopy the Key from Keys folder again !)
|
||||
|
||||
### Added
|
||||
|
||||
- Teleport Locations Check the Config/List Folder u can add your own Locations to it (Adding Locations from ingame does not work since filewrite is bugged at the moment)
|
||||
|
||||
### Fixed
|
||||
- No CustomMission is Created anymore this means Init.c File works now (Custom loadout and mods Using this file)
|
||||
- This means there should be no incompatibility with any mod now
|
||||
|
||||
## 29.11.2018 23:00
|
||||
|
||||
@ -47,3 +46,4 @@ Addet bikey you should be able to use the mod without Dissableing verifySignatur
|
||||
### Release
|
||||
Initial Release
|
||||
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
76561198161388867
|
||||
76561198017833573
|
@ -1,18 +0,0 @@
|
||||
Prison Island;2651.42 0.0 1395.8
|
||||
Mogilevka;7572.65 0.0 5182.3
|
||||
Stary Sobor;6192.39 0.0 7666.5
|
||||
Msta;11206.6 0.0 5398.70
|
||||
Solnichniy;13436.5 0.0 6158.7
|
||||
Chernogorsk;6350.99 0.0 2666.12
|
||||
Elektrogorsk;10432.1 0.0 2218.56
|
||||
Berezino;12661.4 0.0 9465.03
|
||||
Tisy;1890.45 0.0 13704.6
|
||||
Gorka;9678.94 0.0 8828.93
|
||||
Balota;4546.92 0.0 2416.4
|
||||
Vybor;3916.85 0.0 8795.59
|
||||
Severograd;8318.51 0.0 12743.4
|
||||
North West Airfield;4835.59 0.0 9667.72
|
||||
Green Mountain;3752.08 0.0 6002.94
|
||||
Zelenogorsk;2542.18 0.0 4994.26
|
||||
Tisy Military Base;1599.15 0.0 14166.66
|
||||
Pavlovo Military Base;2047.82 0.0 3293.36
|
@ -1 +0,0 @@
|
||||
TestString
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
DePbo.dll.6.44
|
@ -1 +1 @@
|
||||
com\DayZ-Sa-Tomato
|
||||
com\DayZ-SA-Tomato
|
@ -1 +0,0 @@
|
||||
18121423
|
Binary file not shown.
@ -1,265 +0,0 @@
|
||||
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 ) );
|
||||
}
|
@ -19,22 +19,37 @@
|
||||
*/
|
||||
modded class MissionGameplay
|
||||
{
|
||||
protected ref PermissionBase m_PermissionBase;
|
||||
ref DevTeleport devTeleport;
|
||||
ref LogHandler m_LogHandler;
|
||||
// ref AdminMenuGui m_AdminMenuGui;
|
||||
ref DevCam devCam;
|
||||
ref AdminMenu adminMenu;
|
||||
ref TeleportData Tdata;
|
||||
ref AdminMenuManager adminMenuManager;
|
||||
//ref AdminMenuMain AdminMenumain;
|
||||
|
||||
bool isSpectating = false;
|
||||
bool MenuOpen = false;
|
||||
|
||||
void MissionGameplay()
|
||||
{
|
||||
Print( " Mission Gameplay Constructor ");
|
||||
|
||||
m_LogHandler = new ref LogHandler();
|
||||
// m_AdminMenuGui = new ref AdminMenuGui();
|
||||
// m_PermissionBase = new ref PermissionBase;
|
||||
devTeleport = new DevTeleport();
|
||||
devCam = new DevCam();
|
||||
adminMenu = new AdminMenu();
|
||||
adminMenuManager = new AdminMenuManager();
|
||||
Tdata = new TeleportData();
|
||||
}
|
||||
|
||||
void ~MissionGameplay()
|
||||
{
|
||||
delete Tdata;
|
||||
delete m_LogHandler;
|
||||
delete adminMenuManager;
|
||||
delete adminMenu;
|
||||
// delete m_PermissionBase;
|
||||
}
|
||||
|
||||
override void OnInit()
|
||||
@ -44,16 +59,34 @@ modded class MissionGameplay
|
||||
Print( " Mission Gameplay ");
|
||||
}
|
||||
|
||||
override void OnMissionStart()
|
||||
{
|
||||
super.OnMissionStart();
|
||||
// override void OnMissionStart()
|
||||
// {
|
||||
|
||||
}
|
||||
// super.OnMissionStart();
|
||||
// m_PermissionBase.OnStart();
|
||||
// GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Player_UpdatePlayers, new Param1<string>( "" ), false, NULL );
|
||||
// }
|
||||
|
||||
override void OnMissionFinish()
|
||||
{
|
||||
// m_PermissionBase.OnFinish();
|
||||
GetGame().GetUIManager().CloseMenu( MENU_INGAME );
|
||||
super.OnMissionFinish();
|
||||
}
|
||||
|
||||
|
||||
override void OnKeyRelease( int key )
|
||||
|
||||
// override void OnUpdate( float timeslice )
|
||||
// {
|
||||
// super.OnUpdate( timeslice );
|
||||
// m_PermissionBase.OnUpdate( timeslice );
|
||||
// }
|
||||
|
||||
|
||||
|
||||
override void OnKeyPress (int key )
|
||||
{
|
||||
super.OnKeyRelease( key );
|
||||
super.OnKeyPress( key );
|
||||
PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
|
||||
if ( key == KeyCode.KC_N )
|
||||
{
|
||||
@ -63,8 +96,31 @@ modded class MissionGameplay
|
||||
}
|
||||
}
|
||||
|
||||
if ( key == KeyCode.KC_DELETE )
|
||||
{
|
||||
if(adminMenuManager.Spectate)
|
||||
{
|
||||
adminMenuManager.CamSpectate(adminMenuManager.Spectate, "", false, vector.Zero, false);
|
||||
adminMenuManager.Spectate = !adminMenuManager.Spectate;
|
||||
return;
|
||||
}
|
||||
|
||||
if(isSpectating)
|
||||
{
|
||||
adminMenuManager.CamTeleport( isSpectating, vector.Zero, false );
|
||||
isSpectating = !isSpectating;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( key == KeyCode.KC_INSERT )
|
||||
{
|
||||
{
|
||||
if(adminMenuManager.Spectate)
|
||||
{
|
||||
adminMenuManager.CamSpectate(adminMenuManager.Spectate, "", true, GetCursorPos(), false );
|
||||
adminMenuManager.Spectate = !adminMenuManager.Spectate;
|
||||
return;
|
||||
}
|
||||
adminMenuManager.CamTeleport( isSpectating, GetCursorPos() );
|
||||
isSpectating = !isSpectating;
|
||||
}
|
||||
@ -74,7 +130,10 @@ modded class MissionGameplay
|
||||
{
|
||||
if ( player )
|
||||
{
|
||||
GetPlayer().MessageStatus( "Admin Menue Is Client" );
|
||||
//GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", "DayZ-Sa-Tomato", ""));
|
||||
Widget widget = g_Game.GetUIManager().GetWidgetUnderCursor();
|
||||
// Print("TL funx");
|
||||
// TL().playerSetup();
|
||||
adminMenuManager.MenuOpen();
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,6 @@
|
||||
Copyright (C) 2018 DayZ-SA-Tomato
|
||||
|
||||
This file is part of DayZ SA Tomato.
|
||||
Originally from DayZCommunityOfflineMode
|
||||
Link : https://github.com/Arkensor/DayZCommunityOfflineMode
|
||||
|
||||
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
|
||||
@ -21,86 +19,66 @@
|
||||
*/
|
||||
modded class MissionServer
|
||||
{
|
||||
protected bool m_bLoaded;
|
||||
protected ref PermissionBase m_PermissionBase;
|
||||
protected ref ConfigModule m_ConfigModule;
|
||||
protected ref TeleportModule m_TeleportModule;
|
||||
protected ref FileHandler m_FileHandler;
|
||||
protected ref HordeModule m_HordeModule;
|
||||
protected bool m_bLoaded;
|
||||
//ref LogHandler m_LogHandler;
|
||||
ref DevTeleport devTeleport;
|
||||
ref FileHandler fileHandler;
|
||||
ref AdminMenu adminMenu;
|
||||
ref DevCam devCam;
|
||||
protected float m_LogInTimerLength1 = 1;
|
||||
ref TeleportData Tdata;
|
||||
ref ChatModules m_ChatModule;
|
||||
//admin list
|
||||
ref PlayerModule PModule;
|
||||
PlayerBase Admin = NULL;
|
||||
protected ref map<string, string> m_AdminList;
|
||||
static ref map<string, string> m_StaminaList;
|
||||
protected string m_AdminListPath = "$CurrentDir:\\DayZ-SA-Tomato\\Config\\";
|
||||
protected string m_AdminListPath2 = "$CurrentDir:\\@DayZ-SA-Tomato\\Config\\";
|
||||
void MissionServer()
|
||||
{
|
||||
//super.MissionServer();
|
||||
//m_LogHandler = new ref LogHandler();
|
||||
m_FileHandler = new ref FileHandler();
|
||||
m_HordeModule = new ref HordeModule();
|
||||
m_PermissionBase = new ref PermissionBase;
|
||||
m_ConfigModule = new ref ConfigModule;
|
||||
m_ChatModule = new ref ChatModules;
|
||||
m_TeleportModule = new ref TeleportModule;
|
||||
Print( "Dayz-Sa-Tomato initialized .." );
|
||||
m_bLoaded = false;
|
||||
devTeleport = new DevTeleport();
|
||||
fileHandler = new FileHandler();
|
||||
PModule = new PlayerModule();
|
||||
adminMenu = new AdminMenu();
|
||||
devCam = new DevCam();
|
||||
//Tdata = new TeleportData();
|
||||
}
|
||||
|
||||
void ~MissionServer()
|
||||
{
|
||||
Print( "CommunityOfflineServer::~CommunityOfflineServer()" );
|
||||
|
||||
delete PModule;
|
||||
delete adminMenu;
|
||||
delete m_PermissionBase;
|
||||
Print( "CommunityOfflineServer::~CommunityOfflineServer()" );
|
||||
}
|
||||
void WelcomeMswgClient()
|
||||
{
|
||||
GetPlayer().MessageStatus( "Client Mod active and functional." );
|
||||
}
|
||||
|
||||
//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 = EntityAI.Cast(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);
|
||||
|
||||
|
||||
//PlayerIdentity identity;
|
||||
switch(eventTypeId)
|
||||
{
|
||||
case ChatMessageEventTypeID:
|
||||
Print("Chat Event");
|
||||
ChatMessageEventParams chat_params = ChatMessageEventParams.Cast(params);
|
||||
//chat_params.param1 == 0 &&
|
||||
if (chat_params.param2 != "") //trigger only when channel is Global == 0 and Player Name does not equal to null
|
||||
{
|
||||
Param4<int,string,string,string> request_info = new Param4<int,string,string,string>(chat_params.param1, chat_params.param2, chat_params.param3, chat_params.param4);
|
||||
GetChatModule().ChatHandler(request_info); //Send the param to Admintools
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -127,19 +105,12 @@ modded class MissionServer
|
||||
PlayerPos = currentPlayer.GetPosition();
|
||||
currentPlayer.OnTick();
|
||||
|
||||
if (m_StaminaList.Contains(PlayerName))
|
||||
if(GetFileHandler().HasPermission("DisableStamina", PlayerIdent)
|
||||
{
|
||||
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++;
|
||||
|
||||
|
||||
@ -168,7 +139,6 @@ modded class MissionServer
|
||||
vector pos;
|
||||
|
||||
pos = currentPlayer.GetPosition();
|
||||
Print("CommunityOfflineServer - SendPosTOAdmins1/2() - Name :" + PlayerName + "pos : " + pos);
|
||||
//SendPosToAdmins(PlayerName, pos);
|
||||
m_currentPlayer1++;
|
||||
|
||||
@ -189,9 +159,8 @@ modded class MissionServer
|
||||
AdminIdent1 = currentPlayer1.GetIdentity();
|
||||
AdminPlayerName1 = AdminIdent1.GetName();
|
||||
PlayerSteam64ID1 = AdminIdent1.GetPlainId();
|
||||
if (IsAdmin(AdminPlayerName1, PlayerSteam64ID1 ))
|
||||
if (GetFileHandler().HasPermission("Admin", AdminIdent1))
|
||||
{
|
||||
Print("CommunityOfflineServer - SendPosTOAdmins2/2() - Name :" + PlayerName + "pos : " + pos);
|
||||
ScriptRPC PPos = new ScriptRPC();
|
||||
PPos.Write(PlayerName);
|
||||
PPos.Write(pos);
|
||||
@ -203,144 +172,37 @@ modded class MissionServer
|
||||
|
||||
}
|
||||
}
|
||||
void SendPlayerListToAdmins()
|
||||
{
|
||||
int m_currentPlayer1;
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
|
||||
for (int i = 0; i < players.Count(); ++i)
|
||||
{
|
||||
if(m_currentPlayer1 >= m_Players.Count() )
|
||||
{
|
||||
m_currentPlayer1 = 0;
|
||||
}
|
||||
PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(m_currentPlayer1));
|
||||
string PlayerName;
|
||||
PlayerIdentity PlayerIdent;
|
||||
string PlayerSteam64ID;
|
||||
PlayerIdent = currentPlayer.GetIdentity();
|
||||
PlayerName = PlayerIdent.GetName();
|
||||
PlayerSteam64ID = PlayerIdent.GetPlainId();
|
||||
Print("CommunityOfflineServer - SendPlayerListToAdmins() - Name :" + PlayerName + "m_currentPlayer1 : " + m_currentPlayer1);
|
||||
//SendPosToAdmins(PlayerName, pos);
|
||||
m_currentPlayer1++;
|
||||
|
||||
int m_currentPlayer2 = 0;
|
||||
array<Man> players1 = new array<Man>;
|
||||
GetGame().GetPlayers( players1 );
|
||||
|
||||
for (int i1 = 0; i1 < players1.Count(); ++i1)
|
||||
{
|
||||
if(m_currentPlayer2 >= m_Players.Count() )
|
||||
{
|
||||
m_currentPlayer2 = 0;
|
||||
}
|
||||
PlayerBase currentPlayer1 = PlayerBase.Cast(m_Players.Get(m_currentPlayer2));
|
||||
string AdminPlayerName1;
|
||||
PlayerIdentity AdminIdent1;
|
||||
string PlayerSteam64ID1;
|
||||
AdminIdent1 = currentPlayer1.GetIdentity();
|
||||
AdminPlayerName1 = AdminIdent1.GetName();
|
||||
PlayerSteam64ID1 = AdminIdent1.GetPlainId();
|
||||
if (IsAdmin(AdminPlayerName1, PlayerSteam64ID1 ))
|
||||
{
|
||||
ScriptRPC PList = new ScriptRPC();
|
||||
PList.Write(PlayerName);
|
||||
PList.Send(NULL, M_RPCs.M_Admin_Menu_Player_List, false, AdminIdent1);
|
||||
}
|
||||
m_currentPlayer2++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PlayerBase IsAdminID(string name, string ID )
|
||||
PlayerBase IsAdminID(string name, PlayerIdentity ID )
|
||||
{
|
||||
GetGame().GetWorld().GetPlayerList(m_Players);
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
//PlayerBase currentPlayer;
|
||||
PlayerIdentity CurIdent;
|
||||
string id;
|
||||
int Count = 0;
|
||||
for (int i = 0; i < players.Count(); ++i)
|
||||
{
|
||||
if(Count >= m_Players.Count() )
|
||||
{
|
||||
Count = 0;
|
||||
}
|
||||
PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(Count));
|
||||
Print("Current Player : " + currentPlayer.GetIdentity().GetName() + "Count : " + Count.ToString());
|
||||
if (currentPlayer.GetIdentity().GetName() == name && m_AdminList.Contains(ID))
|
||||
PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(i));
|
||||
CurIdent = currentPlayer.GetIdentity();
|
||||
if(GetFileHandler().HasPermission("Admin", ID) && CurIdent.GetName() == name )
|
||||
{
|
||||
Admin = currentPlayer;
|
||||
//AdminIdentity = Admin.GetIdentity();
|
||||
//AdminUID = AdminIdentity.GetPlainId();
|
||||
Print("Returning True for : " + players.Get(i).GetIdentity().GetName() );
|
||||
return Admin;
|
||||
break;
|
||||
}else
|
||||
{
|
||||
Print("Returning False 1" );
|
||||
Admin = NULL;
|
||||
}
|
||||
Count ++;
|
||||
}
|
||||
return Admin;
|
||||
}
|
||||
|
||||
bool IsAdmin(string name, string ID )
|
||||
{
|
||||
GetGame().GetWorld().GetPlayerList(m_Players);
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
//PlayerBase currentPlayer;
|
||||
int Count = 0;
|
||||
for (int i = 0; i < players.Count(); ++i)
|
||||
{
|
||||
if(Count >= m_Players.Count() )
|
||||
{
|
||||
Count = 0;
|
||||
}
|
||||
PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(Count));
|
||||
if (currentPlayer.GetIdentity().GetName() == name && m_AdminList.Contains(ID))
|
||||
{
|
||||
Admin = currentPlayer;
|
||||
return true;
|
||||
}else
|
||||
Count ++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
@ -352,51 +214,46 @@ modded class MissionServer
|
||||
override void OnInit()
|
||||
{
|
||||
super.OnInit();
|
||||
//SetupWeather();
|
||||
m_ConfigModule.Init();
|
||||
m_TeleportModule.Init();
|
||||
|
||||
//Admin list Insert from text
|
||||
m_AdminList = new map<string, string>; //UID, name
|
||||
m_StaminaList = new map<string, string>; //UID, name
|
||||
FileHandle AdminUIDSFile = OpenFile(m_AdminListPath + "Admins.txt", FileMode.READ);
|
||||
FileHandle AdminUIDSFile2 = OpenFile(m_AdminListPath2 + "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);
|
||||
}
|
||||
if (AdminUIDSFile2 != 0)
|
||||
{
|
||||
string line_content2 = "";
|
||||
while ( FGets(AdminUIDSFile2,line_content2) > 0 )
|
||||
{
|
||||
m_AdminList.Insert(line_content2,"null"); //UID , NAME
|
||||
Print("Adding Admin: "+ line_content2 + " To the Admin List!");
|
||||
}
|
||||
CloseFile(AdminUIDSFile2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override void OnMissionStart()
|
||||
{
|
||||
super.OnMissionStart();
|
||||
|
||||
|
||||
|
||||
m_PermissionBase.OnStart();
|
||||
}
|
||||
|
||||
override void OnMissionFinish()
|
||||
{
|
||||
m_PermissionBase.OnFinish();
|
||||
|
||||
|
||||
super.OnMissionFinish();
|
||||
super.OnMissionFinish();
|
||||
}
|
||||
|
||||
override void OnPreloadEvent(PlayerIdentity identity, out bool useDB, out vector pos, out float yaw, out int queueTime)
|
||||
{
|
||||
super.OnPreloadEvent( identity, useDB, pos, yaw, queueTime );
|
||||
GetFileHandler().GetPlayerByIdentity( identity );
|
||||
}
|
||||
|
||||
override void InvokeOnConnect( PlayerBase player, PlayerIdentity identity)
|
||||
{
|
||||
super.InvokeOnConnect( player, identity );
|
||||
GetFileHandler().GetPlayerByIdentity( identity );
|
||||
|
||||
GetGame().SelectPlayer( identity, player );
|
||||
}
|
||||
|
||||
override void InvokeOnDisconnect( PlayerBase player )
|
||||
{
|
||||
GetFileHandler().PlayerLeft( player.GetIdentity() );
|
||||
|
||||
super.InvokeOnDisconnect( player );
|
||||
}
|
||||
|
||||
void OnMissionLoaded()
|
||||
{
|
||||
|
||||
@ -405,51 +262,10 @@ modded class MissionServer
|
||||
override void OnUpdate( float timeslice )
|
||||
{
|
||||
super.OnUpdate( timeslice );
|
||||
|
||||
if( !m_bLoaded && !GetDayZGame().IsLoading() )
|
||||
{
|
||||
m_bLoaded = true;
|
||||
OnMissionLoaded();
|
||||
}
|
||||
|
||||
//m_PermissionBase.OnUpdate( timeslice );
|
||||
}
|
||||
|
||||
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_LogInTimerLength1;
|
||||
}
|
||||
else
|
||||
{
|
||||
queueTime = m_LogInTimerLength1;
|
||||
}
|
||||
}
|
||||
|
||||
void CLogInfo(string log)
|
||||
{
|
||||
int year, month, day, hour, minute, second;
|
||||
|
@ -1,98 +0,0 @@
|
||||
class FileHandler
|
||||
{
|
||||
//Main Folder
|
||||
string MainFolder = "$profile:\\Dayz-Sa-Tomato";
|
||||
string MainFolderPath = "$profile:\\Dayz-Sa-Tomato\\";
|
||||
//Config Folder and Files
|
||||
string ConfigFolder = MainFolderPath + "Config";
|
||||
string ConfigFolderPath = MainFolderPath + "Config\\";
|
||||
string ConfigFile = ConfigFolderPath + "Config.txt";
|
||||
string AdminsFile = ConfigFolderPath + "Admins.txt";
|
||||
//Customization Folder and Files
|
||||
string CustomizationFolder = MainFolderPath + "Customization";
|
||||
string CustomizationFolderPath = MainFolderPath + "Customization\\";
|
||||
string TeleportFile = CustomizationFolderPath + "Teleport_Locations.txt";
|
||||
|
||||
|
||||
|
||||
void FileHandler()
|
||||
{
|
||||
CheckAndCreateFiles();
|
||||
}
|
||||
void CheckAndCreateFiles()
|
||||
{
|
||||
CheckFolder(MainFolder);
|
||||
CheckFolder(ConfigFolder);
|
||||
CheckFolder(CustomizationFolder);
|
||||
|
||||
CheckFile(ConfigFile);
|
||||
CheckFile(AdminsFile);
|
||||
CheckFile(TeleportFile);
|
||||
}
|
||||
|
||||
void CheckFile(string File)
|
||||
{
|
||||
if(FileExist(File))
|
||||
{
|
||||
GetServerMission().Print("FileHandler : File " + File + " found!");
|
||||
}else
|
||||
{
|
||||
FileHandle file = OpenFile(File, FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, " ");
|
||||
CloseFile(file);
|
||||
}
|
||||
if(FileExist(File))
|
||||
{
|
||||
if(File == TeleportFile)
|
||||
{
|
||||
CreateTeleportFile();
|
||||
}else
|
||||
{
|
||||
GetServerMission().Print("FileHandler : File " + File + " Created");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CheckFolder(string Folder)
|
||||
{
|
||||
if(FileExist(Folder))
|
||||
{
|
||||
GetServerMission().Print("FileHandler : Folder " + Folder + " found!");
|
||||
}else
|
||||
{
|
||||
MakeDirectory(Folder);
|
||||
if(FileExist(Folder))
|
||||
{
|
||||
GetServerMission().Print("FileHandler : Folder " + Folder + " Created");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CreateTeleportFile()
|
||||
{
|
||||
FileHandle file = OpenFile(TeleportFile, FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, "prison;2651.42 0.0 1395.8");
|
||||
FPrintln(file, "mogilevka;7572.65 0.0 5182.3");
|
||||
FPrintln(file, "stary;6192.39 0.0 7666.5");
|
||||
FPrintln(file, "msta;11206.6 0.0 5398.70");
|
||||
FPrintln(file, "solni;13436.5 0.0 6158.7");
|
||||
FPrintln(file, "cherno;6350.99 0.0 2666.12");
|
||||
FPrintln(file, "elektro;10432.1 0.0 2218.56");
|
||||
FPrintln(file, "berez;12661.4 0.0 9465.03");
|
||||
FPrintln(file, "tisy;1890.45 0.0 13704.6");
|
||||
FPrintln(file, "gorka;9678.94 0.0 8828.93");
|
||||
FPrintln(file, "balota;4546.92 0.0 2416.4");
|
||||
FPrintln(file, "vybor;3916.85 0.0 8795.59");
|
||||
FPrintln(file, "vybora;4107.80 0.0 11205.29");
|
||||
FPrintln(file, "severo;8318.51 0.0 12743.4");
|
||||
FPrintln(file, "severor;7986.21 0.0 12737.1");
|
||||
CloseFile(file);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
class FileReader
|
||||
{
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -22,12 +22,19 @@ class AdminMenuManager
|
||||
|
||||
static bool Config_Teleport = false;
|
||||
static bool Config_Cam = false;
|
||||
static bool Spectate = false;
|
||||
static string SpectatePlayer;
|
||||
static bool Config_Map_Teleport = false;
|
||||
static bool Config_Map_Horde = false;
|
||||
static bool CanClose = true;
|
||||
//ref AdminMenuMessage m_adMenuMessage;
|
||||
static string Version = "Version : 1.20";
|
||||
static ref map<string, vector> m_PlayerLocations;
|
||||
static ref map<int, string> m_TeleportLocations;
|
||||
protected string m_TeleportLocationsPath = "$CurrentDir:\\DayZ-Sa-Tomato\\Config\\List\\TeleportLocation.txt";
|
||||
void ~AdminMenuManager()
|
||||
{
|
||||
|
||||
// GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).Remove( this.MessageClose );
|
||||
}
|
||||
|
||||
void AdminMenuManager()
|
||||
@ -35,6 +42,7 @@ class AdminMenuManager
|
||||
m_PlayerLocations = new map<string, vector>;
|
||||
m_TeleportLocations = new map<int, string>;
|
||||
//LoadTeleportLocations();
|
||||
// GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.MessageClose, 1000, true );
|
||||
}
|
||||
|
||||
void Teleport()
|
||||
@ -45,18 +53,76 @@ class AdminMenuManager
|
||||
}
|
||||
}
|
||||
|
||||
void CamTeleport( bool isSpectating, vector toPos )
|
||||
void Map_Teleport()
|
||||
{
|
||||
if (Config_Teleport)
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, new Param1<vector>( GetCursorPos() ), false, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
bool IsSpectate()
|
||||
{
|
||||
return Spectate;
|
||||
}
|
||||
|
||||
void SetSpectate()
|
||||
{
|
||||
Spectate = !Spectate;
|
||||
}
|
||||
|
||||
void CamSpectate( bool isSpectating, string PlayerName, bool tp, vector posi, bool enable = true)
|
||||
{
|
||||
if(enable)
|
||||
{
|
||||
//TL().player("enable");
|
||||
SpectatePlayer = PlayerName;
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM_Spectate, new Param4< bool, string, bool, vector >( Spectate, SpectatePlayer, tp, posi ), false, NULL );
|
||||
}else
|
||||
{
|
||||
//TL().player("not Enable");
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM_Spectate, new Param4< bool, string, bool, vector >( Spectate, SpectatePlayer, tp, posi ), false, NULL );
|
||||
SpectatePlayer = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CamTeleport( bool isSpectating, vector toPos, bool tp = true )
|
||||
{
|
||||
if (Config_Cam)
|
||||
{
|
||||
Print("Send Cam RPC");
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM, new Param2< bool, vector >( isSpectating, toPos ), false, NULL );
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM, new Param3< bool, vector, bool >( isSpectating, toPos, tp ), false, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
void MenuOpen()
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu, new Param1<vector>( GetCursorPos() ), false, NULL );
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu, new Param1<string>( "" ), false, NULL );
|
||||
}
|
||||
|
||||
void MessageClose()
|
||||
{
|
||||
GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", "Should Close", ""));
|
||||
g_Game.GetUIManager().CloseMenu(7001);
|
||||
}
|
||||
|
||||
void MessageMenu(string MenuMessage)
|
||||
{
|
||||
UIScriptedMenu adminMenuMessage = NULL;
|
||||
adminMenuMessage = new AdminMenuMessage(MenuMessage);
|
||||
|
||||
if ( g_Game.GetUIManager().IsMenuOpen(7001) )
|
||||
{
|
||||
adminMenuMessage.Close();
|
||||
g_Game.GetUIManager().ShowScriptedMenu( adminMenuMessage, NULL );
|
||||
}else{
|
||||
g_Game.GetUIManager().ShowScriptedMenu( adminMenuMessage, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
void MessageOpen(PlayerIdentity ident, string msg)
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_MessageBox, new Param1<string>( msg ), false, ident );
|
||||
}
|
||||
|
||||
void SendTeleportList(PlayerIdentity admin)
|
||||
@ -72,24 +138,6 @@ class AdminMenuManager
|
||||
TList.Send(NULL, M_RPCs.M_Admin_Menu_Teleport_List, false, admin);
|
||||
|
||||
|
||||
// for (int i = 0; i < m_TeleportLocations.Count(); ++i)
|
||||
// {
|
||||
|
||||
|
||||
// TStringArray strs = new TStringArray;
|
||||
// save = m_TeleportLocations.GetElement(i);
|
||||
// save.Split(a, strs );
|
||||
// v = strs.Get(1).ToVector();
|
||||
// string Lname = strs.Get(0);
|
||||
// Print("SendTeleportList Number : " + i + " Name : " + Lname + "Pos : " + strs.Get(1).ToVector());
|
||||
|
||||
|
||||
// ScriptRPC TList = new ScriptRPC();
|
||||
// TList.Write(Lname);
|
||||
// TList.Write(v);
|
||||
// TList.Send(NULL, M_RPCs.M_Admin_Menu_Teleport_List, false, admin);
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
void LoadTeleportLocations(PlayerIdentity admin)
|
||||
@ -103,19 +151,13 @@ class AdminMenuManager
|
||||
string line_content = "";
|
||||
while ( FGets(TpList,line_content) > 0 )
|
||||
{
|
||||
|
||||
TStringArray strs = new TStringArray;
|
||||
//string.Split(line_content, a, strs );
|
||||
//line_content.Split(";", strs)
|
||||
//vector v = strs.Get(1).ToVector();
|
||||
m_TeleportLocations.Insert(i,line_content); //int Name, posvector
|
||||
Print("Adding Number : " + i + " line : " + line_content + " To the Teleport List!");
|
||||
i++;
|
||||
}
|
||||
CloseFile(TpList);
|
||||
SendTeleportList(admin);
|
||||
}
|
||||
Print("TpList = NULL");
|
||||
}
|
||||
|
||||
|
||||
@ -127,4 +169,16 @@ class AdminMenuManager
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ref AdminMenuManager Tomato_AdminMenuManager;
|
||||
|
||||
ref AdminMenuManager GetAdminMenuManager()
|
||||
{
|
||||
if( !Tomato_AdminMenuManager )
|
||||
{
|
||||
Tomato_AdminMenuManager = new ref AdminMenuManager();
|
||||
}
|
||||
|
||||
return Tomato_AdminMenuManager;
|
||||
}
|
@ -37,15 +37,21 @@ class DevCam
|
||||
|
||||
ref PlayerBase player = PlayerBase.Cast(GetServerMission().GetPlayerFromIdentity( sender ));
|
||||
|
||||
Param2< bool, vector > camParams;
|
||||
Param3< bool, vector, bool > camParams;
|
||||
ctx.Read( camParams );
|
||||
|
||||
bool spectating = camParams.param1;
|
||||
vector pos = camParams.param2;
|
||||
if ( GetServerMission().IsAdmin( sender.GetName(), sender.GetPlainId() ) )
|
||||
if ( GetFileHandler().HasPermission("Admin", sender) )
|
||||
{
|
||||
if ( spectating )
|
||||
{
|
||||
if(!camParams.param3)
|
||||
{
|
||||
SetFreezePlayer( player, false );
|
||||
GetGame().SelectPlayer( sender, player );
|
||||
return;
|
||||
}
|
||||
player.SetPosition( pos );
|
||||
SetFreezePlayer( player, false );
|
||||
GetGame().SelectPlayer( sender, player );
|
||||
@ -59,7 +65,66 @@ class DevCam
|
||||
}
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{ // test if setting camera works on client side. instead of server side ^
|
||||
GetPlayer().MessageStatus("Toggle Free cam");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( rpc_type == M_RPCs.M_SET_CAM_Spectate )
|
||||
{
|
||||
Print("rpc spec");
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
PlayerIdentity selectedIdentity;
|
||||
PlayerBase selectedPlayer;
|
||||
player = PlayerBase.Cast(GetServerMission().GetPlayerFromIdentity( sender ));
|
||||
|
||||
Param4< bool, string, bool, vector > specParams;
|
||||
ctx.Read( specParams );
|
||||
|
||||
bool spectatingnew = specParams.param1;
|
||||
|
||||
if ( GetFileHandler().HasPermission("Admin", sender) )
|
||||
{
|
||||
for ( int a = 0; a < players.Count(); ++a )
|
||||
{
|
||||
selectedPlayer = PlayerBase.Cast(players.Get(a));
|
||||
selectedIdentity = NULL;
|
||||
if ( selectedPlayer.GetIdentity().GetName() == specParams.param2 )
|
||||
{
|
||||
selectedIdentity = selectedPlayer.GetIdentity();
|
||||
pos = GetServerMission().GetPlayerFromIdentity( selectedIdentity ).GetPosition()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(selectedIdentity == NULL) {return;}
|
||||
|
||||
if ( spectatingnew )
|
||||
{
|
||||
Print("Stop spec");
|
||||
if(!specParams.param3)
|
||||
{
|
||||
SetFreezePlayer( player, false );
|
||||
GetGame().SelectPlayer( sender, player );
|
||||
return;
|
||||
}
|
||||
|
||||
player.SetPosition( specParams.param4 );
|
||||
SetFreezePlayer( player, false );
|
||||
GetGame().SelectPlayer( sender, player );
|
||||
}
|
||||
else
|
||||
{
|
||||
Print("Start Spec " + selectedIdentity.GetName());
|
||||
SetFreezePlayer( player, true );
|
||||
GetGame().SelectSpectator( sender, "DayZSpectator", pos );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{ // test if setting camera works on client side. instead of server side ^
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -42,7 +42,8 @@ class DevTeleport
|
||||
ref PlayerBase player = PlayerBase.Cast(GetServerMission().GetPlayerFromIdentity( sender ));
|
||||
// permission check - server mission file
|
||||
// if has permissions send message back to client
|
||||
if ( GetServerMission().IsAdmin( sender.GetName(), sender.GetPlainId()) )
|
||||
if (GetFileHandler().HasPermission("Admin", sender) )
|
||||
|
||||
{
|
||||
player.SetPosition( positionToTeleport ); //set player position on server side
|
||||
|
||||
@ -53,7 +54,6 @@ class DevTeleport
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
//GetPlayer().SetPosition( positionToTeleport ); //client side
|
||||
GetPlayer().MessageStatus( "Teleported ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ class AdminMenuGuiCommands extends ScriptedWidgetEventHandler
|
||||
protected ButtonWidget m_Command_SpCar;
|
||||
protected ButtonWidget m_Command_Cam;
|
||||
protected ButtonWidget m_Command_CamTp;
|
||||
protected ButtonWidget m_Command_DelObj;
|
||||
protected ButtonWidget m_Command_Test;
|
||||
protected ref map<string, string> m_TestList;
|
||||
protected string m_TestListPath = "$CurrentDir:\\DayZ-SA-Tomato\\Config\\";
|
||||
@ -58,6 +59,7 @@ class AdminMenuGuiCommands extends ScriptedWidgetEventHandler
|
||||
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_DelObj = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_DelObj" ) );
|
||||
|
||||
m_Command_Test = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Test" ) );
|
||||
|
||||
@ -77,21 +79,6 @@ class AdminMenuGuiCommands extends ScriptedWidgetEventHandler
|
||||
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<string, string>; //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)
|
||||
@ -102,7 +89,6 @@ class AdminMenuGuiCommands extends ScriptedWidgetEventHandler
|
||||
if( ( w == m_Command_HealButton ) )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Heal, new Param1<string>(""), false, NULL );
|
||||
Message("1 Up");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -110,28 +96,30 @@ class AdminMenuGuiCommands extends ScriptedWidgetEventHandler
|
||||
if( ( w == m_Command_SpCar ) )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_Car, new Param1<string>(""), false, NULL );
|
||||
Message("Going fast");
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ( w == m_Command_Day ) )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Day, new Param1<string>(""), false, NULL );
|
||||
Message("DayTime");
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ( w == m_Command_Night ) )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Night, new Param1<string>(""), false, NULL );
|
||||
Message("NightTime");
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ( w == m_Command_Refill ) )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Car_Refill, new Param1<string>(""), false, NULL );
|
||||
Message("Gas Station");
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ( w == m_Command_DelObj ) )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Delete_Object, new Param1<Object>(GetCursorObject( 50.0, GetGame().GetPlayer(), 0.01 )), false, NULL );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -139,8 +127,7 @@ class AdminMenuGuiCommands extends ScriptedWidgetEventHandler
|
||||
{
|
||||
string msg;
|
||||
msg = "TestLog";
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Info, new Param1<string>( msg ), false, NULL );
|
||||
Message("Send Log RPC msg = " + msg);
|
||||
//GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TestConf, new Param1<string>( msg ), false, NULL );
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
@ -148,6 +135,21 @@ class AdminMenuGuiCommands extends ScriptedWidgetEventHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
static Object GetCursorObject( float distance = 100.0, Object ignore = NULL, float radius = 0.5, Object with = NULL )
|
||||
{
|
||||
vector rayStart = GetGame().GetCurrentCameraPosition();
|
||||
vector rayEnd = rayStart + GetGame().GetCurrentCameraDirection() * distance;
|
||||
|
||||
auto objs = GetObjectsAt( rayStart, rayEnd, ignore, radius, with );
|
||||
|
||||
if( objs.Count() > 0 )
|
||||
{
|
||||
return objs[ 0 ];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Set_Teleport()
|
||||
{
|
||||
if (AMenuM.Config_Teleport)
|
||||
|
@ -25,22 +25,32 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
protected ref AdminMenuGuiPlayer m_PlayerTab;
|
||||
protected ref AdminMenuGuiMap m_MapTab;
|
||||
protected ref AdminMenuGuiTeleport m_TeleportTab;
|
||||
protected ref AdminMenuGuiTeleport m_ConfigTab;
|
||||
protected ref AdminMenuGuiAbout m_AboutTab;
|
||||
protected ref AdminMenuGuiTeleport m_todo;
|
||||
protected ref AdminMenuGuiTeleport m_todo2;
|
||||
|
||||
ref AdminMenuManager AMenuM;
|
||||
protected ref map<string, string> m_TestListS;
|
||||
protected string m_TestListPath = "$CurrentDir:\\DayZ-SA-Tomato\\";
|
||||
|
||||
ref array<string> Locations;
|
||||
protected ButtonWidget m_Back;
|
||||
protected TextWidget m_txt_Main_Ver;
|
||||
static MultilineTextWidget m_txt_Main_Status;
|
||||
|
||||
void AdminMenuGui()
|
||||
{
|
||||
|
||||
ref array <string> Locations = new ref array<string>;
|
||||
SetID(7000);
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
}
|
||||
override void Update(float tome)
|
||||
{
|
||||
m_MapTab.Update();
|
||||
}
|
||||
|
||||
|
||||
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 ) {
|
||||
@ -54,13 +64,14 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
{
|
||||
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;
|
||||
}
|
||||
{
|
||||
m_PlayerTab.PlayerSelect();
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( w == m_SpawnTab.m_Spawn_SearchBox )
|
||||
{
|
||||
@ -74,26 +85,55 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( w == m_MapTab.m_Config_Map_Teleport )
|
||||
{
|
||||
m_MapTab.Set_Map_Teleport();
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( w == m_MapTab.m_Config_Map_Horde )
|
||||
{
|
||||
m_MapTab.Set_Map_Horde();
|
||||
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;
|
||||
}
|
||||
if ( w == m_PlayerTab.m_Cb_Player_Stamina )
|
||||
{
|
||||
m_PlayerTab.Set_Stamina();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
void ItemPrevCall(EntityAI item)
|
||||
|
||||
|
||||
void ItemPrevCall(EntityAI item)
|
||||
{
|
||||
m_SpawnTab.OnItemSelect2(item);
|
||||
}
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
m_SpawnTab.OnItemSelect2(item);
|
||||
switch(rpc_type)
|
||||
{
|
||||
|
||||
case (int)M_RPCs.M_Admin_Menu_MessageStatus:
|
||||
Param1<string> MenuMessagep;
|
||||
ctx.Read( MenuMessagep );
|
||||
string MenuMessage = MenuMessagep.param1;
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
SetStatus(MenuMessage);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -105,50 +145,145 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
|
||||
|
||||
|
||||
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_TeleportTab = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_4" ), this );
|
||||
m_ConfigTab = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_5" ), this );
|
||||
m_todo = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_5" ), this );
|
||||
m_todo2 = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_5" ), this );
|
||||
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_TeleportTab = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_4" ), this );
|
||||
m_AboutTab = new AdminMenuGuiAbout( layoutRoot.FindAnyWidget( "Tab_5" ), this );
|
||||
|
||||
//m_todo = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_5" ), this );
|
||||
//m_todo2 = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_5" ), this );
|
||||
|
||||
m_Back = ButtonWidget.Cast( layoutRoot.FindAnyWidget( "back" ) );
|
||||
|
||||
m_txt_Main_Ver = TextWidget.Cast( layoutRoot.FindAnyWidget( "txt_Main_Ver" ) );
|
||||
m_txt_Main_Status = TextWidget.Cast( layoutRoot.FindAnyWidget( "txt_Main_Status" ) );
|
||||
|
||||
m_txt_Main_Ver.SetText(GetAdminMenuManager().Version);
|
||||
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<string, string>; //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()
|
||||
{
|
||||
|
||||
delete m_SpawnTab;
|
||||
delete m_AboutTab;
|
||||
delete m_MapTab;
|
||||
delete m_CommandTab;
|
||||
delete m_TeleportTab;
|
||||
}
|
||||
|
||||
void SetStatus(string txt)
|
||||
{
|
||||
// if(m_txt_Main_Status == NULL)
|
||||
// {
|
||||
m_txt_Main_Status = TextWidget.Cast( layoutRoot.FindAnyWidget( "txt_Main_Status" ) );
|
||||
// }
|
||||
|
||||
m_txt_Main_Status.SetText(txt);
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.SetStatusNull, 1500, false );
|
||||
}
|
||||
|
||||
void SetStatusNull()
|
||||
{
|
||||
//m_txt_Main_Status = TextWidget.Cast( layoutRoot.FindAnyWidget( "txt_Main_Status" ) );
|
||||
m_txt_Main_Status.SetText("");
|
||||
}
|
||||
|
||||
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
|
||||
{
|
||||
super.OnMouseLeave(w, enterW, x, y);
|
||||
bool ret;
|
||||
if ( w == m_MapTab.m_Map_Map )
|
||||
{
|
||||
ret = m_MapTab.OnMouseLeave(w, x, y);
|
||||
}
|
||||
|
||||
//MapTab HordeCount
|
||||
if ( w == m_MapTab.m_editbox_Map_HordeCount )
|
||||
{
|
||||
m_MapTab.MouseLeave(w, enterW, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
//PlayerTab
|
||||
if ( w.GetName().Contains("_Player_") )
|
||||
{
|
||||
m_PlayerTab.MouseLeave(w, enterW, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
//SpawnTab
|
||||
if ( w.GetName().Contains("_Spawn_") )
|
||||
{
|
||||
m_SpawnTab.MouseLeave(w, enterW, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
//TeleportTab
|
||||
if ( w.GetName().Contains("_Teleport_") )
|
||||
{
|
||||
m_TeleportTab.MouseLeave(w, enterW, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
override bool OnMouseEnter( Widget w, int x, int y )
|
||||
{
|
||||
|
||||
bool ret;
|
||||
if ( w == m_MapTab.m_Map_Map )
|
||||
{
|
||||
ret = m_MapTab.OnMouseEnter(w, x, y);
|
||||
}
|
||||
|
||||
if ( w == m_MapTab.m_helper_Map_MouseLeave )
|
||||
{
|
||||
ret = m_MapTab.OnMouseEnter(w, x, y);
|
||||
}
|
||||
|
||||
//MapTab HordeCount
|
||||
if ( w == m_MapTab.m_editbox_Map_HordeCount )
|
||||
{
|
||||
m_MapTab.MouseEnter(w, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
//PlayerTab
|
||||
if ( w.GetName().Contains("_Player_") )
|
||||
{
|
||||
m_PlayerTab.MouseEnter(w, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
//SpawnTab
|
||||
if ( w.GetName().Contains("_Spawn_") )
|
||||
{
|
||||
m_SpawnTab.MouseEnter(w, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
//TeleportTab
|
||||
if ( w.GetName().Contains("_Teleport_") )
|
||||
{
|
||||
m_TeleportTab.MouseEnter(w, x, y);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
override bool OnClick( Widget w, int x, int y, int button )
|
||||
{
|
||||
//SpawnTab
|
||||
////SpawnTab
|
||||
bool ok = false;
|
||||
if ( w.GetName().Contains("_spawn_") )
|
||||
{
|
||||
@ -157,11 +292,11 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
}
|
||||
|
||||
//TeleportTab
|
||||
if ( w.GetName().Contains("_Teleport_") )
|
||||
{
|
||||
ok = m_TeleportTab.Click(w, x, y, button);
|
||||
return ok;
|
||||
}
|
||||
if ( w.GetName().Contains("_Teleport_") )
|
||||
{
|
||||
ok = m_TeleportTab.Click(w, x, y, button);
|
||||
return ok;
|
||||
}
|
||||
|
||||
//CommandTab
|
||||
if ( w.GetName().Contains("_Command_") )
|
||||
@ -171,21 +306,21 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
}
|
||||
|
||||
//PlayerTab
|
||||
if ( w.GetName().Contains("_Player_") )
|
||||
{
|
||||
ok = m_PlayerTab.Click(w, x, y, button);
|
||||
return ok;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
if( button == MouseState.LEFT )
|
||||
{
|
||||
if( w == m_Back )
|
||||
{
|
||||
Back();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -210,7 +345,7 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_TeleportTab.Focus();
|
||||
m_TeleportTab.Focus();
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
@ -220,7 +355,12 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
m_ConfigTab.Focus();
|
||||
m_AboutTab.Focus();
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
//m_AboutTab.Focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -234,58 +374,6 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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()
|
||||
{
|
||||
@ -301,28 +389,16 @@ class AdminMenuGui extends UIScriptedMenu
|
||||
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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
ref AdminMenuGui Tomato_AdminMenu;
|
||||
|
||||
ref AdminMenuGui GetAdminMenu()
|
||||
{
|
||||
if( !Tomato_AdminMenu )
|
||||
{
|
||||
Tomato_AdminMenu = new ref AdminMenuGui();
|
||||
}
|
||||
|
||||
return Tomato_AdminMenu;
|
||||
}
|
@ -21,35 +21,150 @@ class AdminMenuGuiMap extends ScriptedWidgetEventHandler
|
||||
{
|
||||
protected Widget m_Root;
|
||||
|
||||
protected MapWidget m_Map_Map;
|
||||
|
||||
MapWidget m_Map_Map;
|
||||
ItemPreviewWidget m_helper_Map_MouseLeave;
|
||||
//ref AdminMenuManager AMenuM;
|
||||
ref HordeModule m_HordeModule;
|
||||
protected AdminMenuGui m_Menu;
|
||||
|
||||
protected bool TpOK = true;
|
||||
EditBoxWidget m_editbox_Map_HordeCount;
|
||||
protected bool HordeOK = true;
|
||||
protected ref map<int, ref Param2<string, string>> m_TextMap;
|
||||
protected TextWidget m_Text_Map_Location;
|
||||
protected bool PointerMap = false;
|
||||
CheckBoxWidget m_Config_Map_Teleport;
|
||||
CheckBoxWidget m_Config_Map_Horde;
|
||||
|
||||
void AdminMenuGuiMap( Widget parent, AdminMenuGui menu )
|
||||
{
|
||||
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
m_HordeModule = new ref HordeModule();
|
||||
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" ) );
|
||||
m_Map_Map = MapWidget.Cast( m_Root.FindAnyWidget( "Map_Map_Main" ) );
|
||||
m_helper_Map_MouseLeave = ItemPreviewWidget.Cast( m_Root.FindAnyWidget( "helper_Map_MouseLeave" ) );
|
||||
m_editbox_Map_HordeCount = EditBoxWidget.Cast( m_Root.FindAnyWidget( "editbox_Map_HordeCount" ) );
|
||||
m_Text_Map_Location = TextWidget.Cast( m_Root.FindAnyWidget( "Text_Map_Location" ) );
|
||||
m_Config_Map_Teleport = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Config_Map_Teleport" ) );
|
||||
m_Config_Map_Horde = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Config_Map_Horde" ) );
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Map_Player_Request, new Param1<string>(""), false, NULL );
|
||||
|
||||
|
||||
if (GetAdminMenuManager().Config_Map_Teleport)
|
||||
{
|
||||
//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"); */
|
||||
m_Config_Map_Teleport.SetChecked(true);
|
||||
}else
|
||||
{
|
||||
m_Config_Map_Teleport.SetChecked(false);
|
||||
}
|
||||
|
||||
if (GetAdminMenuManager().Config_Map_Horde)
|
||||
{
|
||||
m_Config_Map_Horde.SetChecked(true);
|
||||
}else
|
||||
{
|
||||
m_Config_Map_Horde.SetChecked(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ~AdminMenuGuiMap()
|
||||
{
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (PointerMap) {
|
||||
int X, Y;
|
||||
vector Map;
|
||||
GetMousePos(X, Y);
|
||||
Map = m_Map_Map.ScreenToMap(Vector(X, Y, 0));
|
||||
m_Text_Map_Location.SetText("X: " + Map[0] + " Y: " + Map[2]);
|
||||
|
||||
if (GetAdminMenuManager().Config_Map_Teleport && PointerMap && GetMouseState(MouseState.LEFT) < 0) {
|
||||
if (TpOK) {
|
||||
TpOK = false;
|
||||
// Send tp rpc
|
||||
ScriptRPC TListDst = new ScriptRPC();
|
||||
TListDst.Write( Map[0] );
|
||||
TListDst.Write( Map[2] );
|
||||
TListDst.Send(NULL, M_RPCs.M_Admin_Menu_TpMeToPosVec, false, NULL);
|
||||
}
|
||||
} else {
|
||||
if (!TpOK) TpOK = true;
|
||||
}
|
||||
|
||||
if (GetAdminMenuManager().Config_Map_Horde && PointerMap && GetMouseState(MouseState.LEFT) < 0) {
|
||||
if (HordeOK) {
|
||||
HordeOK = false;
|
||||
m_HordeModule.Spawn(Map, GetHordeCount())
|
||||
}
|
||||
} else {
|
||||
if (!HordeOK) HordeOK = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MouseEnter(Widget w, int x, int y )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = false;
|
||||
}
|
||||
|
||||
void MouseLeave(Widget w, Widget enterW, int x, int y)
|
||||
{
|
||||
GetAdminMenuManager().CanClose = true;
|
||||
}
|
||||
|
||||
int GetHordeCount()
|
||||
{
|
||||
return m_editbox_Map_HordeCount.GetText().ToInt();
|
||||
}
|
||||
|
||||
void Set_Map_Teleport()
|
||||
{
|
||||
if (GetAdminMenuManager().Config_Map_Teleport)
|
||||
{
|
||||
GetAdminMenuManager().Config_Map_Teleport = false;
|
||||
}else
|
||||
{
|
||||
GetAdminMenuManager().Config_Map_Teleport = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Set_Map_Horde()
|
||||
{
|
||||
if (GetAdminMenuManager().Config_Map_Horde)
|
||||
{
|
||||
GetAdminMenuManager().Config_Map_Horde = false;
|
||||
}else
|
||||
{
|
||||
GetAdminMenuManager().Config_Map_Horde = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool OnMouseLeave( Widget w, int x, int y )
|
||||
{
|
||||
if ( w == m_Map_Map ) {
|
||||
PointerMap = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OnMouseEnter( Widget w, int x, int y ) {
|
||||
if ( w == m_Map_Map ) {
|
||||
|
||||
PointerMap = true;
|
||||
return true;
|
||||
}
|
||||
if ( w == m_helper_Map_MouseLeave ) {
|
||||
PointerMap = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Focus()
|
||||
{
|
||||
|
||||
@ -57,7 +172,7 @@ protected MapWidget m_Map_Map;
|
||||
|
||||
void Message( string txt )
|
||||
{
|
||||
GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
// GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
}
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
@ -77,8 +192,6 @@ protected MapWidget m_Map_Map;
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
AddPlayerMarker(PosName, Pos1);
|
||||
string msg = "AdminMenuMap - M_RPCs.M_Admin_Menu_Map_Player Adding " + PosName + " Pos :" + Pos1 + " To List";
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Debug, new Param1<string>( msg ), false, NULL );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
protected Widget m_Root;
|
||||
|
||||
|
||||
|
||||
ref AdminMenuManager AMenuM;
|
||||
protected AdminMenuGui m_Menu;
|
||||
|
||||
protected ref map<int, ref Param2<string, string>> m_TextMap;
|
||||
@ -36,16 +36,16 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
protected ButtonWidget m_btn_Player_HealAll;
|
||||
protected ButtonWidget m_btn_Player_StripAll;
|
||||
protected ButtonWidget m_btn_Player_TpMeAll;
|
||||
protected ButtonWidget m_btn_Player_Spectate;
|
||||
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;
|
||||
EditBoxWidget m_Box_Player_Message;
|
||||
CheckBoxWidget m_Cb_Player_Stamina;
|
||||
TextListboxWidget m_PlayerList;
|
||||
|
||||
|
||||
void AdminMenuGuiPlayer( Widget parent, AdminMenuGui menu )
|
||||
{
|
||||
|
||||
@ -65,6 +65,7 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
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_Spectate = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Spectate" ) );
|
||||
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" ) );
|
||||
@ -72,7 +73,10 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
m_Cb_Player_Stamina = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Cb_Player_Stamina" ) );
|
||||
//PlayerList();
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_List_Request, new Param1<string>(""), false, NULL );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void LogD(string s)
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Debug, new Param1<string>( s ), false, NULL );
|
||||
@ -112,7 +116,6 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
if( ( w == m_btn_Player_TpMe ) )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpMe, new Param1<string>(PlayerName), false, NULL );
|
||||
LogD("AdminMenuPlayer - Click - m_btn_Player_TpMe Playername : " + PlayerName);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -147,12 +150,22 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ( w == m_btn_Player_Spectate ) )
|
||||
{
|
||||
if(GetAdminMenuManager().IsSpectate())
|
||||
{
|
||||
GetAdminMenuManager().CamSpectate(GetAdminMenuManager().IsSpectate(), GetCurrentSelection(), false, vector.Zero, false);
|
||||
GetAdminMenuManager().SetSpectate();
|
||||
return true;
|
||||
}
|
||||
GetAdminMenuManager().CamSpectate(GetAdminMenuManager().IsSpectate(), GetCurrentSelection(), false, vector.Zero, true);
|
||||
GetAdminMenuManager().SetSpectate();
|
||||
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);
|
||||
TL().all(m_Box_Player_Message.GetText());
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
@ -173,6 +186,24 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
}
|
||||
void ~AdminMenuGuiPlayer()
|
||||
{
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).Remove( this.UpdateStats );
|
||||
}
|
||||
|
||||
void MouseEnter(Widget w, int x, int y )
|
||||
{
|
||||
if ( w == m_Box_Player_Message )
|
||||
{
|
||||
//TL().player(PlayerBase.Cast( GetGame().GetPlayer()).GetIdentity(), "Cant close !");
|
||||
GetAdminMenuManager().CanClose = false;
|
||||
}
|
||||
}
|
||||
|
||||
void MouseLeave(Widget w, Widget enterW, int x, int y)
|
||||
{
|
||||
if ( w == m_Box_Player_Message )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Focus()
|
||||
@ -199,6 +230,7 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
int i;
|
||||
switch(rpc_type)
|
||||
{
|
||||
|
||||
@ -245,23 +277,33 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Menu_Player_List:
|
||||
string ListName;
|
||||
ctx.Read(ListName);
|
||||
array<string> allplayers = new array<string>;
|
||||
ctx.Read(allplayers);
|
||||
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
|
||||
}
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
m_PlayerList.AddItem( ListName, NULL, 0 );
|
||||
string msg = "AdminMenuMap - M_RPCs.M_Admin_Menu_Player_List Adding " + ListName;
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Debug, new Param1<string>( msg ), false, NULL );
|
||||
m_PlayerList.ClearItems();
|
||||
for (i = 0; i < allplayers.Count(); ++i)
|
||||
{
|
||||
m_PlayerList.AddItem( allplayers[i], NULL, 0 );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Menu_Player_List_Clear:
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
m_PlayerList.ClearItems();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerSelect()
|
||||
void UpdateStats()//Remove
|
||||
{
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
@ -273,24 +315,46 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
selectedIdentity = selectedPlayer.GetIdentity();
|
||||
if ( selectedIdentity.GetName() == GetCurrentSelection() )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Health_Request, new Param1<PlayerBase>(selectedPlayer), false, NULL );
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1<string>(selectedIdentity.GetName()), false, NULL );
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Health_Request, new Param1<string>(selectedIdentity.GetName()), false, NULL );
|
||||
}
|
||||
}
|
||||
//GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Health_Request, new Param1<PlayerBase>(selectedPlayer), false, NULL );
|
||||
}
|
||||
|
||||
void PlayerSelect()
|
||||
{
|
||||
//GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1<string>(GetCurrentSelection() ), false, NULL );
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
PlayerBase selectedPlayer;
|
||||
PlayerIdentity selectedIdentity;
|
||||
for ( int a = 0; a < players.Count(); ++a )
|
||||
{
|
||||
selectedPlayer = PlayerBase.Cast(players.Get(a));
|
||||
selectedIdentity = selectedPlayer.GetIdentity();
|
||||
if ( selectedIdentity.GetName() == GetCurrentSelection() )
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Health_Request, new Param1<string>(selectedIdentity.GetName()), false, NULL );
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1<string>(selectedIdentity.GetName()), false, NULL );
|
||||
}
|
||||
}
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.UpdateStats, 1500, true );
|
||||
|
||||
}
|
||||
|
||||
void PlayerList()
|
||||
{
|
||||
|
||||
// m_PlayerList.ClearItems();
|
||||
// array<Man> players = new array<Man>;
|
||||
// GetGame().GetPlayers( players );
|
||||
// for (int i = 0; i < players.Count(); ++i)
|
||||
// {
|
||||
// string msg = "AdminMenuPlayer - PlayerList() Adding " + players.Get(i).GetIdentity().GetName() + " To List";
|
||||
// GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Info, new Param1<string>( msg ), false, NULL );
|
||||
// m_PlayerList.AddItem( players.Get(i).GetIdentity().GetName(), NULL, 0 );
|
||||
// }
|
||||
m_PlayerList.ClearItems();
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
for (int i = 0; i < players.Count(); ++i)
|
||||
{
|
||||
string msg = "AdminMenuPlayer - PlayerList() Adding " + players.Get(i).GetIdentity().GetName() + " To List";
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Info, new Param1<string>( msg ), false, NULL );
|
||||
m_PlayerList.AddItem( players.Get(i).GetIdentity().GetName(), NULL, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
string GetCurrentSelection()
|
||||
@ -307,7 +371,7 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
|
||||
|
||||
void Message( string txt )
|
||||
{
|
||||
GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
// GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,10 @@
|
||||
*/
|
||||
class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
{
|
||||
|
||||
|
||||
protected Widget m_Root;
|
||||
|
||||
protected AdminMenuGui m_Menu;
|
||||
TextListboxWidget m_classList;
|
||||
EditBoxWidget m_Spawn_SearchBox;
|
||||
@ -27,9 +30,9 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
protected ButtonWidget m_Spawn_btnSpawnCursor;
|
||||
protected ButtonWidget m_Spawn_btnSpawnInventory;
|
||||
protected ButtonWidget m_Spawn_btnCancel;
|
||||
protected EditBoxWidget m_Spawn_QuantityItem;
|
||||
EditBoxWidget m_Spawn_QuantityItem;
|
||||
ItemPreviewWidget m_item_widget;
|
||||
|
||||
//ref AdminMenuManager AMenuM;
|
||||
//private ItemPreviewWidget m_item_widget;
|
||||
protected EntityAI previewItem;
|
||||
private int m_characterRotationX;
|
||||
@ -64,6 +67,7 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
//TODO
|
||||
bool Click( Widget w, int x, int y, int button )
|
||||
{
|
||||
|
||||
string strSelection = GetCurrentSelection();
|
||||
bool ai = false;
|
||||
|
||||
@ -139,10 +143,43 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
void MouseLeave(Widget w, Widget enterW, int x, int y)
|
||||
{
|
||||
|
||||
if ( w == m_Spawn_QuantityItem )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = true;
|
||||
}
|
||||
|
||||
if ( w == m_Spawn_SearchBox )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MouseEnter(Widget w, int x, int y)
|
||||
{
|
||||
|
||||
if ( w == m_Spawn_QuantityItem )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = false;
|
||||
}
|
||||
|
||||
if ( w == m_Spawn_SearchBox )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void UpdateList( string classFilter ) // All default
|
||||
{
|
||||
|
||||
m_classList.ClearItems();
|
||||
TStringArray configs = new TStringArray;
|
||||
configs.Insert( CFG_VEHICLESPATH );
|
||||
@ -195,6 +232,7 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
string GetCurrentSelection()
|
||||
@ -216,7 +254,7 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
|
||||
bool OnItemSelect( Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
|
||||
{
|
||||
|
||||
/*
|
||||
if ( w == m_classList )
|
||||
{
|
||||
EntityAI item;
|
||||
@ -255,12 +293,12 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
void OnItemSelect2(EntityAI item)
|
||||
{
|
||||
|
||||
/*
|
||||
|
||||
|
||||
if (item)
|
||||
@ -294,6 +332,7 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
//m_item_widget.SetModelOrientation
|
||||
PPEffects.SetBlurInventory(1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
override bool OnMouseButtonDown( Widget w, int x, int y, int button )
|
||||
@ -396,7 +435,7 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
|
||||
void Message( string txt )
|
||||
{
|
||||
GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
// GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
}
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
@ -416,10 +455,15 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
|
||||
void SetItem(EntityAI item)
|
||||
{
|
||||
/*
|
||||
if (item)
|
||||
{
|
||||
|
||||
//InspectMenuNew.UpdateItemInfo(m_Root, item);
|
||||
//delete m_item_widget;
|
||||
|
||||
|
||||
|
||||
if (item == NULL)
|
||||
{
|
||||
item = EntityAI.Cast(GetGame().CreateObject( "WaterBottle", vector.Zero, false, false ));
|
||||
@ -451,6 +495,7 @@ class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler
|
||||
//m_item_widget.SetModelOrientation
|
||||
//PPEffects.SetBlurInventory(1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
override bool OnFocus( Widget w, int x, int y )
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
class AdminMenuGuiTeleport extends ScriptedWidgetEventHandler
|
||||
{
|
||||
|
||||
protected Widget m_Root;
|
||||
|
||||
|
||||
@ -29,77 +30,150 @@ class AdminMenuGuiTeleport extends ScriptedWidgetEventHandler
|
||||
protected ButtonWidget m_btn_Teleport_Teleport;
|
||||
protected ButtonWidget m_btn_Teleport_Reload;
|
||||
protected ButtonWidget m_btn_Teleport_Add_Location;
|
||||
ref AdminMenuManager adminMenuManager;
|
||||
protected EditBoxWidget m_Text_Teleport_Loacation_Name;
|
||||
protected ButtonWidget m_btn_Teleport_Spawn_Horde;
|
||||
//ref AdminMenuManager adminMenuManager;
|
||||
EditBoxWidget m_Text_Teleport_Loacation_Name;
|
||||
EditBoxWidget m_editbox_Teleport_HordeCount;
|
||||
static ref map<string, string> m_TeleportLocations;
|
||||
static ref map<int, string> m_TeleportLocations_old;
|
||||
TextListboxWidget m_List_Teleport_Location;
|
||||
|
||||
|
||||
ref array<string> TLoacations;
|
||||
ref array<vector> TPos;
|
||||
ref HordeModule m_HordeModule;
|
||||
//ref AdminMenuManager AMenuM;
|
||||
|
||||
void AdminMenuGuiTeleport( Widget parent, AdminMenuGui menu )
|
||||
{
|
||||
|
||||
m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Teleport.layout", parent );
|
||||
adminMenuManager = new AdminMenuManager();
|
||||
//adminMenuManager = new AdminMenuManager();
|
||||
m_HordeModule = new ref HordeModule();
|
||||
m_Menu = menu;
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
m_TeleportLocations = new map<string, string>;
|
||||
m_TeleportLocations_old = new map<int, string>;
|
||||
m_List_Teleport_Location = TextListboxWidget.Cast( m_Root.FindAnyWidget( "List_Teleport_Location" ) );
|
||||
m_Text_Teleport_Loacation_Name = EditBoxWidget.Cast( m_Root.FindAnyWidget( "Text_Teleport_Loacation_Name" ) );
|
||||
m_editbox_Teleport_HordeCount = EditBoxWidget.Cast( m_Root.FindAnyWidget( "editbox_Teleport_HordeCount" ) );
|
||||
m_btn_Teleport_Teleport = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Teleport_Teleport" ) );
|
||||
m_btn_Teleport_Reload = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Teleport_Reload" ) );
|
||||
m_btn_Teleport_Add_Location = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Teleport_Add_Location" ) );
|
||||
|
||||
m_List_Teleport_Location.ClearItems();
|
||||
m_btn_Teleport_Spawn_Horde = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Teleport_Spawn_Horde" ) );
|
||||
//m_List_Teleport_Location.ClearItems();
|
||||
//TpLocations;
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_List_Request, new Param1<string>(""), false, NULL );
|
||||
// for ( int i = 0; i < m_Root.Locations.Count(); i++ )
|
||||
// {
|
||||
// m_List_Teleport_Location.AddItem( GetAdminMenu().Locations[i], NULL, 0 );
|
||||
// }
|
||||
|
||||
Print("Request Data");
|
||||
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_RequestData, new Param1<string>(""), false, NULL );
|
||||
|
||||
}
|
||||
|
||||
void MouseLeave(Widget w, Widget enterW, int x, int y)
|
||||
{
|
||||
if ( w == m_Text_Teleport_Loacation_Name )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = true;
|
||||
}
|
||||
|
||||
if ( w == m_editbox_Teleport_HordeCount )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = true;
|
||||
}
|
||||
}
|
||||
|
||||
void MouseEnter(Widget w, int x, int y )
|
||||
{
|
||||
if ( w == m_Text_Teleport_Loacation_Name )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = false;
|
||||
}
|
||||
|
||||
if ( w == m_editbox_Teleport_HordeCount )
|
||||
{
|
||||
GetAdminMenuManager().CanClose = false;
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteTeleportLocation()
|
||||
{
|
||||
m_List_Teleport_Location.ClearItems();
|
||||
}
|
||||
|
||||
int GetHordeCount()
|
||||
{
|
||||
return m_editbox_Teleport_HordeCount.GetText().ToInt();
|
||||
}
|
||||
|
||||
void AddTeleportLocation(string name)
|
||||
{
|
||||
m_List_Teleport_Location.AddItem( name, NULL, 0 );
|
||||
}
|
||||
void LogD(string s)
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Debug, new Param1<string>( s ), false, NULL );
|
||||
}
|
||||
bool Click(Widget w, int x, int y, int button)
|
||||
{
|
||||
|
||||
PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() );
|
||||
string TpLocation = GetCurrentSelection();
|
||||
if (player)
|
||||
{
|
||||
if( ( w == m_btn_Teleport_Teleport ) )
|
||||
{
|
||||
string TpDest;
|
||||
|
||||
m_TeleportLocations.Find(TpLocation, TpDest);
|
||||
Print("TpLocation : " + TpLocation + " Tp Dest : " + TpDest);
|
||||
//GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpMeToPos, new Param1<string>(TpDest.ToString()), false, NULL );
|
||||
ScriptRPC TListDst = new ScriptRPC();
|
||||
TListDst.Write(TpDest);
|
||||
TListDst.Send(NULL, M_RPCs.M_Admin_Menu_TpMeToPos, false, NULL);
|
||||
return true;
|
||||
for (int t = 0; t < GetFileHandler().RootTeleport.Children.Count(); ++t)
|
||||
{
|
||||
if(GetFileHandler().RootTeleport.Children[t].LocationName == TpLocation)
|
||||
{
|
||||
ScriptRPC TListDst = new ScriptRPC();
|
||||
TListDst.Write( GetFileHandler().RootTeleport.Children[t].LocationPos[0] );
|
||||
TListDst.Write( GetFileHandler().RootTeleport.Children[t].LocationPos[2] );
|
||||
TListDst.Send(NULL, M_RPCs.M_Admin_Menu_TpMeToPosVec, false, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ( w == m_btn_Teleport_Reload ) )
|
||||
{
|
||||
m_TeleportLocations.Clear();
|
||||
m_List_Teleport_Location.ClearItems();
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_List_Request, new Param1<string>(""), false, NULL );
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_RequestData, new Param1<string>(""), false, NULL );
|
||||
}
|
||||
|
||||
if( ( w == m_btn_Teleport_Add_Location ) )
|
||||
{
|
||||
|
||||
|
||||
m_List_Teleport_Location.ClearItems();
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_List_Request, new Param1<string>(""), false, NULL );
|
||||
string text = m_Text_Teleport_Loacation_Name.GetText();
|
||||
SendToFile(text);
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_RequestData, new Param1<string>(""), false, NULL );
|
||||
}
|
||||
|
||||
if( ( w == m_btn_Teleport_Spawn_Horde ) )
|
||||
{
|
||||
int HCount = GetHordeCount();
|
||||
for (t = 0; t < GetFileHandler().RootTeleport.Children.Count(); ++t)
|
||||
{
|
||||
if(GetFileHandler().RootTeleport.Children[t].LocationName == TpLocation)
|
||||
{
|
||||
m_HordeModule.Spawn(GetFileHandler().RootTeleport.Children[t].LocationPos, GetHordeCount(), 50, GetCurrentSelection())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
void SendToFile(string name)
|
||||
{
|
||||
ScriptRPC Adding = new ScriptRPC();
|
||||
Adding.Write(name);
|
||||
Adding.Send(NULL, M_RPCs.M_Admin_Menu_Teleport_Write_Pre, false, NULL);
|
||||
}
|
||||
|
||||
void ~AdminMenuGuiTeleport()
|
||||
{
|
||||
m_List_Teleport_Location.ClearItems();
|
||||
|
||||
}
|
||||
|
||||
void Focus()
|
||||
@ -111,8 +185,10 @@ class AdminMenuGuiTeleport extends ScriptedWidgetEventHandler
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
override bool OnFocus( Widget w, int x, int y )
|
||||
{
|
||||
/*
|
||||
if( m_Menu )
|
||||
m_Menu.OnFocus( w, x, y );
|
||||
if( w )
|
||||
@ -125,88 +201,48 @@ class AdminMenuGuiTeleport extends ScriptedWidgetEventHandler
|
||||
}
|
||||
|
||||
return ( w != null );
|
||||
*/
|
||||
}
|
||||
bool stop = false;
|
||||
|
||||
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
int ListCount = 0;
|
||||
|
||||
int ListCount = 0;
|
||||
ref array<string> TLoacations = new ref array< string >;
|
||||
ref array<vector> TPos = new ref array< vector >;
|
||||
PlayerBase Admin;
|
||||
switch(rpc_type)
|
||||
{
|
||||
|
||||
case M_RPCs.M_Admin_Menu_Teleport_List:
|
||||
string PosName;
|
||||
vector Pos1; //Vector Postition
|
||||
// ctx.Read(PosName);
|
||||
// ctx.Read(Pos1);
|
||||
ctx.Read(m_TeleportLocations_old);
|
||||
//ctx.Read(m_TeleportLocations);
|
||||
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
|
||||
}
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
|
||||
for (int i = 0; i < m_TeleportLocations_old.Count(); ++i)
|
||||
case M_RPCs.M_Admin_Menu_Teleport_ReciveData:
|
||||
Print("Data Recived");
|
||||
ref array<string> TpName = new ref array< string >;
|
||||
ref array<vector> TpPos = new ref array< vector >;
|
||||
ctx.Read(TpName);
|
||||
ctx.Read(TpPos);
|
||||
Print("Data Count = " + TpName.Count())
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
ListCount ++;
|
||||
string save;
|
||||
string a =";";
|
||||
vector v;
|
||||
TStringArray strs = new TStringArray;
|
||||
save = m_TeleportLocations_old.GetElement(i);
|
||||
save.Split(a, strs );
|
||||
v = strs.Get(1).ToVector();
|
||||
string Lname = strs.Get(0);
|
||||
if (m_TeleportLocations.Contains(Lname))
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_TeleportLocations.Insert(Lname, strs.Get(1)); //int Name, posvector
|
||||
m_List_Teleport_Location.AddItem( Lname, NULL, 0 );
|
||||
Print("SendTeleportList Number : " + i + " Name : " + Lname + "Pos : " + strs.Get(1));
|
||||
|
||||
}
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
m_List_Teleport_Location.ClearItems();
|
||||
for ( int i = 0; i < TpName.Count(); i++ )
|
||||
{
|
||||
TLoacations.Insert(TpName[i])
|
||||
TPos.Insert(TpPos[i])
|
||||
m_List_Teleport_Location.AddItem( TLoacations[i], NULL, 0 );
|
||||
Print("Client - Created Child with name = " + TpName[i]);
|
||||
GetFileHandler().RootTeleport.AddChilds(TpName[i], TpPos[i])
|
||||
}
|
||||
//Loadarray();
|
||||
}
|
||||
// Print("Adding : PosName : " + PosName + " Pos1 : " + Pos1);
|
||||
// m_TeleportLocations.Insert(PosName, Pos1); //int Name, posvector
|
||||
// m_List_Teleport_Location.AddItem( PosName, NULL, 0 );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// void PlayerSelect()
|
||||
// {
|
||||
// array<Man> players = new array<Man>;
|
||||
// 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<PlayerBase>(selectedPlayer), false, NULL );
|
||||
// GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1<string>(selectedIdentity.GetName()), false, NULL );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
void PlayerList()
|
||||
{
|
||||
|
||||
// m_PlayerList.ClearItems();
|
||||
// array<Man> players = new array<Man>;
|
||||
// GetGame().GetPlayers( players );
|
||||
// for (int i = 0; i < players.Count(); ++i)
|
||||
// {
|
||||
// string msg = "AdminMenuPlayer - PlayerList() Adding " + players.Get(i).GetIdentity().GetName() + " To List";
|
||||
// GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Info, new Param1<string>( msg ), false, NULL );
|
||||
// m_PlayerList.AddItem( players.Get(i).GetIdentity().GetName(), NULL, 0 );
|
||||
// }
|
||||
}
|
||||
|
||||
string GetCurrentSelection()
|
||||
@ -221,10 +257,10 @@ class AdminMenuGuiTeleport extends ScriptedWidgetEventHandler
|
||||
return "";
|
||||
}
|
||||
|
||||
void Message( string txt )
|
||||
{
|
||||
GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
}
|
||||
// void Message( string txt )
|
||||
// {
|
||||
// GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, ""));
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
@ -24,15 +24,6 @@ FrameWidgetClass rootFrame {
|
||||
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
|
||||
@ -58,7 +49,7 @@ FrameWidgetClass rootFrame {
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Refill"
|
||||
text "Refuel"
|
||||
}
|
||||
CheckBoxWidgetClass Config_Cam {
|
||||
position 125 165
|
||||
@ -90,15 +81,6 @@ FrameWidgetClass rootFrame {
|
||||
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
|
||||
@ -126,14 +108,14 @@ FrameWidgetClass rootFrame {
|
||||
vexactsize 1
|
||||
text "Heal"
|
||||
}
|
||||
ButtonWidgetClass ButtonWidget11 {
|
||||
position 12.8862 -89.7536
|
||||
size 300 50
|
||||
ButtonWidgetClass btn_Command_DelObj {
|
||||
position 125 560
|
||||
size 460.19101 50
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Heal"
|
||||
text "Delete Obj on cursor"
|
||||
}
|
||||
TextWidgetClass TextWidget0 {
|
||||
position 0 10
|
||||
@ -172,24 +154,6 @@ FrameWidgetClass rootFrame {
|
||||
text "Teleport (n Key)"
|
||||
checked 0
|
||||
}
|
||||
ButtonWidgetClass btn_Command_Test {
|
||||
position 152.78999 631.31201
|
||||
size 378.93399 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Test Load Conf"
|
||||
}
|
||||
TextWidgetClass Text_Command_Test {
|
||||
position 573.13898 627.05402
|
||||
size 342.647 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Param"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,97 +0,0 @@
|
||||
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 "Config"
|
||||
"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
|
||||
}
|
||||
ButtonWidgetClass btn_Config_Refresh_Admin {
|
||||
position 1100 150
|
||||
size 256.392 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Refresh Admins"
|
||||
text_proportion 0.8
|
||||
}
|
||||
TextWidgetClass TextWidget2 {
|
||||
position 40 90
|
||||
size 167.963 49.9234
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Admins"
|
||||
}
|
||||
ButtonWidgetClass btn_Config_Add_Admin {
|
||||
position 800 150
|
||||
size 256.38998 50
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Add Steam64ID"
|
||||
text_proportion 0.9
|
||||
switch normal
|
||||
}
|
||||
PanelWidgetClass PanelWidget1 {
|
||||
color 0.9333 0 0.0784 1
|
||||
position 0 223.85101
|
||||
size 0.9 3.5
|
||||
halign center_ref
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 0
|
||||
vexactsize 1
|
||||
style rover_sim_colorable
|
||||
}
|
||||
EditBoxWidgetClass Text_Config_Admin_ID {
|
||||
position 40 150
|
||||
size 734.37097 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
style ServerBrowser
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -392,7 +392,7 @@ FrameWidgetClass settings_menu_root {
|
||||
hexactsize 0
|
||||
vexactsize 0
|
||||
priority 250
|
||||
text "Config"
|
||||
text "About"
|
||||
font "gui/fonts/sdf_MetronLight72"
|
||||
"text halign" center
|
||||
"text valign" center
|
||||
@ -657,6 +657,35 @@ FrameWidgetClass settings_menu_root {
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
}
|
||||
TextWidgetClass txt_Main_Ver {
|
||||
clipchildren 0
|
||||
inheritalpha 0
|
||||
ignorepointer 0
|
||||
keepsafezone 0
|
||||
position 45 925
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
scaled 1
|
||||
text "Version : 0.00"
|
||||
"text valign" center
|
||||
}
|
||||
MultilineTextWidgetClass txt_Main_Status {
|
||||
color 0.2314 0.8902 0.3176 1
|
||||
position 303.22601 912.25702
|
||||
size 819.32703 60.2171
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
"text color" 0.2314 0.8902 0.3176 1
|
||||
"exact text" 0
|
||||
"text halign" center
|
||||
"text valign" center
|
||||
wrap 1
|
||||
}
|
||||
}
|
||||
}
|
||||
TextWidgetClass SettingsTextWidget {
|
||||
@ -815,6 +844,7 @@ FrameWidgetClass settings_menu_root {
|
||||
}
|
||||
}
|
||||
WindowWidgetClass WindowWidget0 {
|
||||
color 0.4235 0.0078 0.0078 1
|
||||
position 0 0
|
||||
size 1 1
|
||||
hexactpos 1
|
||||
@ -822,6 +852,7 @@ FrameWidgetClass settings_menu_root {
|
||||
hexactsize 0
|
||||
vexactsize 0
|
||||
style rover_sim_black
|
||||
"title visible" 0
|
||||
}
|
||||
}
|
||||
}
|
@ -41,7 +41,7 @@ FrameWidgetClass rootFrame {
|
||||
vexactsize 1
|
||||
style rover_sim_colorable
|
||||
}
|
||||
MapWidgetClass Map {
|
||||
MapWidgetClass Map_Map_Main {
|
||||
position 0 20
|
||||
size 0.9 580
|
||||
halign center_ref
|
||||
@ -51,6 +51,42 @@ FrameWidgetClass rootFrame {
|
||||
hexactsize 0
|
||||
vexactsize 1
|
||||
}
|
||||
TextWidgetClass Text_Map_Location {
|
||||
position 71.4134 126.686
|
||||
size 573.94202 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
}
|
||||
CheckBoxWidgetClass Config_Map_Teleport {
|
||||
position 725 90
|
||||
size 402.19901 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Teleport on left click"
|
||||
}
|
||||
CheckBoxWidgetClass Config_Map_Horde {
|
||||
position 725 145
|
||||
size 402.19901 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Horde on left click"
|
||||
}
|
||||
EditBoxWidgetClass editbox_Map_HordeCount {
|
||||
position 1176.23999 145
|
||||
size 99.59319 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "50"
|
||||
"Use default text" 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -214,13 +214,24 @@ FrameWidgetClass rootFrame {
|
||||
text "Teleport all here"
|
||||
}
|
||||
CheckBoxWidgetClass Cb_Player_Stamina {
|
||||
position 610 450
|
||||
position 610 500
|
||||
size 350 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Disable Stamina"
|
||||
text "Dissable Stamina"
|
||||
}
|
||||
ButtonWidgetClass btn_Player_Spectate {
|
||||
visible 1
|
||||
clipchildren 1
|
||||
position 610 445
|
||||
size 350 45
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Spectate"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -253,7 +264,7 @@ FrameWidgetClass rootFrame {
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Energy :"
|
||||
text "Health :"
|
||||
"text halign" center
|
||||
"text valign" center
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ FrameWidgetClass rootFrame {
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Reload Locations from File"
|
||||
text "Reload from File"
|
||||
}
|
||||
EditBoxWidgetClass Text_Teleport_Loacation_Name {
|
||||
position 904.15796 680
|
||||
@ -96,7 +96,7 @@ FrameWidgetClass rootFrame {
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
style ServerBrowser
|
||||
text "Location_Name"
|
||||
text "Location Name"
|
||||
}
|
||||
TextWidgetClass TextWidget1 {
|
||||
position 20 100
|
||||
@ -109,6 +109,34 @@ FrameWidgetClass rootFrame {
|
||||
"text halign" center
|
||||
"text valign" center
|
||||
}
|
||||
ButtonWidgetClass btn_Teleport_Teleport0 {
|
||||
visible 0
|
||||
position 450 600
|
||||
size 431.70602 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Remove selected"
|
||||
}
|
||||
ButtonWidgetClass btn_Teleport_Spawn_Horde {
|
||||
position 450 220
|
||||
size 431.70602 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Spawn Horde On Location"
|
||||
}
|
||||
EditBoxWidgetClass editbox_Teleport_HordeCount {
|
||||
position 900 220
|
||||
size 92.16299 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "50"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
18
Dayz-Sa-Tomato/Tomato_Profiles/Config/Config.txt
Normal file
18
Dayz-Sa-Tomato/Tomato_Profiles/Config/Config.txt
Normal file
@ -0,0 +1,18 @@
|
||||
Setup = 1
|
||||
Horde_Message = 1
|
||||
Horde_Message_Location = Horde appeared near {Location}
|
||||
Welcome_Message = 0
|
||||
Welcome_Message_Join = {Player} just joined the Server
|
||||
KillFeed_LogToFile = 0
|
||||
KillFeed_Message_Suicide = 0
|
||||
KillFeed_Suicide = {Killed} took his own life
|
||||
KillFeed_Message_PlayerHand = 0
|
||||
KillFeed_ByPlayerHand = {Killed} murdered by {Killer} with his Hands
|
||||
KillFeed_Message_PlayerWeapon = 0
|
||||
KillFeed_ByPlayerWeapon = {Killed} murdered by {Killer} with Weapon {Weapon} from {Distance}m
|
||||
KillFeed_Message_Zombie = 0
|
||||
KillFeed_Zombie = {Killed} died by a zombie
|
||||
KillFeed_Message_Animal = 0
|
||||
KillFeed_Animal = {Killed} died by a Wild Animal
|
||||
KillFeed_Message_Unkown = 0
|
||||
KillFeed_Unknown = {Killed} died
|
@ -0,0 +1,18 @@
|
||||
Prison Island = 2651.42 0.0 1395.8
|
||||
Mogilevka = 7572.65 0.0 5182.3
|
||||
Stary Sobor = 6192.39 0.0 7666.5
|
||||
Msta = 11206.6 0.0 5398.70
|
||||
Solnichniy = 13436.5 0.0 6158.7
|
||||
Chernogorsk = 6350.99 0.0 2666.12
|
||||
Elektrogorsk = 10432.1 0.0 2218.56
|
||||
Berezino = 12661.4 0.0 9465.03
|
||||
Tisy = 1890.45 0.0 13704.6
|
||||
Gorka = 9678.94 0.0 8828.93
|
||||
Balota = 4546.92 0.0 2416.4
|
||||
Vybor = 3916.85 0.0 8795.59
|
||||
Severograd = 8318.51 0.0 12743.4
|
||||
North West Airfield = 4835.59 0.0 9667.72
|
||||
Green Mountain = 3752.08 0.0 6002.94
|
||||
Zelenogorsk = 2542.18 0.0 4994.26
|
||||
Tisy Military Base = 1599.15 0.0 14166.66
|
||||
Pavlovo Military Base = 2047.82 0.0 3293.36
|
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Admin.txt
Normal file
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Admin.txt
Normal file
@ -0,0 +1 @@
|
||||
|
2
Dayz-Sa-Tomato/Tomato_Profiles/Log/Debug.txt
Normal file
2
Dayz-Sa-Tomato/Tomato_Profiles/Log/Debug.txt
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
[02.01.2019 21:21] - y
|
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Error.txt
Normal file
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Error.txt
Normal file
@ -0,0 +1 @@
|
||||
|
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Info.txt
Normal file
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Info.txt
Normal file
@ -0,0 +1 @@
|
||||
|
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Kills.txt
Normal file
1
Dayz-Sa-Tomato/Tomato_Profiles/Log/Kills.txt
Normal file
@ -0,0 +1 @@
|
||||
|
Binary file not shown.
63
Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp
Normal file
63
Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
class CfgPatches
|
||||
{
|
||||
class DayZSATomato
|
||||
{
|
||||
units[]={};
|
||||
weapons[]={};
|
||||
requiredVersion=0.1;
|
||||
requiredAddons[]=
|
||||
{
|
||||
};
|
||||
};
|
||||
};
|
||||
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"
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,2 @@
|
||||
const int MENU_Admin = 7000;
|
||||
const int MENU_AdminMessage = 7001;
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
enum ConfigType
|
||||
{
|
||||
false, true, next, custom
|
||||
}
|
@ -0,0 +1,289 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class FileConfig
|
||||
{
|
||||
ref array< ref FileConfig > Children;
|
||||
string ConfigName;
|
||||
ConfigType IsConfigType;
|
||||
string ConfigData;
|
||||
ref FileConfig Parent;
|
||||
void FileConfig( string name, ConfigType type = true, string data = "", ref FileConfig parent = NULL )
|
||||
{
|
||||
ConfigName = name;
|
||||
IsConfigType = type;
|
||||
ConfigData = data;
|
||||
Parent = parent;
|
||||
|
||||
IsConfigType = ConfigType.next;
|
||||
if ( Parent == NULL )
|
||||
{
|
||||
IsConfigType = ConfigType.true;
|
||||
}
|
||||
|
||||
Children = new ref array< ref FileConfig >;
|
||||
}
|
||||
|
||||
void WriteToFile()
|
||||
{
|
||||
array<string> ConfigNames = new array<string>;
|
||||
array<string> ConfigTypes = new array<string>;
|
||||
string type;
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
ConfigNames.Insert(Children[i].ConfigName);
|
||||
|
||||
if(Children[i].IsConfigType == ConfigType.true)
|
||||
{
|
||||
type = "1";
|
||||
}else if(Children[i].IsConfigType == ConfigType.custom)
|
||||
{
|
||||
type = Children[i].ConfigData;
|
||||
}else
|
||||
{
|
||||
type = "0";
|
||||
}
|
||||
ConfigTypes.Insert(type);
|
||||
}
|
||||
|
||||
FileHandle file = OpenFile( GetFileHandler().ConfigFile, FileMode.WRITE );
|
||||
|
||||
if ( file != 0 )
|
||||
{
|
||||
|
||||
for ( int t = 0; t < ConfigNames.Count(); t++ )
|
||||
{
|
||||
string WriteData = ConfigNames[t] + " = " + ConfigTypes[t];
|
||||
FPrintln( file, WriteData );
|
||||
}
|
||||
|
||||
CloseFile(file);
|
||||
|
||||
Print("Wrote Config to File" + GetFileHandler().ConfigFile);
|
||||
} else
|
||||
{
|
||||
Print("Could not open File " + GetFileHandler().ConfigFile + " to Write Config to!");
|
||||
}
|
||||
}
|
||||
|
||||
void ~FileConfig()
|
||||
{
|
||||
//delete Children;
|
||||
}
|
||||
|
||||
bool IsConfig( string Configname )
|
||||
{
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( Children[i].ConfigName == Configname && Children[i].IsConfigType == ConfigType.true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
string GetConfigData( string Configname )
|
||||
{
|
||||
string ReturnData = "";
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( Children[i].ConfigName == Configname ) //&& Children[i].IsConfigType == ConfigType.custom
|
||||
{
|
||||
ReturnData = Children[i].ConfigData;
|
||||
return ReturnData;
|
||||
}
|
||||
}
|
||||
return ReturnData;
|
||||
}
|
||||
|
||||
void SetConfigType(ConfigType type)
|
||||
{
|
||||
|
||||
IsConfigType = type;
|
||||
//GetFileHandler().RootConfig.WriteToFile()
|
||||
|
||||
}
|
||||
|
||||
void SetConfigData(string data)
|
||||
{
|
||||
ConfigData = data;
|
||||
//GetFileHandler().RootConfig.WriteToFile()
|
||||
}
|
||||
|
||||
void PrintAll()
|
||||
{
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
Print(" ");
|
||||
Print("Printing Child with number " + i);
|
||||
Print("Name = " + Children[i].ConfigName);
|
||||
Print("ConfigType = " + Children[i].IsConfigType);
|
||||
Print("ConfigData = " + Children[i].ConfigData);
|
||||
Print("Parent = " + Children[i].Parent);
|
||||
Print("End Of Child with Number " + i);
|
||||
Print(" ");
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigInitialize()
|
||||
{
|
||||
array<string> ConfigLine = new array<string>;
|
||||
array<string> ConfigStringCut = new array<string>;
|
||||
FileHandle file = OpenFile( GetFileHandler().ConfigFile, FileMode.READ );
|
||||
if ( file != 0 )
|
||||
{
|
||||
Print("ConfigInitialize - File Found");
|
||||
string line;
|
||||
|
||||
while ( FGets( file, line ) > 0 )
|
||||
{
|
||||
ConfigLine.Insert( line );
|
||||
}
|
||||
|
||||
CloseFile( file );
|
||||
|
||||
if(Children.Count() == ConfigLine.Count() )
|
||||
{
|
||||
for ( int i = 0; i < ConfigLine.Count(); i++ )
|
||||
{
|
||||
ConfigStringCut.Clear();
|
||||
ConfigLine[i].Split( " = ", ConfigStringCut );
|
||||
ConfigType type;
|
||||
string configData = "";
|
||||
if(ConfigLine.Count() == Children.Count())
|
||||
{
|
||||
int len = ConfigStringCut[1].LengthUtf8();
|
||||
len = len - 2;
|
||||
string ConfigTypeCut = ConfigStringCut[1].Substring(2, len);
|
||||
if(ConfigTypeCut == "1")
|
||||
{
|
||||
type = ConfigType.true;
|
||||
}else if(ConfigTypeCut == "0")
|
||||
{
|
||||
type = ConfigType.false;
|
||||
}else
|
||||
{
|
||||
type = ConfigType.custom;
|
||||
configData = ConfigTypeCut;
|
||||
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(ConfigStringCut[1] == "= 1")
|
||||
{
|
||||
type = ConfigType.true;
|
||||
}else if(ConfigStringCut[1] == "= 0")
|
||||
{
|
||||
type = ConfigType.false;
|
||||
}else
|
||||
{
|
||||
type = ConfigType.custom;
|
||||
configData = ConfigTypeCut;
|
||||
}
|
||||
}
|
||||
//Function needet TODO !
|
||||
Children[i].SetConfigType(type);
|
||||
Children[i].SetConfigData(configData);
|
||||
}
|
||||
WriteToFile();
|
||||
}else
|
||||
{
|
||||
Print("Config File has Wrong number of Configs recreateing file !");
|
||||
WriteToFile();
|
||||
}
|
||||
} else
|
||||
{
|
||||
Print( "File. " + GetFileHandler().ConfigFile + " Not found Creating new one");
|
||||
WriteToFile();
|
||||
}
|
||||
}
|
||||
|
||||
// void LoadConfig( string ConfigString, ConfigType ConfigTypefunc = ConfigType.next )
|
||||
// {
|
||||
|
||||
// array<string> ConfigStringCut = new array<string>;
|
||||
// ConfigString.Split( " = ", ConfigStringCut );
|
||||
|
||||
// ConfigType type;
|
||||
// if (ConfigStringCut.Count() == 2 ) // Loaded will be 1
|
||||
// {
|
||||
// if ( ConfigStringCut[1].Contains( "1" ) )
|
||||
// {
|
||||
// type = ConfigType.true;
|
||||
// } else if ( ConfigStringCut[1].Contains( "0" ) )
|
||||
// {
|
||||
// type = ConfigType.false;
|
||||
// } else
|
||||
// {
|
||||
// type = ConfigType.false;
|
||||
// }
|
||||
// } else if ( ConfigStringCut.Count() < 2 ) //New One will Be Count 1 make Type what it should be
|
||||
// {
|
||||
// type = ConfigTypefunc;
|
||||
|
||||
// } else {
|
||||
// Print( "LoadConfig Error Given String : " + ConfigString + " and should be Config = 1 ");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// CheckIfNewConfig(ConfigStringCut[0], type);
|
||||
|
||||
// }
|
||||
void RegisterNewconfig(string name, string stype, string configdata = "")
|
||||
{
|
||||
Print("RegisterNewConfig Data = " + configdata)
|
||||
ConfigType type;
|
||||
if(stype == "true"){type = ConfigType.true;}
|
||||
else if(stype == "false"){type = ConfigType.false;}
|
||||
else{type = ConfigType.custom;}
|
||||
CheckIfNewConfig(name, type, configdata);
|
||||
}
|
||||
|
||||
void CheckIfNewConfig( string name, ConfigType type, string configData = "" )
|
||||
{
|
||||
Print("CheckIfNewConfig Data = " + configData)
|
||||
ref FileConfig nChild = NULL;
|
||||
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( name == Children[i].ConfigName )
|
||||
{
|
||||
nChild = Children[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( nChild == NULL )
|
||||
{
|
||||
nChild = new FileConfig( name, type, configData, this );
|
||||
//nChild.IsConfigType = type;
|
||||
// nChild.ConfigData = configData;
|
||||
Children.Insert( nChild );
|
||||
for ( i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if(Children[i].ConfigName == name)
|
||||
{
|
||||
Children[i].SetConfigType(type);
|
||||
Children[i].SetConfigData(configData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,269 @@
|
||||
/*
|
||||
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,
|
||||
however this File is Execludet from GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007 since it is
|
||||
|
||||
Originally from DayZ-CommunityOnlineTools
|
||||
Link : https://github.com/Jacob-Mango/DayZ-CommunityOnlineTools
|
||||
Created by Jacob-Mango
|
||||
and Published under license (CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/
|
||||
which means this file is under CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/ Licence.
|
||||
*/
|
||||
|
||||
class FPPermission
|
||||
{
|
||||
ref FPPermission Parent;
|
||||
ref array< ref FPPermission > Children;
|
||||
string Name;
|
||||
PermissionType Type;
|
||||
|
||||
|
||||
void FPPermission( string name, ref FPPermission parent = NULL )
|
||||
{
|
||||
Name = name;
|
||||
Parent = parent;
|
||||
|
||||
Type = PermissionType.DISALLOW;
|
||||
|
||||
if ( Parent == NULL )
|
||||
{
|
||||
Type = PermissionType.DISALLOW;
|
||||
}
|
||||
|
||||
Children = new ref array< ref FPPermission >;
|
||||
}
|
||||
|
||||
void SetPermissionType(string name, PermissionType type)
|
||||
{
|
||||
Print("Permission");
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
Print("Name 1 = " + Name + " Name 2 = " + name);
|
||||
if(Children[i].Name == name)
|
||||
{
|
||||
Print("Permission Found Changeing");
|
||||
Children[i].SetPermissionInternal(type)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void SetPermissionInternal(PermissionType type)
|
||||
{
|
||||
Print("Type Set");
|
||||
Type = type;
|
||||
}
|
||||
|
||||
void AddPermission( string inp, PermissionType permType = PermissionType.DISALLOW )
|
||||
{
|
||||
array<string> tokens = new array<string>;
|
||||
|
||||
array<string> spaces = new array<string>;
|
||||
inp.Split( " = ", spaces );
|
||||
|
||||
PermissionType type;
|
||||
for ( int i = 0; i < spaces.Count(); i++ )
|
||||
{Print(spaces[i]);}
|
||||
if (spaces.Count() == 2 )
|
||||
{
|
||||
if ( spaces[1].Contains( "1" ) )
|
||||
{
|
||||
type = PermissionType.ALLOW;
|
||||
} else if ( spaces[1].Contains( "0" ) )
|
||||
{
|
||||
type = PermissionType.DISALLOW;
|
||||
} else
|
||||
{
|
||||
type = PermissionType.DISALLOW;
|
||||
}
|
||||
|
||||
spaces[0].Split( "_", tokens );
|
||||
} else if ( spaces.Count() < 2 )
|
||||
{
|
||||
type = permType;
|
||||
|
||||
inp.Split( "_", tokens );
|
||||
} else {
|
||||
Print( "Warning, permission line improperly formatted! Read as \"" + inp + "\" but meant to be in format \"Perm_Perm {n}\"." );
|
||||
return;
|
||||
}
|
||||
|
||||
int depth = tokens.Find( Name );
|
||||
|
||||
if ( depth > -1 )
|
||||
{
|
||||
AddPermissionInternal( tokens, depth + 1, type );
|
||||
} else
|
||||
{
|
||||
AddPermissionInternal( tokens, 0, type );
|
||||
}
|
||||
}
|
||||
|
||||
private ref FPPermission VerifyAddPermission( string name )
|
||||
{
|
||||
ref FPPermission nChild = NULL;
|
||||
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( name == Children[i].Name )
|
||||
{
|
||||
nChild = Children[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( nChild == NULL )
|
||||
{
|
||||
nChild = new FPPermission( name, this );
|
||||
nChild.Type = PermissionType.DISALLOW;
|
||||
|
||||
Children.Insert( nChild );
|
||||
}
|
||||
|
||||
return nChild;
|
||||
}
|
||||
|
||||
void ToPermArray( ref array< string > output, string prepend = "" )
|
||||
{
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
string serialize = prepend + Children[i].Name;
|
||||
//TODO " = "
|
||||
output.Insert( serialize + " = " + Children[i].Type );
|
||||
|
||||
if ( Children[i].Children.Count() > 0 )
|
||||
{
|
||||
Children[i].ToPermArray( output, serialize + "_" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool HasPermission( string inp )
|
||||
{
|
||||
array<string> tokens = new array<string>;
|
||||
inp.Split( "_", tokens );
|
||||
|
||||
if ( tokens.Count() == 0 ) return false;
|
||||
|
||||
int depth = tokens.Find(Name);
|
||||
|
||||
bool parentDisallowed = false;
|
||||
|
||||
if ( Type == PermissionType.DISALLOW )
|
||||
{
|
||||
parentDisallowed = true;
|
||||
}
|
||||
|
||||
if ( depth > -1 )
|
||||
{
|
||||
return Check( tokens, depth + 1, parentDisallowed );
|
||||
} else
|
||||
{
|
||||
return Check( tokens, 0, parentDisallowed );
|
||||
}
|
||||
}
|
||||
|
||||
bool Check( array<string> tokens, int depth, bool parentDisallowed )
|
||||
{
|
||||
bool ifReturnAs = false;
|
||||
|
||||
if ( Type == PermissionType.ALLOW )
|
||||
{
|
||||
ifReturnAs = true;
|
||||
}
|
||||
|
||||
if ( Type == PermissionType.DISALLOW )
|
||||
{
|
||||
parentDisallowed = true;
|
||||
}
|
||||
|
||||
if ( Type == PermissionType.ALLOW )
|
||||
{
|
||||
parentDisallowed = false;
|
||||
}
|
||||
|
||||
if ( depth < tokens.Count() )
|
||||
{
|
||||
ref FPPermission nChild = NULL;
|
||||
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( Children[i].Name == tokens[depth] )
|
||||
{
|
||||
nChild = Children[i];
|
||||
}
|
||||
}
|
||||
|
||||
if ( nChild )
|
||||
{
|
||||
return nChild.Check( tokens, depth + 1, parentDisallowed );
|
||||
}
|
||||
}
|
||||
|
||||
return ifReturnAs;
|
||||
}
|
||||
|
||||
private ref FPPermission Get( array<string> tokens, int depth )
|
||||
{
|
||||
if ( depth < tokens.Count() )
|
||||
{
|
||||
ref FPPermission nChild = NULL;
|
||||
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( Children[i].Name == tokens[depth] )
|
||||
{
|
||||
nChild = Children[i];
|
||||
}
|
||||
}
|
||||
|
||||
if ( nChild )
|
||||
{
|
||||
return nChild.Get( tokens, depth + 1 );
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
ref FPPermission GetPermission( string inp )
|
||||
{
|
||||
array<string> tokens = new array<string>;
|
||||
inp.Split( "_", tokens );
|
||||
|
||||
int depth = tokens.Find(Name);
|
||||
|
||||
if ( depth > -1 )
|
||||
{
|
||||
return Get( tokens, depth + 1 );
|
||||
} else
|
||||
{
|
||||
return Get( tokens, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
private void AddPermissionInternal( array<string> tokens, int depth, PermissionType value )
|
||||
{
|
||||
if ( depth < tokens.Count() )
|
||||
{
|
||||
string name = tokens[depth];
|
||||
|
||||
ref FPPermission nChild = VerifyAddPermission( name );
|
||||
|
||||
nChild.AddPermissionInternal( tokens, depth + 1, value );
|
||||
} else {
|
||||
Type = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ~FPPermission()
|
||||
{
|
||||
delete Children;
|
||||
}
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
/*
|
||||
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,
|
||||
however this File is Execludet from GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007 since it is
|
||||
|
||||
Originally from DayZ-CommunityOnlineTools
|
||||
Link : https://github.com/Jacob-Mango/DayZ-CommunityOnlineTools
|
||||
Created by Jacob-Mango
|
||||
and Published under license (CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/
|
||||
which means this file is under CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/ Licence.
|
||||
*/
|
||||
|
||||
class FPPlayer
|
||||
{
|
||||
ref FPPermission RootPermission;
|
||||
|
||||
PlayerBase PlayerObject;
|
||||
PlayerIdentity IdentityPlayer;
|
||||
ref PlayerDataN Data;
|
||||
|
||||
void FPPlayer(ref PlayerDataN data)
|
||||
{
|
||||
PlayerObject = NULL;
|
||||
Data = data;
|
||||
|
||||
if ( Data == NULL )
|
||||
{
|
||||
Data = new ref PlayerDataN;
|
||||
}
|
||||
|
||||
RootPermission = new ref FPPermission( Data.SSteam64ID );
|
||||
|
||||
}
|
||||
|
||||
void SetPermission(string name, PermissionType type)
|
||||
{
|
||||
Print("FPPlayer");
|
||||
RootPermission.SetPermissionType(name , type)
|
||||
}
|
||||
|
||||
string FileReadyStripName( string name )
|
||||
{
|
||||
name.Replace( "\\", "" );
|
||||
name.Replace( "/", "" );
|
||||
name.Replace( "=", "" );
|
||||
name.Replace( "+", "" );
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
string filename = FileReadyStripName( Data.SSteam64ID );
|
||||
Print( "Loading permissions for " + filename );
|
||||
FileHandle file = OpenFile( GetFileHandler().PlayersFolderPath + filename + ".Player", FileMode.READ );
|
||||
|
||||
ref array< string > data = new ref array< string >;
|
||||
|
||||
if ( file != 0 )
|
||||
{
|
||||
string line;
|
||||
|
||||
while ( FGets( file, line ) > 0 )
|
||||
{
|
||||
data.Insert( line );
|
||||
}
|
||||
|
||||
CloseFile( file );
|
||||
|
||||
for ( int i = 0; i < data.Count(); i++ )
|
||||
{
|
||||
AddPermission( data[i] );
|
||||
}
|
||||
} else
|
||||
{
|
||||
Print( "Failed to open the file for the player to read. Attemping to create." );
|
||||
|
||||
Save();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Save()
|
||||
{
|
||||
string filename = FileReadyStripName( Data.SSteam64ID );
|
||||
|
||||
Print( "Saving permissions for " + filename );
|
||||
FileHandle file = OpenFile( GetFileHandler().PlayersFolderPath + filename + ".Player", FileMode.WRITE );
|
||||
//TODO ??
|
||||
ref array< string > data = ToPermArray();
|
||||
|
||||
if ( file != 0 )
|
||||
{
|
||||
string line;
|
||||
|
||||
for ( int i = 0; i < data.Count(); i++ )
|
||||
{
|
||||
FPrintln( file, data[i] );
|
||||
}
|
||||
|
||||
CloseFile(file);
|
||||
|
||||
Print("Wrote to the players");
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
Print("Failed to open the file for the player for writing.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void CopyPermissions( ref FPPermission copy )
|
||||
{
|
||||
ref array< string > data = new ref array< string >;
|
||||
copy.ToPermArray( data );
|
||||
|
||||
for ( int i = 0; i < data.Count(); i++ )
|
||||
{
|
||||
AddPermission( data[i] );
|
||||
}
|
||||
}
|
||||
|
||||
ref array< string > ToPermArray()
|
||||
{
|
||||
Data.APermissions.Clear();
|
||||
|
||||
RootPermission.ToPermArray( Data.APermissions );
|
||||
|
||||
return Data.APermissions;
|
||||
}
|
||||
|
||||
void ToPermData()
|
||||
{
|
||||
for ( int i = 0; i < Data.APermissions.Count(); i++ )
|
||||
{
|
||||
AddPermission( Data.APermissions[i] );
|
||||
}
|
||||
}
|
||||
|
||||
bool HasPermission( string fPPermission )
|
||||
{
|
||||
return RootPermission.HasPermission( fPPermission );
|
||||
}
|
||||
|
||||
void AddPermission( string fPPermission, PermissionType type = PermissionType.DISALLOW )
|
||||
{
|
||||
RootPermission.AddPermission( fPPermission, type);
|
||||
}
|
||||
|
||||
void ClearPermissions()
|
||||
{
|
||||
delete RootPermission;
|
||||
|
||||
RootPermission = new ref FPPermission( Data.SSteam64ID, NULL );
|
||||
}
|
||||
|
||||
void UpdatePlayerDataN()
|
||||
{
|
||||
if ( IdentityPlayer == NULL ) return;
|
||||
|
||||
Data.IPingMin = IdentityPlayer.GetPingMin();
|
||||
Data.IPingMax = IdentityPlayer.GetPingMax();
|
||||
Data.IPingAvg = IdentityPlayer.GetPingAvg();
|
||||
|
||||
Data.SSteam64ID = IdentityPlayer.GetPlainId();
|
||||
Data.SGUID = IdentityPlayer.GetId();
|
||||
Data.SName = IdentityPlayer.GetName();
|
||||
|
||||
if ( PlayerObject == NULL ) return;
|
||||
|
||||
PlayerDataN.Load( Data, PlayerObject );
|
||||
}
|
||||
|
||||
void NewData( ref PlayerDataN newData )
|
||||
{
|
||||
Data = newData;
|
||||
}
|
||||
|
||||
void ~FPPlayer()
|
||||
{
|
||||
delete RootPermission;
|
||||
}
|
||||
|
||||
string GetGUID()
|
||||
{
|
||||
return Data.SGUID;
|
||||
}
|
||||
|
||||
string GetSteam64ID()
|
||||
{
|
||||
return Data.SSteam64ID;
|
||||
}
|
||||
|
||||
string GetName()
|
||||
{
|
||||
return Data.SName;
|
||||
}
|
||||
|
||||
}
|
@ -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,
|
||||
however this File is Execludet from GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007 since it is
|
||||
|
||||
Originally from DayZ-CommunityOnlineTools
|
||||
Link : https://github.com/Jacob-Mango/DayZ-CommunityOnlineTools
|
||||
Created by Jacob-Mango
|
||||
and Published under license (CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/
|
||||
which means this file is under CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/ Licence.
|
||||
*/
|
||||
static ref FPPlayer ClientAuthPlayer;
|
||||
|
||||
static ref array< ref FPPlayer > SELECTED_PLAYERS;
|
||||
|
||||
ref array< ref FPPlayer > GetSelectedPlayers()
|
||||
{
|
||||
if ( SELECTED_PLAYERS == NULL )
|
||||
{
|
||||
SELECTED_PLAYERS = new ref array< ref FPPlayer >;
|
||||
}
|
||||
return SELECTED_PLAYERS;
|
||||
}
|
||||
|
||||
bool PlayerAlreadySelected( ref FPPlayer player )
|
||||
{
|
||||
int position = GetSelectedPlayers().Find( player );
|
||||
|
||||
return position > -1;
|
||||
}
|
||||
|
||||
int RemoveSelectedPlayer( ref FPPlayer player )
|
||||
{
|
||||
int position = GetSelectedPlayers().Find( player );
|
||||
|
||||
if ( position > -1 )
|
||||
{
|
||||
GetSelectedPlayers().Remove( position );
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
int AddSelectedPlayer( ref FPPlayer player )
|
||||
{
|
||||
int position = GetSelectedPlayers().Find( player );
|
||||
|
||||
if ( position > -1 )
|
||||
return position;
|
||||
|
||||
return GetSelectedPlayers().Insert( player );
|
||||
}
|
||||
|
||||
ref PlayerDataN SerializePlayer( ref FPPlayer player )
|
||||
{
|
||||
player.ToPermArray();
|
||||
|
||||
return player.Data;
|
||||
}
|
||||
|
||||
ref FPPlayer DeserializePlayer( ref PlayerDataN data )
|
||||
{
|
||||
return GetFileHandler().GetPlayer( data );
|
||||
}
|
||||
|
||||
array< ref PlayerDataN > SerializePlayers( ref array< ref FPPlayer > players )
|
||||
{
|
||||
array< ref PlayerDataN > output = new array< ref PlayerDataN >;
|
||||
|
||||
for ( int i = 0; i < players.Count(); i++)
|
||||
{
|
||||
output.Insert( SerializePlayer( players[i] ) );
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
array< ref FPPlayer > DeserializePlayers( ref array< ref PlayerDataN > players )
|
||||
{
|
||||
array< ref FPPlayer > output = new array< ref FPPlayer >;
|
||||
|
||||
for ( int i = 0; i < players.Count(); i++)
|
||||
{
|
||||
output.Insert( DeserializePlayer( players[i] ) );
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
ref array< string > SerializePlayersGUID( array< ref FPPlayer > players )
|
||||
{
|
||||
ref array< string > output = new ref array< string >;
|
||||
|
||||
for ( int i = 0; i < players.Count(); i++)
|
||||
{
|
||||
output.Insert( players[i].GetGUID() );
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
array< ref FPPlayer > DeserializePlayersGUID( ref array< string > guids )
|
||||
{
|
||||
return GetFileHandler().GetPlayers( guids );
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
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,
|
||||
however this File is Execludet from GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007 since it is
|
||||
|
||||
Originally from DayZ-CommunityOnlineTools
|
||||
Link : https://github.com/Jacob-Mango/DayZ-CommunityOnlineTools
|
||||
Created by Jacob-Mango
|
||||
and Published under license (CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/
|
||||
which means this file is under CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/ Licence.
|
||||
*/
|
||||
|
||||
enum PermissionType
|
||||
{
|
||||
DISALLOW, ALLOW
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
/*
|
||||
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,
|
||||
however this File is Execludet from GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007 since it is
|
||||
|
||||
Originally from DayZ-CommunityOnlineTools
|
||||
Link : https://github.com/Jacob-Mango/DayZ-CommunityOnlineTools
|
||||
Created by Jacob-Mango
|
||||
and Published under license (CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/
|
||||
which means this file is under CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/ Licence.
|
||||
*/
|
||||
|
||||
// STORE ALL PLAYERS DATA HERE FOR OUTSIDE NETWORK BUBBLE!
|
||||
|
||||
class PlayerDataN
|
||||
{
|
||||
string SName;
|
||||
string SGUID;
|
||||
string SSteam64ID;
|
||||
|
||||
int IPingMax;
|
||||
int IPingMin;
|
||||
int IPingAvg;
|
||||
|
||||
ref array< string > ARoles;
|
||||
ref array< string > APermissions;
|
||||
|
||||
vector VPosition;
|
||||
vector VDirection;
|
||||
vector VOrientation;
|
||||
|
||||
float FHealth;
|
||||
float FBlood;
|
||||
float FShock;
|
||||
|
||||
int IBloodStatType;
|
||||
|
||||
float FEnergy;
|
||||
float FWater;
|
||||
|
||||
float FHeatComfort;
|
||||
|
||||
float FWet;
|
||||
float FTremor;
|
||||
float FStamina;
|
||||
|
||||
int Kills;
|
||||
int TotalKills;
|
||||
|
||||
int ILifeSpanState;
|
||||
bool BBloodyHands;
|
||||
|
||||
void PlayerDataN()
|
||||
{
|
||||
ARoles = new ref array< string >;
|
||||
APermissions = new ref array< string >;
|
||||
}
|
||||
|
||||
static void Load( out PlayerDataN data, ref PlayerBase player )
|
||||
{
|
||||
data.VPosition = player.GetPosition();
|
||||
data.VDirection = player.GetDirection();
|
||||
data.VOrientation = player.GetOrientation();
|
||||
|
||||
data.FHealth = player.GetHealth( "GlobalHealth","Health" );
|
||||
data.FBlood = player.GetHealth( "GlobalHealth", "Blood" );
|
||||
data.FShock = player.GetHealth( "GlobalHealth", "Shock" );
|
||||
data.IBloodStatType = player.GetStatBloodType().Get();
|
||||
data.FEnergy = player.GetStatEnergy().Get();
|
||||
data.FWater = player.GetStatWater().Get();
|
||||
data.FHeatComfort = player.GetStatHeatComfort().Get();
|
||||
data.FWet = player.GetStatWet().Get();
|
||||
data.FTremor = player.GetStatTremor().Get();
|
||||
data.FStamina = player.GetStatStamina().Get();
|
||||
data.ILifeSpanState = player.GetLifeSpanState();
|
||||
data.BBloodyHands = player.HasBloodyHands();
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class FileTeleport
|
||||
{
|
||||
ref array< ref FileTeleport > Children;
|
||||
string LocationName;
|
||||
vector LocationPos;
|
||||
bool ok = false;
|
||||
ref FileTeleport Parent;
|
||||
void FileTeleport( string name, ref FileTeleport parent = NULL, vector pos = Vector.Zero())
|
||||
{
|
||||
if(parent == NULL)
|
||||
{
|
||||
ok = true;
|
||||
}
|
||||
LocationName = name;
|
||||
LocationPos = pos;
|
||||
Parent = parent;
|
||||
//Print("Teleport Location = " + LocationName + " LocationPos = " + LocationPos);
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
Children = new ref array< ref FileTeleport >;
|
||||
}
|
||||
|
||||
void AddNewLocation(string PosName, vector AdminPos)
|
||||
{
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( PosName == Children[i].LocationName )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
//PosName = stringParam.param1;
|
||||
|
||||
vector PosOut;
|
||||
PosOut = Vector(AdminPos[0], 0.0, AdminPos[2]);
|
||||
string stringout = PosOut.ToString(false);
|
||||
AddToFile(PosName, stringout);
|
||||
Load();
|
||||
|
||||
}
|
||||
|
||||
void AddToFile(string name, string pos)
|
||||
{
|
||||
FileHandle file = OpenFile( GetFileHandler().TeleportFile, FileMode.APPEND );
|
||||
if ( file != 0 )
|
||||
{
|
||||
FPrintln(file, name + " = " + pos);
|
||||
}
|
||||
CloseFile(file);
|
||||
}
|
||||
|
||||
void AddChilds(string name, vector pos)
|
||||
{
|
||||
ref FileTeleport nChild = NULL;
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( name == Children[i].LocationName )
|
||||
{
|
||||
nChild = Children[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( nChild == NULL )
|
||||
{
|
||||
nChild = new FileTeleport( name, this, pos);
|
||||
|
||||
Children.Insert( nChild );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Load()
|
||||
{
|
||||
Children.Clear();
|
||||
FileHandle file = OpenFile( GetFileHandler().TeleportFile, FileMode.READ );
|
||||
if ( file != 0 )
|
||||
{
|
||||
string line, LocationNameNew;
|
||||
vector LocationPosNew;
|
||||
array<string> TeleportLine = new array<string>;
|
||||
array<string> TeleportLineCut = new array<string>;
|
||||
array<string> TeleportPositions = new array<string>;
|
||||
float X, Y;
|
||||
while ( FGets( file, line ) > 0 )
|
||||
{
|
||||
TeleportLineCut.Clear();
|
||||
TeleportPositions.Clear();
|
||||
line.Split(" = ", TeleportLineCut);
|
||||
int len = TeleportLineCut[1].LengthUtf8();
|
||||
len = len - 2;
|
||||
string LocationPosPreNew = TeleportLineCut[1].Substring(2, len);
|
||||
LocationPosPreNew.Split(" ", TeleportPositions);
|
||||
X = TeleportPositions[0].ToFloat();
|
||||
Y = TeleportPositions[2].ToFloat();
|
||||
|
||||
LocationPosNew = Vector(X, 0.0, Y);
|
||||
LocationNameNew = TeleportLineCut[0];
|
||||
|
||||
NewTeleport(LocationNameNew, LocationPosNew);
|
||||
|
||||
}
|
||||
CloseFile(file);
|
||||
}
|
||||
}
|
||||
|
||||
void NewTeleport(string name, vector loc)
|
||||
{
|
||||
ref FileTeleport nChild = NULL;
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( name == Children[i].LocationName )
|
||||
{
|
||||
nChild = Children[i];
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if ( nChild == NULL )
|
||||
{
|
||||
nChild = new FileTeleport( name, this, loc);
|
||||
Children.Insert( nChild );
|
||||
}
|
||||
}
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
if(ok)
|
||||
{
|
||||
int ListCount = 0;
|
||||
PlayerBase Admin;
|
||||
//PlayerIdentity AdminIdentity;
|
||||
|
||||
switch(rpc_type)
|
||||
{
|
||||
case M_RPCs.M_Admin_Menu_Teleport_Write:
|
||||
//Param1<string> stringParam;
|
||||
string PosName;
|
||||
vector AdminPos;
|
||||
ctx.Read(PosName);
|
||||
ctx.Read(AdminPos);
|
||||
Print("");
|
||||
Print("Adding Pos");
|
||||
Print(PosName);
|
||||
Print(AdminPos);
|
||||
for ( int i = 0; i < Children.Count(); i++ )
|
||||
{
|
||||
if ( PosName == Children[i].LocationName )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
//PosName = stringParam.param1;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
vector PosOut;
|
||||
PosOut = Vector(AdminPos[0], 0.0, AdminPos[2]);
|
||||
string stringout = PosOut.ToString(false);
|
||||
AddToFile(PosName, stringout);
|
||||
Load();
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class TeleportData
|
||||
{
|
||||
ref array <ref TeleportData> Locations
|
||||
string LocationName;
|
||||
vector LocationPos;
|
||||
ref FileTeleport Parent;
|
||||
|
||||
void TeleportData(ref FileTeleport parent = NULL)
|
||||
{
|
||||
Print("TeleportData");
|
||||
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
Parent = parent
|
||||
}
|
||||
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
PlayerBase Admin;
|
||||
switch(rpc_type)
|
||||
{
|
||||
// case M_RPCs.M_Admin_Menu_Teleport_RequestData:
|
||||
// GetFileHandler().LoadTeleport();
|
||||
// if ( GetGame().IsServer() )
|
||||
// {
|
||||
// ref array< string > LocationNT = new ref array< string >;
|
||||
// ref array< vector > LocationP = new ref array< vector >;
|
||||
// PlayerIdentity AdminIdentity;
|
||||
// Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId());
|
||||
// if ( Admin != NULL)
|
||||
// {
|
||||
// AdminIdentity = Admin.GetIdentity();
|
||||
// for ( int t = 0; t < GetFileHandler().RootTeleport.Children.Count(); t++ )
|
||||
// {
|
||||
////string name = GetFileHandler().RootTeleport.Children[t].LocationName;
|
||||
// vector pos = GetFileHandler().RootTeleport.Children[t].LocationPos;
|
||||
// string name = GetFileHandler().RootTeleport.Children[t].LocationName;
|
||||
|
||||
// LocationNT.Insert(name);
|
||||
|
||||
// LocationP.Insert(pos);
|
||||
|
||||
// }
|
||||
// Print("Server - Teleport Data Rpc Sent");
|
||||
// ScriptRPC TListDst = new ScriptRPC();
|
||||
// TListDst.Write(LocationNT);
|
||||
// TListDst.Write(LocationP);
|
||||
// TListDst.Send(NULL, M_RPCs.M_Admin_Menu_Teleport_ReciveData, false, AdminIdentity);
|
||||
// }
|
||||
// }
|
||||
|
||||
// if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
// {
|
||||
|
||||
// }
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
ref TeleportData Tomato_TeleportData;
|
||||
|
||||
ref TeleportData GetTeleportData()
|
||||
{
|
||||
if( !Tomato_TeleportData )
|
||||
{
|
||||
Tomato_TeleportData = new ref TeleportData();
|
||||
}
|
||||
|
||||
return Tomato_TeleportData;
|
||||
}
|
@ -0,0 +1,296 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class DeathHandler
|
||||
{
|
||||
string KillFile = "$profile:\\Dayz-Sa-Tomato\\Log\\Kills.txt";
|
||||
|
||||
PlayerBase KPlayerBase;
|
||||
PlayerIdentity KPlayerIdentity;
|
||||
string KName;
|
||||
vector KPos;
|
||||
int Dist;
|
||||
EntityAI KW;
|
||||
ItemBase KWItemBase;
|
||||
string KWName;
|
||||
|
||||
|
||||
PlayerBase VPlayerBase;
|
||||
PlayerIdentity VPlayerIdentity;
|
||||
string VName;
|
||||
vector VPos;
|
||||
|
||||
string OutMessage;
|
||||
|
||||
void DeathHandler()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void log(string log)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(FileExist(KillFile))
|
||||
{
|
||||
FileHandle file = OpenFile(KillFile, FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
}else
|
||||
{
|
||||
MakeDirectory(KillFile);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
Print("Could not create Folder/File " + KillFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string LineIn()
|
||||
{
|
||||
int year, month, day, hour, minute, second;
|
||||
GetYearMonthDay(year, month, day);
|
||||
GetHourMinuteSecond(hour, minute, second);
|
||||
string date = day.ToStringLen(2) + "." + month.ToStringLen(2) + "." + year.ToStringLen(4) + " " + hour.ToStringLen(2) + ":" + minute.ToStringLen(2);
|
||||
string LineIn = "[" + date + "] - ";
|
||||
return LineIn;
|
||||
}
|
||||
void ConnectHandler(PlayerIdentity player)
|
||||
{
|
||||
string msg;
|
||||
if (GetFileHandler().IsConfig("Welcome_Message"))
|
||||
{
|
||||
msg = GetMessage(GetFileHandler().GetConfig("Welcome_Message_Join"), VName);
|
||||
int count = msg.Replace("{Player}", player.GetName());
|
||||
GetGame().ChatPlayer(0, msg);
|
||||
}
|
||||
}
|
||||
void KilledHandler(Object killer, PlayerBase pbKilled)
|
||||
{
|
||||
KPlayerBase = NULL;
|
||||
// Victim
|
||||
VPlayerBase = PlayerBase.Cast(pbKilled);
|
||||
VPlayerIdentity = VPlayerBase.GetIdentity();
|
||||
VName = VPlayerIdentity.GetName();
|
||||
|
||||
OutMessage = "";
|
||||
|
||||
IsMan(killer);
|
||||
SelectKillType();
|
||||
IsAnimal(killer);
|
||||
Send();
|
||||
|
||||
}
|
||||
|
||||
void Send()
|
||||
{
|
||||
if (OutMessage != "")
|
||||
{
|
||||
GetGame().ChatPlayer(0, OutMessage);
|
||||
}
|
||||
}
|
||||
|
||||
void IsAnimal(Object killer)
|
||||
{
|
||||
if (killer.IsKindOf("AnimalBase"))
|
||||
{
|
||||
if (GetFileHandler().IsConfig("KillFeed_Message_Animal"))
|
||||
{
|
||||
OutMessage = GetMessage(GetFileHandler().GetConfig("KillFeed_Animal"), VName);
|
||||
}
|
||||
}
|
||||
else if (killer.IsKindOf("ZombieBase"))
|
||||
{
|
||||
if (GetFileHandler().IsConfig("KillFeed_Message_Zombie")) //TODO
|
||||
{
|
||||
OutMessage = GetMessage(GetFileHandler().GetConfig("KillFeed_Zombie"), VName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetFileHandler().IsConfig("KillFeed_Message_Unknown"))
|
||||
{
|
||||
OutMessage = GetMessage(GetFileHandler().GetConfig("KillFeed_Unknown"), VName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SelectKillType()
|
||||
{
|
||||
if (KPlayerBase)
|
||||
{
|
||||
if (VPlayerBase == KPlayerBase)
|
||||
{
|
||||
if (GetFileHandler().IsConfig("KillFeed_Message_Suicide"))
|
||||
{
|
||||
OutMessage = GetMessage(GetFileHandler().GetConfig("KillFeed_Suicide"), VName);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KPlayerIdentity = NULL;
|
||||
KPlayerIdentity = KPlayerBase.GetIdentity();
|
||||
KName = KPlayerIdentity.GetName();
|
||||
KPos = KPlayerBase.GetPosition();
|
||||
VPos = VPlayerBase.GetPosition();
|
||||
Dist = vector.Distance(VPos, KPos);
|
||||
KW = KPlayerBase.GetHumanInventory().GetEntityInHands();
|
||||
|
||||
if (KW.IsItemBase())
|
||||
{
|
||||
KWItemBase = ItemBase.Cast(KW);
|
||||
KWName = KWItemBase.GetDisplayName();
|
||||
|
||||
if (KPlayerBase.GetDisplayName() == KWName)
|
||||
{
|
||||
if(GetFileHandler().IsConfig("KillFeed_LogToFile"))
|
||||
{
|
||||
string Lmessage = GetMessage(GetFileHandler().GetConfig("KillFeed_ByPlayerHand"), VName, KName)
|
||||
log(Lmessage);
|
||||
}
|
||||
|
||||
if (GetFileHandler().IsConfig("KillFeed_Message_PlayerHand"))
|
||||
{
|
||||
OutMessage = GetMessage(GetFileHandler().GetConfig("KillFeed_ByPlayerHand"), VName, KName);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(GetFileHandler().IsConfig("KillFeed_LogToFile"))
|
||||
{
|
||||
Lmessage = GetMessage(GetFileHandler().GetConfig("KillFeed_ByPlayerWeapon"), VName, KName, KWName, Dist.ToString())
|
||||
log(Lmessage);
|
||||
}
|
||||
|
||||
if (GetFileHandler().IsConfig("KillFeed_Message_PlayerWeapon")
|
||||
{
|
||||
OutMessage = GetMessage(GetFileHandler().GetConfig("KillFeed_ByPlayerWeapon"), VName, KName, KWName, Dist.ToString());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IsMan(Object killer)
|
||||
{
|
||||
if (killer.IsMan())
|
||||
{
|
||||
if (killer.IsKindOf("SurvivorBase"))
|
||||
{
|
||||
KPlayerBase = PlayerBase.Cast(killer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (killer.IsItemBase())
|
||||
{
|
||||
KWItemBase = ItemBase.Cast(killer);
|
||||
KPlayerBase = PlayerBase.Cast(KWItemBase.GetHierarchyRootPlayer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KilledHandlerOld(Object killer, PlayerBase pbKilled)
|
||||
{
|
||||
string Killername;
|
||||
string Killedname;
|
||||
SurvivorBase sbKilled = SurvivorBase.Cast(pbKilled);
|
||||
if (killer.IsMan()) {
|
||||
|
||||
Man manKiller = Man.Cast(killer);
|
||||
|
||||
if (sbKilled.GetPFullName() == manKiller.GetIdentity().GetName()) {
|
||||
|
||||
string KilledBySuicide = GetFileHandler().GetConfig("KillFeed_Suicide");
|
||||
Killedname = sbKilled.GetPFullName();
|
||||
GetGame().ChatPlayer( 0, GetMessage(KilledBySuicide, Killedname));
|
||||
// TL.all(GetMessage(KilledBySuicide, Killedname));
|
||||
// TL.all(sbKilled.GetPFullName() + " took his own life");
|
||||
|
||||
} else
|
||||
{
|
||||
SurvivorBase sbKiller = SurvivorBase.Cast(killer);
|
||||
string KilledByPlayer = GetFileHandler().GetConfig("KillFeed_ByPlayer");
|
||||
Killername = sbKiller.GetPFullName();
|
||||
Killedname = sbKilled.GetPFullName();
|
||||
GetGame().ChatPlayer( 0, GetMessage(KilledByPlayer, Killedname , Killername));
|
||||
// TL.all(GetMessage(KilledByPlayer, Killedname, Killername));
|
||||
}
|
||||
} else
|
||||
{
|
||||
string KilledByBleed = GetFileHandler().GetConfig("KillFeed_Bleeding_Zombie");
|
||||
Killedname = sbKilled.GetPFullName();
|
||||
GetGame().ChatPlayer( 0, GetMessage(KilledByBleed, Killedname));
|
||||
// TL.all(GetMessage(KilledByBleed, Killedname));
|
||||
}
|
||||
}
|
||||
|
||||
string GetMessage(string input, string killed, string killer = "" , string weap = "", string dist = "")
|
||||
{
|
||||
int count = input.Replace("{Killed}", killed);
|
||||
if(killer != "")
|
||||
{
|
||||
count = input.Replace("{Killer}", killer);
|
||||
}
|
||||
|
||||
if(weap != "")
|
||||
{
|
||||
count = input.Replace("{Weapon}", weap);
|
||||
}
|
||||
|
||||
if(dist != "")
|
||||
{
|
||||
count = input.Replace("{Distance}", dist);
|
||||
}
|
||||
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ref DeathHandler Tomato_DeathHandler;
|
||||
|
||||
// ref DeathHandler GetDeathHandler()
|
||||
// {
|
||||
// if( !Tomato_DeathHandler )
|
||||
// {
|
||||
// Tomato_DeathHandler = new ref DeathHandler();
|
||||
// }
|
||||
|
||||
// return Tomato_DeathHandler;
|
||||
// }
|
@ -0,0 +1,435 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class LogHandler
|
||||
{
|
||||
string LogFolderPath = GetFileHandler().LogFolderPath;
|
||||
|
||||
|
||||
string LineIn()
|
||||
{
|
||||
int year, month, day, hour, minute, second;
|
||||
GetYearMonthDay(year, month, day);
|
||||
GetHourMinuteSecond(hour, minute, second);
|
||||
string date = day.ToStringLen(2) + "." + month.ToStringLen(2) + "." + year.ToStringLen(4) + " " + hour.ToStringLen(2) + ":" + minute.ToStringLen(2);
|
||||
string LineIn = "[" + date + "] - ";
|
||||
return LineIn;
|
||||
}
|
||||
|
||||
|
||||
void LogHandler()
|
||||
{
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
}
|
||||
|
||||
ref PlayerBase GetPlayerBaseByName(string name)
|
||||
{
|
||||
|
||||
array<Man> players = new array<Man>;
|
||||
|
||||
PlayerBase selectedPlayer;
|
||||
PlayerIdentity selectedIdentity;
|
||||
|
||||
GetGame().GetPlayers( players );
|
||||
for ( int a = 0; a < players.Count(); ++a )
|
||||
{
|
||||
selectedPlayer = PlayerBase.Cast(players.Get(a));
|
||||
selectedIdentity = selectedPlayer.GetIdentity();
|
||||
if ( selectedIdentity.GetName() == name )
|
||||
{
|
||||
return selectedPlayer;
|
||||
}
|
||||
}
|
||||
return selectedPlayer;
|
||||
}
|
||||
|
||||
ref PlayerIdentity GetIdent(string name)
|
||||
{
|
||||
|
||||
array<Man> players = new array<Man>;
|
||||
|
||||
PlayerBase selectedPlayer;
|
||||
PlayerIdentity selectedIdentity;
|
||||
|
||||
GetGame().GetPlayers( players );
|
||||
for ( int a = 0; a < players.Count(); ++a )
|
||||
{
|
||||
selectedPlayer = PlayerBase.Cast(players.Get(a));
|
||||
selectedIdentity = selectedPlayer.GetIdentity();
|
||||
if ( selectedIdentity.GetName() == name )
|
||||
{
|
||||
return selectedIdentity;
|
||||
}
|
||||
}
|
||||
return selectedIdentity;
|
||||
}
|
||||
|
||||
void status(PlayerIdentity ident, string msg)
|
||||
{
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_MessageStatus, new Param1<string>( msg ), false, ident );
|
||||
}
|
||||
|
||||
void playern(PlayerIdentity ident, string msg)
|
||||
{
|
||||
Param1<string> Msgparam = new Param1<string>( msg );
|
||||
GetGame().RPCSingleParam(NULL , ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, ident);
|
||||
}
|
||||
|
||||
void player(PlayerIdentity ident, string msg)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
GetGame().RPCSingleParam(NULL, M_RPCs.M_Admin_Message, new Param1<string>(msg), true, ident);
|
||||
}else{
|
||||
GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", msg, ""));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void playerSetup()
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
|
||||
}else{
|
||||
GetGame().RPCSingleParam(NULL, M_RPCs.M_Admin_Message_Setup, new Param1<string>(""), true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void all(string msg)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
|
||||
ref array< Man > allPlayers = new ref array< Man >;
|
||||
GetGame().GetWorld().GetPlayerList(allPlayers);
|
||||
foreach( Man man : allPlayers )
|
||||
{
|
||||
PlayerBase playerBase = PlayerBase.Cast(man);
|
||||
playerBase.RPCSingleParam(ERPCs.RPC_USER_ACTION_MESSAGE, new Param1<string>(msg), false, playerBase.GetIdentity());
|
||||
}
|
||||
}else{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(msg);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Log_all, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void allWhite(string msg)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
|
||||
GetGame().ChatPlayer(0, msg);
|
||||
}else{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(msg);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Log_all_White, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void cons(string log)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
Debug.Log(log)
|
||||
}else{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(log);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Log_con, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void dbug(string log)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(FileExist(LogFolderPath))
|
||||
{
|
||||
FileHandle file = OpenFile(LogFolderPath + "Debug.txt", FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
}else
|
||||
{
|
||||
MakeDirectory(LogFolderPath);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
Print("Could not create Folder/File " + LogFolderPath + "Debug.txt");
|
||||
}
|
||||
}else
|
||||
{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(log);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Menu_Log_Debug, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void kill(string log)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(FileExist(LogFolderPath))
|
||||
{
|
||||
FileHandle file = OpenFile(LogFolderPath + "Kills.txt", FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
}else
|
||||
{
|
||||
MakeDirectory(LogFolderPath);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
Print("Could not create Folder/File " + LogFolderPath + "Kills.txt");
|
||||
}
|
||||
}else
|
||||
{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(log);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Menu_Log_Debug, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void admin(string log)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(FileExist(LogFolderPath))
|
||||
{
|
||||
FileHandle file = OpenFile(LogFolderPath + "Admin.txt", FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
}else{
|
||||
MakeDirectory(LogFolderPath + "Admin.txt");
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(log);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Menu_Log_Admin, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void error(string log)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(FileExist(LogFolderPath))
|
||||
{
|
||||
FileHandle file = OpenFile(LogFolderPath + "Error.txt", FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
}else{
|
||||
MakeDirectory(LogFolderPath + "Error.txt");
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
Print("Could not create Folder/File " + LogFolderPath + "Error.txt");
|
||||
}
|
||||
}else
|
||||
{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(log);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Log_error, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void info(string log)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(FileExist(LogFolderPath))
|
||||
{
|
||||
FileHandle file = OpenFile(LogFolderPath + "Info.txt", FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
}else{
|
||||
MakeDirectory(LogFolderPath + "Info.txt");
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, LineIn() + log);
|
||||
CloseFile(file);
|
||||
}
|
||||
Print("Could not create Folder/File " + LogFolderPath + "Info.txt");
|
||||
}
|
||||
}else
|
||||
{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(log);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Log_info, true, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
string msg;
|
||||
string player;
|
||||
switch(rpc_type)
|
||||
{
|
||||
case M_RPCs.M_Admin_Message:
|
||||
Param1< string > specParams;
|
||||
ctx.Read( specParams );
|
||||
if ( GetGame().IsClient() )
|
||||
{
|
||||
player(sender, specParams.param1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Message_Setup:
|
||||
//ctx.Read( specParams );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().IsConfig("Setup"))
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
player(sender, "Admin Set Menu Should open !")
|
||||
}else{
|
||||
player(sender,"Admin not set type /opme and try again")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Log_info:
|
||||
ctx.Read( msg );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
info(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Log_error:
|
||||
ctx.Read( msg );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
error(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Menu_Log_Admin:
|
||||
ctx.Read( msg );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
admin(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Menu_Log_Debug:
|
||||
ctx.Read( msg );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
dbug(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Log_con:
|
||||
ctx.Read( msg );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
cons(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Log_all:
|
||||
ctx.Read( msg );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
all(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Log_all_White:
|
||||
ctx.Read( msg );
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
if(GetFileHandler().HasPermission("Admin", sender))
|
||||
{
|
||||
allWhite(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ref LogHandler Tomato_LogHandler;
|
||||
|
||||
ref LogHandler TL()
|
||||
{
|
||||
if( !Tomato_LogHandler )
|
||||
{
|
||||
Tomato_LogHandler = new ref LogHandler();
|
||||
}
|
||||
|
||||
return Tomato_LogHandler;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de
|
||||
Copyright (C) 2018 DayZ-SA-Tomato
|
||||
|
||||
@ -58,10 +58,54 @@ enum M_RPCs
|
||||
M_Admin_Menu_Player_List_Request = 7036;
|
||||
M_Admin_Menu_Player_List = 7037;
|
||||
M_Admin_Menu_Log_Debug = 7038;
|
||||
M_Admin_Menu_Log_Startup = 7039;
|
||||
M_Admin_Menu_Log_Admin = 7039;
|
||||
M_Admin_Menu_Log_RPC = 7040;
|
||||
M_Admin_Menu_Message = 7041;
|
||||
M_Admin_Menu_Teleport_List_Request = 7042;
|
||||
M_Admin_Menu_Teleport_List = 7043;
|
||||
M_Admin_Menu_TpMeToPos = 7044;
|
||||
M_Admin_Menu_TpMeToPosVec = 7045;
|
||||
M_Admin_Menu_Player_List_Clear = 7046;
|
||||
M_Admin_Menu_Teleport_RequestData = 7047;
|
||||
M_Admin_Menu_Teleport_ReciveData = 7048;
|
||||
M_Admin_Menu_Teleport_Write = 7049;
|
||||
M_Admin_Player_UpdatePlayers = 7050;
|
||||
M_Admin_Player_RemovePlayer = 7051;
|
||||
M_Admin_Player_UpdatePlayer = 7052;
|
||||
M_Admin_Player_SetHealth = 7053;
|
||||
M_Admin_Player_SetBlood = 7054;
|
||||
M_Admin_Player_SetEnergy = 7055;
|
||||
M_Admin_Player_SetWater = 7056;
|
||||
M_Admin_Player_SetShock = 7057;
|
||||
M_Admin_Player_SetHeatComfort = 7058;
|
||||
M_Admin_Player_SetWet = 7059;
|
||||
M_Admin_Player_SetTremor = 7060;
|
||||
M_Admin_Player_SetStamina = 7061;
|
||||
M_Admin_Player_SetLifeSpanState = 7062;
|
||||
M_Admin_Player_SetBloodyHands = 7063;
|
||||
M_Admin_Player_KickTransport = 7064;
|
||||
M_Admin_Player_RepairTransport = 7065;
|
||||
M_Admin_Player_TeleportToMe = 7066;
|
||||
M_Admin_Player_TeleportMeTo = 7067;
|
||||
M_Admin_SpectatePlayer = 7068;
|
||||
M_Admin_Player_GodMode = 7069;
|
||||
M_Admin_SetConfigs = 7070;
|
||||
M_Admin_KickPlayer = 7071;
|
||||
M_Admin_BanPlayer = 7072;
|
||||
M_Admin_Log_con = 7073;
|
||||
M_Admin_Log_all = 7074;
|
||||
M_Admin_Log_all_White = 7075;
|
||||
M_Admin_Log_error = 7076;
|
||||
M_Admin_Log_info = 7077;
|
||||
M_Admin_Log_player = 7078;
|
||||
M_Admin_Delete_Object = 7079;
|
||||
M_SET_CAM_Spectate = 7080;
|
||||
M_Admin_Horde = 7081;
|
||||
M_Admin_Message = 7082;
|
||||
M_Admin_Message_Setup = 7083;
|
||||
M_Admin_Menu_MessageBox = 7084;
|
||||
M_Admin_Menu_MessageStatus = 7085;
|
||||
M_Admin_Menu_Teleport_Write_Pre = 7086;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
modded class EmoteManager
|
||||
{
|
||||
override void LogSuicide()
|
||||
{
|
||||
m_Player.issic(true);
|
||||
super.LogSuicide();
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
modded class PlayerBase
|
||||
{
|
||||
ref FPPlayer authentiPlayer;
|
||||
|
||||
ref DeathHandler m_DeathHandler;
|
||||
|
||||
override void OnConnect()
|
||||
{
|
||||
m_DeathHandler = new ref DeathHandler;
|
||||
// TL().cons("Player connected: " + this.ToString());
|
||||
ref SurvivorBase m_SurBase = SurvivorBase.Cast(this);
|
||||
m_SurBase.SetPID(this.GetIdentity().GetPlainId());
|
||||
m_SurBase.SetPFullName(this.GetIdentity().GetName());
|
||||
|
||||
// NEW STATS API
|
||||
// StatRegister("playtime");
|
||||
// StatRegister("dist");
|
||||
|
||||
Debug.Log("Player connected:"+this.ToString(),"Connect");
|
||||
m_DeathHandler.ConnectHandler(this.GetIdentity());
|
||||
// NEW STATS API
|
||||
StatRegister("playtime");
|
||||
StatRegister("dist");
|
||||
|
||||
m_PlayerOldPos = GetPosition();
|
||||
if( m_AnalyticsTimer )
|
||||
m_AnalyticsTimer.Run( 60, this, "UpdatePlayerMeasures", null, true );
|
||||
|
||||
}
|
||||
override void EEKilled( Object killer )
|
||||
{
|
||||
PlayerBase Killer_Playerbase; // Killer PlayerBase
|
||||
m_DeathHandler.KilledHandler(killer, this);
|
||||
|
||||
if( GetBleedingManagerServer() ) delete GetBleedingManagerServer();
|
||||
|
||||
|
||||
|
||||
// kill character in database
|
||||
if (GetHive())
|
||||
{
|
||||
GetHive().CharacterKill(this);
|
||||
}
|
||||
|
||||
// disable voice communication
|
||||
GetGame().EnableVoN(this, false);
|
||||
|
||||
|
||||
|
||||
GetSymptomManager().OnPlayerKilled();
|
||||
|
||||
super.EEKilled(killer);
|
||||
}
|
||||
|
||||
bool selfkill = false;
|
||||
void issic(bool Yep)
|
||||
{
|
||||
selfkill = Yep;
|
||||
}
|
||||
|
||||
bool CanBeDeleted()
|
||||
{
|
||||
return IsAlive() && !IsRestrained() && !IsUnconscious();
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
modded class SurvivorBase
|
||||
{
|
||||
private string PID = "empty";
|
||||
private string PFullName = "empty";
|
||||
|
||||
string GetPID()
|
||||
{
|
||||
return PID;
|
||||
}
|
||||
|
||||
void SetPID(string IdentityID)
|
||||
{
|
||||
PID = IdentityID;
|
||||
}
|
||||
|
||||
string GetPFullName()
|
||||
{
|
||||
return PFullName;
|
||||
}
|
||||
|
||||
void SetPFullName(string name)
|
||||
{
|
||||
PFullName = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,482 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class FileHandler
|
||||
{
|
||||
//Main Folder
|
||||
string MainFolder = "$profile:\\Tomato_Profiles";
|
||||
string MainFolderPath = "$profile:\\Tomato_Profiles\\";
|
||||
//Config Folder and Files
|
||||
string ConfigFolder = MainFolderPath + "Config";
|
||||
string ConfigFolderPath = MainFolderPath + "Config\\";
|
||||
string ConfigFile = ConfigFolderPath + "Config.txt";
|
||||
//Players Folder
|
||||
string PlayersFolderPath = ConfigFolderPath + "Players\\";
|
||||
//Log Folder and Files
|
||||
string LogFolder = MainFolderPath + "Log";
|
||||
string LogFolderPath = MainFolderPath + "Log\\";
|
||||
string LErrorFile = LogFolderPath + "Error.txt";
|
||||
string LDebugFile = LogFolderPath + "Debug.txt";
|
||||
string LInfoFile = LogFolderPath + "Info.txt";
|
||||
string LAdminFile = LogFolderPath + "Admin.txt";
|
||||
string LKillsFile = LogFolderPath + "Kills.txt";
|
||||
//Customization Folder and Files
|
||||
string CustomizationFolder = MainFolderPath + "Customization";
|
||||
string CustomizationFolderPath = MainFolderPath + "Customization\\";
|
||||
string TeleportFile = CustomizationFolderPath + "Teleport_Locations.txt";
|
||||
bool IsExit = false;
|
||||
ref FileConfig RootConfig;
|
||||
ref FileTeleport RootTeleport;
|
||||
//ref FilePlayers RootPlayers;
|
||||
|
||||
// NEW BEGINN
|
||||
ref array< ref FPPlayer > FPPlayers;
|
||||
ref FPPermission RootPermission;
|
||||
// NEW END
|
||||
|
||||
|
||||
|
||||
|
||||
void FileHandler()
|
||||
{
|
||||
RootConfig = new ref FileConfig( "ROOT" );
|
||||
RootTeleport = new ref FileTeleport( "ROOT" );
|
||||
//RootPlayers = new ref FilePlayers( "ROOT" );
|
||||
|
||||
// NEW BEGINN
|
||||
FPPlayers = new ref array< ref FPPlayer >;
|
||||
RootPermission = new ref FPPermission( "ROOT" );
|
||||
// NEW END
|
||||
|
||||
}
|
||||
|
||||
// NEW BEGINN
|
||||
|
||||
void SetPermission(string perm, PermissionType type, string id) //Identity.GetID()
|
||||
{
|
||||
Print("FileHandler");
|
||||
for ( int i = 0; i < FPPlayers.Count(); i++ )
|
||||
{
|
||||
if ( FPPlayers[i].GetGUID() == id )
|
||||
{
|
||||
Print("FileHanddler Player Founf");
|
||||
FPPlayers[i].SetPermission(perm , type);
|
||||
//return FPPlayers[i].HasPermission( fPPermission );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
array< ref FPPlayer > GetPlayers( ref array< string > guids = NULL )
|
||||
{
|
||||
if ( guids == NULL )
|
||||
{
|
||||
return FPPlayers;
|
||||
}
|
||||
|
||||
array< ref FPPlayer > tempArray = new array< ref FPPlayer >;
|
||||
|
||||
for ( int i = 0; i < guids.Count(); i++ )
|
||||
{
|
||||
for ( int k = 0; k < FPPlayers.Count(); k++ )
|
||||
{
|
||||
if ( guids[i] == FPPlayers[k].GetGUID() )
|
||||
{
|
||||
tempArray.Insert( FPPlayers[k] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tempArray;
|
||||
}
|
||||
|
||||
void SetPlayers( ref array< ref FPPlayer > players )
|
||||
{
|
||||
FPPlayers.Clear();
|
||||
|
||||
// This doesn't work??? wtf
|
||||
//FPPlayers.Copy( players );
|
||||
|
||||
for ( int i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
FPPlayers.Insert( players[i] );
|
||||
}
|
||||
}
|
||||
|
||||
void AddPlayers( ref array< ref FPPlayer > players )
|
||||
{
|
||||
for ( int i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
FPPlayers.Insert( players[i] );
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterPermission( string fPPermission, PermissionType type = PermissionType.DISALLOW )
|
||||
{
|
||||
RootPermission.AddPermission( fPPermission, type );
|
||||
}
|
||||
|
||||
ref array< string > ToPermArray()
|
||||
{
|
||||
ref array< string > data = new ref array< string >;
|
||||
RootPermission.ToPermArray( data );
|
||||
return data;
|
||||
}
|
||||
|
||||
ref FPPermission GetRootPermission()
|
||||
{
|
||||
return RootPermission;
|
||||
}
|
||||
|
||||
bool HasPermission( string fPPermission, PlayerIdentity player = NULL )
|
||||
{
|
||||
if ( !GetGame().IsMultiplayer() ) return true;
|
||||
|
||||
if ( player == NULL )
|
||||
{
|
||||
if ( ClientAuthPlayer == NULL )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return ClientAuthPlayer.HasPermission( fPPermission );
|
||||
}
|
||||
|
||||
for ( int i = 0; i < FPPlayers.Count(); i++ )
|
||||
{
|
||||
if ( FPPlayers[i].GetGUID() == player.GetId() )
|
||||
{
|
||||
return FPPlayers[i].HasPermission( fPPermission );
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ref FPPlayer PlayerJoined( PlayerIdentity player )
|
||||
{
|
||||
ref PlayerDataN data = new ref PlayerDataN;
|
||||
|
||||
if ( player )
|
||||
{
|
||||
data.SName = player.GetName();
|
||||
data.SGUID = player.GetId();
|
||||
data.SSteam64ID = player.GetPlainId();
|
||||
} else
|
||||
{
|
||||
data.SName = "Offline Mode";
|
||||
data.SGUID = "N/A";
|
||||
}
|
||||
|
||||
ref FPPlayer auPlayer = new ref FPPlayer( data );
|
||||
|
||||
auPlayer.IdentityPlayer = player;
|
||||
|
||||
auPlayer.CopyPermissions( RootPermission );
|
||||
|
||||
auPlayer.Load();
|
||||
|
||||
FPPlayers.Insert( auPlayer );
|
||||
|
||||
return auPlayer;
|
||||
}
|
||||
|
||||
void PlayerLeft( PlayerIdentity player )
|
||||
{
|
||||
ref PlayerDataN PData = new ref PlayerDataN;
|
||||
if ( player == NULL ) return;
|
||||
|
||||
for ( int i = 0; i < FPPlayers.Count(); i++ )
|
||||
{
|
||||
ref FPPlayer auPlayer = FPPlayers[i];
|
||||
|
||||
if ( auPlayer.GetSteam64ID() == player.GetPlainId() )
|
||||
{
|
||||
auPlayer.Save();
|
||||
|
||||
if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
PData = SerializePlayer( auPlayer );
|
||||
ScriptRPC Adding = new ScriptRPC();
|
||||
Adding.Write(PData);
|
||||
Adding.Send(NULL, M_RPCs.M_Admin_Player_RemovePlayer, true, NULL);
|
||||
//GetRPCManager().SendRPC( "PermissionsFramework", "RemovePlayer", new Param1< ref PlayerDataN >( SerializePlayer( auPlayer ) ), true );
|
||||
}
|
||||
|
||||
FPPlayers.Remove( i );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// void DebugPrint()
|
||||
// {
|
||||
// Print( "Printing all authenticated players!" );
|
||||
// for ( int i = 0; i < FPPlayers.Count(); i++ )
|
||||
// {
|
||||
// FPPlayers[i].DebugPrint();
|
||||
// }
|
||||
// }
|
||||
|
||||
ref FPPlayer GetPlayerByGUID( string guid )
|
||||
{
|
||||
ref FPPlayer auPlayer = NULL;
|
||||
|
||||
for ( int i = 0; i < FPPlayers.Count(); i++ )
|
||||
{
|
||||
if ( FPPlayers[i].GetGUID() == guid )
|
||||
{
|
||||
auPlayer = FPPlayers[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( auPlayer == NULL )
|
||||
{
|
||||
ref PlayerDataN data = new ref PlayerDataN;
|
||||
|
||||
data.SGUID = guid;
|
||||
|
||||
auPlayer = new ref FPPlayer( data );
|
||||
|
||||
FPPlayers.Insert( auPlayer );
|
||||
}
|
||||
|
||||
return auPlayer;
|
||||
}
|
||||
|
||||
ref FPPlayer GetPlayerByIdentity( PlayerIdentity ident )
|
||||
{
|
||||
if ( ident == NULL ) return NULL;
|
||||
|
||||
ref FPPlayer auPlayer = NULL;
|
||||
|
||||
for ( int i = 0; i < FPPlayers.Count(); i++ )
|
||||
{
|
||||
if ( FPPlayers[i].GetGUID() == ident.GetId() )
|
||||
{
|
||||
auPlayer = FPPlayers[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( auPlayer == NULL )
|
||||
{
|
||||
auPlayer = PlayerJoined( ident );
|
||||
}
|
||||
|
||||
return auPlayer
|
||||
}
|
||||
|
||||
ref FPPlayer GetPlayer( ref PlayerDataN data )
|
||||
{
|
||||
if ( data == NULL ) return NULL;
|
||||
|
||||
ref FPPlayer auPlayer = NULL;
|
||||
|
||||
for ( int i = 0; i < FPPlayers.Count(); i++ )
|
||||
{
|
||||
if ( FPPlayers[i].GetGUID() == data.SGUID )
|
||||
{
|
||||
auPlayer = FPPlayers[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( auPlayer == NULL )
|
||||
{
|
||||
auPlayer = new ref FPPlayer( data );
|
||||
|
||||
FPPlayers.Insert( auPlayer );
|
||||
}
|
||||
|
||||
auPlayer.NewData( data );
|
||||
|
||||
auPlayer.ToPermData();
|
||||
|
||||
return auPlayer;
|
||||
}
|
||||
|
||||
// NEW END
|
||||
void AddLocation(string PosName, vector AdminPos)
|
||||
{
|
||||
RootTeleport.AddNewLocation(PosName, AdminPos)
|
||||
}
|
||||
void LoadTeleport()
|
||||
{
|
||||
RootTeleport.Load();
|
||||
}
|
||||
|
||||
void RegisterNewconfig( string CfgName , string type, string data = "")
|
||||
{
|
||||
Print("RegisterNewconfig Data = " + data)
|
||||
RootConfig.RegisterNewconfig( CfgName, type , data);
|
||||
}
|
||||
|
||||
void PrintAllConfigs()
|
||||
{
|
||||
RootConfig.PrintAll();
|
||||
}
|
||||
|
||||
void ConfigInitialize()
|
||||
{
|
||||
RootConfig.ConfigInitialize();
|
||||
}
|
||||
|
||||
|
||||
bool IsConfig( string CfgName)
|
||||
{
|
||||
bool iscfg = false;
|
||||
iscfg = RootConfig.IsConfig(CfgName);
|
||||
return iscfg;
|
||||
}
|
||||
|
||||
string GetConfig( string CfgName)
|
||||
{
|
||||
string getConf = "";
|
||||
getConf = RootConfig.GetConfigData(CfgName);
|
||||
return getConf;
|
||||
}
|
||||
|
||||
void CheckAndCreateFiles()
|
||||
{
|
||||
Print("DayZ-Sa-Tomato Checking File system");
|
||||
CheckFolder(MainFolder);
|
||||
CheckFolder(ConfigFolder);
|
||||
CheckFolder(CustomizationFolder);
|
||||
CheckFolder(LogFolder);
|
||||
|
||||
CheckFile(LKillsFile);
|
||||
CheckFile(TeleportFile);
|
||||
CheckFile(LErrorFile);
|
||||
CheckFile(LDebugFile);
|
||||
CheckFile(LInfoFile);
|
||||
CheckFile(LAdminFile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CheckFile(string File)
|
||||
{
|
||||
if(FileExist(File))
|
||||
{
|
||||
Print("FileHandler : File " + File + " found!");
|
||||
}else
|
||||
{
|
||||
FileHandle file = OpenFile(File, FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, "");
|
||||
CloseFile(file);
|
||||
}
|
||||
if(FileExist(File))
|
||||
{
|
||||
if(File == TeleportFile)
|
||||
{
|
||||
CreateTeleportFile();
|
||||
}else
|
||||
{
|
||||
Print("FileHandler : File " + File + " Created");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetConfigType(string name, string stype)
|
||||
{
|
||||
ConfigType type
|
||||
if(stype == "true"){type = ConfigType.true;}
|
||||
else if (stype == "false"){type = ConfigType.false;}
|
||||
else if (stype == "custom"){type = ConfigType.custom;}
|
||||
|
||||
for ( int i = 0; i < RootConfig.Children.Count(); i++ )
|
||||
{
|
||||
if ( name == RootConfig.Children[i].ConfigName )
|
||||
{
|
||||
RootConfig.Children[i].SetConfigType(type);
|
||||
}
|
||||
}
|
||||
|
||||
RootConfig.WriteToFile();
|
||||
}
|
||||
|
||||
void SetConfigData(string name, string data)
|
||||
{
|
||||
for ( int i = 0; i < RootConfig.Children.Count(); i++ )
|
||||
{
|
||||
if ( name == RootConfig.Children[i].ConfigName )
|
||||
{
|
||||
RootConfig.Children[i].SetConfigData(data);
|
||||
}
|
||||
}
|
||||
RootConfig.WriteToFile();
|
||||
}
|
||||
|
||||
void CheckFolder(string Folder)
|
||||
{
|
||||
if(FileExist(Folder))
|
||||
{
|
||||
Print("FileHandler : Folder " + Folder + " found!");
|
||||
}else
|
||||
{
|
||||
MakeDirectory(Folder);
|
||||
if(FileExist(Folder))
|
||||
{
|
||||
Print("FileHandler : Folder " + Folder + " Created");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CreateTeleportFile()
|
||||
{
|
||||
FileHandle file = OpenFile(TeleportFile, FileMode.APPEND);
|
||||
if (file != 0)
|
||||
{
|
||||
FPrintln(file, "Prison Island = 2651.42 0.0 1395.8");
|
||||
FPrintln(file, "Mogilevka = 7572.65 0.0 5182.3");
|
||||
FPrintln(file, "Stary Sobor = 6192.39 0.0 7666.5");
|
||||
FPrintln(file, "Msta = 11206.6 0.0 5398.70");
|
||||
FPrintln(file, "Solnichniy = 13436.5 0.0 6158.7");
|
||||
FPrintln(file, "Chernogorsk = 6350.99 0.0 2666.12");
|
||||
FPrintln(file, "Elektrogorsk = 10432.1 0.0 2218.56");
|
||||
FPrintln(file, "Berezino = 12661.4 0.0 9465.03");
|
||||
FPrintln(file, "Tisy = 1890.45 0.0 13704.6");
|
||||
FPrintln(file, "Gorka = 9678.94 0.0 8828.93");
|
||||
FPrintln(file, "Balota = 4546.92 0.0 2416.4");
|
||||
FPrintln(file, "Vybor = 3916.85 0.0 8795.59");
|
||||
FPrintln(file, "Severograd = 8318.51 0.0 12743.4");
|
||||
FPrintln(file, "North West Airfield = 4835.59 0.0 9667.72");
|
||||
FPrintln(file, "Green Mountain = 3752.08 0.0 6002.94");
|
||||
FPrintln(file, "Zelenogorsk = 2542.18 0.0 4994.26");
|
||||
FPrintln(file, "Tisy Military Base = 1599.15 0.0 14166.66");
|
||||
FPrintln(file, "Pavlovo Military Base = 2047.82 0.0 3293.36");
|
||||
CloseFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
ref FileHandler Tomato_FileHandler;
|
||||
|
||||
ref FileHandler GetFileHandler()
|
||||
{
|
||||
if( !Tomato_FileHandler )
|
||||
{
|
||||
Tomato_FileHandler = new ref FileHandler();
|
||||
}
|
||||
|
||||
return Tomato_FileHandler;
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
typedef Param4<int, string, string, string> ChatParams;
|
||||
class ChatModules
|
||||
{
|
||||
|
||||
protected ref map<string, int> m_Commands;
|
||||
|
||||
void ChatModules()
|
||||
{
|
||||
m_Commands = new map<string,int>; //Command, length
|
||||
|
||||
m_Commands.Insert("/test",1);
|
||||
m_Commands.Insert("/test1",1);
|
||||
m_Commands.Insert("/opme",1);
|
||||
//m_Commands.Insert("/split",7);
|
||||
}
|
||||
|
||||
void ChatHandler( Param request_info )
|
||||
{
|
||||
ChatParams chat_params = ChatParams.Cast(request_info);
|
||||
if (chat_params)
|
||||
{
|
||||
array<Man> players = new array<Man>;
|
||||
GetGame().GetPlayers( players );
|
||||
|
||||
PlayerBase Admin;
|
||||
PlayerIdentity AdminIdentity;
|
||||
string AdminUID;
|
||||
string AdminName;
|
||||
|
||||
PlayerBase selectedPlayer;
|
||||
PlayerIdentity selectedIdentity;
|
||||
string selectedUID;
|
||||
|
||||
string chatLine = chat_params.param3;
|
||||
string strMessage;
|
||||
Param1<string> Msgparam;
|
||||
|
||||
for (int i = 0; i < players.Count(); ++i)
|
||||
{
|
||||
if (players.Get(i).GetIdentity().GetName() == chat_params.param2 && GetFileHandler().HasPermission("Admin", players.Get(i).GetIdentity() ) )
|
||||
{
|
||||
Admin = players.Get(i);
|
||||
AdminIdentity = Admin.GetIdentity();
|
||||
AdminUID = AdminIdentity.GetPlainId();
|
||||
AdminName = AdminIdentity.GetName();
|
||||
}else if(chatLine == "/opme" && GetFileHandler().IsConfig("Setup"))
|
||||
{
|
||||
Admin = players.Get(i);
|
||||
AdminIdentity = Admin.GetIdentity();
|
||||
GetFileHandler().SetPermission("Admin", PermissionType.ALLOW, AdminIdentity.GetId());
|
||||
GetFileHandler().SetConfigType("Setup", "false");
|
||||
//TL().player(AdminIdentity, "Admin Set please relog to save Config !");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Admin && AdminUID != "")
|
||||
{
|
||||
if (chatLine.Contains("/"))
|
||||
{
|
||||
ref array<string> chatData = CheckCommand(chatLine);
|
||||
string cCommand, cData;
|
||||
if (chatData != NULL)
|
||||
{
|
||||
cCommand = chatData.Get(0);
|
||||
cData = chatData.Get(1);
|
||||
} else { cCommand = "UnknownCommand" }
|
||||
|
||||
switch(cCommand)
|
||||
{
|
||||
case "/test":
|
||||
GetAdminMenuManager().MessageOpen(AdminIdentity, "This is a Test Message which is not that short")
|
||||
TL().player(AdminIdentity, "Message Show")
|
||||
break;
|
||||
|
||||
case "/test1":
|
||||
g_Game.GetUIManager().CloseMenu(7001);
|
||||
TL().player(AdminIdentity, "Message Close")
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ref array<string> CheckCommand(string CommandLine)
|
||||
{
|
||||
ref array<string> ret = new array<string>;
|
||||
string strRplce,mKey;
|
||||
int cmdLength;
|
||||
|
||||
strRplce = CommandLine;
|
||||
|
||||
for (int i = 0; i < m_Commands.Count(); ++i)
|
||||
{
|
||||
mKey = m_Commands.GetKey(i);
|
||||
cmdLength = m_Commands.Get(mKey);
|
||||
|
||||
if (CommandLine.Contains(mKey))
|
||||
{
|
||||
strRplce.Replace(mKey + " ","");
|
||||
ret.Insert(mKey); //0 = Command 1 = Data
|
||||
if (strRplce != "")
|
||||
{
|
||||
ret.Insert(strRplce);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
ref ChatModules Tomato_ChatModule;
|
||||
|
||||
ref ChatModules GetChatModule()
|
||||
{
|
||||
if( !Tomato_ChatModule )
|
||||
{
|
||||
Tomato_ChatModule = new ref ChatModules();
|
||||
}
|
||||
|
||||
return Tomato_ChatModule;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class ConfigModule
|
||||
{
|
||||
void ConfigModule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
GetFileHandler().CheckAndCreateFiles();
|
||||
GetFileHandler().RegisterNewconfig("Setup", "true");
|
||||
|
||||
//Horde Message
|
||||
GetFileHandler().RegisterNewconfig("Horde_Message", "true",);
|
||||
GetFileHandler().RegisterNewconfig("Horde_Message_Location", "custom", "Horde appeared near {Location}");
|
||||
|
||||
//Welcome Message
|
||||
GetFileHandler().RegisterNewconfig("Welcome_Message", "false",);
|
||||
GetFileHandler().RegisterNewconfig("Welcome_Message_Join", "custom", "{Player} just joined the Server");
|
||||
|
||||
// Kill Feed
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_LogToFile", "false");
|
||||
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Message_Suicide", "false",);
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Suicide", "custom", "{Killed} took his own life");
|
||||
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Message_PlayerHand", "false",);
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_ByPlayerHand", "custom", "{Killed} murdered by {Killer} with his Hands");
|
||||
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Message_PlayerWeapon", "false",);
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_ByPlayerWeapon", "custom", "{Killed} murdered by {Killer} with Weapon {Weapon} from {Distance}m");
|
||||
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Message_Zombie", "false",);
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Zombie", "custom", "{Killed} died by a zombie");
|
||||
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Message_Animal", "false",);
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Animal", "custom", "{Killed} died by a Wild Animal");
|
||||
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Message_Unkown", "false",);
|
||||
GetFileHandler().RegisterNewconfig("KillFeed_Unknown", "custom", "{Killed} died");
|
||||
|
||||
GetFileHandler().ConfigInitialize();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
/*
|
||||
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,
|
||||
however this File is Execludet from GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007 since it is
|
||||
|
||||
Originally from DayZ-CommunityOnlineTools
|
||||
Link : https://github.com/Jacob-Mango/DayZ-CommunityOnlineTools
|
||||
Created by Jacob-Mango
|
||||
and Published under license (CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/
|
||||
which means this file is under CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/ Licence.
|
||||
*/
|
||||
class PermissionBase
|
||||
{
|
||||
protected ref array< Man > bServerPlayers;
|
||||
|
||||
protected bool bLoaded;
|
||||
protected ref array< PlayerIdentity > bServerIdentities;
|
||||
void PermissionBase()
|
||||
{
|
||||
GetFileHandler().IsExit = false
|
||||
if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
bServerPlayers = new ref array< Man >;
|
||||
}
|
||||
bServerIdentities = new ref array< PlayerIdentity >;
|
||||
bLoaded = false;
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
}
|
||||
|
||||
void ~PermissionBase()
|
||||
{
|
||||
Print("PermissionBase::~PermissionBase");
|
||||
if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).Remove( this.ReloadPlayerList );
|
||||
GetFileHandler().IsExit = true;
|
||||
delete bServerPlayers;
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckIfExists( ref FPPlayer auPlayer )
|
||||
{
|
||||
for ( int i = 0; i < bServerIdentities.Count(); i++ )
|
||||
{
|
||||
if ( auPlayer.GetGUID() == bServerIdentities[i].GetId() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnStart()
|
||||
{
|
||||
if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.ReloadPlayerList, 1000, true );
|
||||
}
|
||||
}
|
||||
|
||||
void OnFinish()
|
||||
{
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).Remove( this.ReloadPlayerList );
|
||||
}
|
||||
|
||||
void OnLoaded()
|
||||
{
|
||||
}
|
||||
|
||||
void Update( float timeslice )
|
||||
{
|
||||
if( !bLoaded && !GetDayZGame().IsLoading() )
|
||||
{
|
||||
bLoaded = true;
|
||||
OnLoaded();
|
||||
} else {
|
||||
OnUpdate( timeslice );
|
||||
}
|
||||
}
|
||||
|
||||
void OnUpdate( float timeslice )
|
||||
{
|
||||
ReloadPlayerList();
|
||||
}
|
||||
|
||||
void ReloadPlayerList()
|
||||
{
|
||||
if(GetFileHandler().IsExit){return;}
|
||||
GetGame().GetPlayers( bServerPlayers );
|
||||
if(GetFileHandler().IsExit){return;}
|
||||
for ( int i = 0; i < bServerPlayers.Count(); i++ )
|
||||
{
|
||||
if(GetFileHandler().GetFileHandler().IsExit){return;}
|
||||
Man man = bServerPlayers[i];
|
||||
PlayerBase player = PlayerBase.Cast( man );
|
||||
if(GetFileHandler().IsExit){return;}
|
||||
ref FPPlayer auPlayer = GetFileHandler().GetPlayerByIdentity( man.GetIdentity() );
|
||||
|
||||
if ( player )
|
||||
{
|
||||
if(GetFileHandler().IsExit){return;}
|
||||
player.authentiPlayer = auPlayer;
|
||||
}
|
||||
if(GetFileHandler().IsExit){return;}
|
||||
auPlayer.PlayerObject = player;
|
||||
auPlayer.IdentityPlayer = man.GetIdentity();
|
||||
if(GetFileHandler().IsExit){return;}
|
||||
auPlayer.UpdatePlayerDataN();
|
||||
}
|
||||
if(GetFileHandler().IsExit){return;}
|
||||
bServerPlayers.Clear();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
|
||||
PlayerBase Admin;
|
||||
PlayerIdentity AdminIdentity;
|
||||
ref PlayerDataN PData = new ref PlayerDataN;
|
||||
switch(rpc_type)
|
||||
{
|
||||
case M_RPCs.M_Admin_Player_UpdatePlayers:
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
Admin = GetServerMission().IsAdminID(sender.GetName(), sender);
|
||||
if ( Admin != NULL)
|
||||
{
|
||||
AdminIdentity = Admin.GetIdentity();
|
||||
|
||||
for ( int i = 0; i < GetFileHandler().GetPlayers().Count(); i++ )
|
||||
{
|
||||
PData = SerializePlayer( GetFileHandler().GetPlayers().Get( i ) );
|
||||
ScriptRPC Adding = new ScriptRPC();
|
||||
Adding.Write(PData);
|
||||
Adding.Send(NULL, M_RPCs.M_Admin_Player_UpdatePlayer, true, sender);
|
||||
//GetRPCManager().SendRPC( "PermissionBase", "UpdatePlayer", new Param1< ref PlayerDataN >( SerializePlayer( GetFileHandler().GetPlayers().Get( i ) ) ), true, sender );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_RemovePlayer:
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
ctx.Read(PData);
|
||||
GetFileHandler().FPPlayers.RemoveItem( DeserializePlayer( PData ) );
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_UpdatePlayer:
|
||||
if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
|
||||
{
|
||||
ctx.Read(PData);
|
||||
DeserializePlayer( PData );
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,591 @@
|
||||
/*
|
||||
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,
|
||||
however this File is Execludet from GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007 since it is
|
||||
|
||||
Originally from DayZ-CommunityOnlineTools
|
||||
Link : https://github.com/Jacob-Mango/DayZ-CommunityOnlineTools
|
||||
Created by Jacob-Mango
|
||||
and Published under license (CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/
|
||||
which means this file is under CC BY SA 4.0) http://creativecommons.org/licenses/by-sa/4.0/ Licence.
|
||||
*/
|
||||
class PlayerModule
|
||||
{
|
||||
|
||||
void PlayerModule()
|
||||
{
|
||||
Print("PlayerModule Init");
|
||||
// FileHandler().RegisterPlayerConfig( "Menu.Admin" );
|
||||
|
||||
GetFileHandler().RegisterPermission( "Admin" );
|
||||
GetFileHandler().RegisterPermission( "DisableStamina" );
|
||||
GetFileHandler().RegisterPermission( "Godmode" );
|
||||
|
||||
//GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
}
|
||||
|
||||
void ~PlayerModule()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
PlayerBase Admin;
|
||||
PlayerIdentity AdminIdentity;
|
||||
float Dfloat;
|
||||
bool Dbool;
|
||||
vector Dvector;
|
||||
ref array <string> Dstring = new ref array <string>;
|
||||
ref array <string> Dstring1 = new ref array <string>;
|
||||
switch(rpc_type)
|
||||
{
|
||||
case M_RPCs.M_Admin_Player_SetHealth:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
array< ref FPPlayer > players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (int i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
PlayerBase player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.SetHealth( "GlobalHealth", "Health", Dfloat );
|
||||
|
||||
//COTLog( sender, "Set health to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetBlood:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.SetHealth( "GlobalHealth", "Blood", Dfloat );
|
||||
|
||||
//COTLog( sender, "Set blood to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetEnergy:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.GetStatEnergy().Set( Dfloat );
|
||||
|
||||
//COTLog( sender, "Set energy to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetWater:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.GetStatWater().Set( Dfloat );
|
||||
|
||||
//COTLog( sender, "Set water to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetShock:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.SetHealth( "GlobalHealth", "Shock", Dfloat );
|
||||
|
||||
//COTLog( sender, "Set shock to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetWet:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.GetStatWet().Set( Dfloat );
|
||||
|
||||
//COTLog( sender, "Set wetness to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetShock:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.GetStatHeatComfort().Set( Dfloat );
|
||||
|
||||
//COTLog( sender, "Set heat comfort to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetStamina:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.GetStatStamina().Set( Dfloat );
|
||||
|
||||
//COTLog( sender, "Set stamina to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetHeatComfort:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.GetStatTremor().Set( Dfloat );
|
||||
|
||||
//COTLog( sender, "Set tremor to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetLifeSpanState:
|
||||
ctx.Read(Dfloat);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
if ( Dfloat >= LifeSpanState.BEARD_NONE && Dfloat < LifeSpanState.COUNT )
|
||||
{
|
||||
player.SetLifeSpanStateVisible( Dfloat );
|
||||
}
|
||||
|
||||
//COTLog( sender, "Set beard state to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_SetBloodyHands:
|
||||
ctx.Read(Dbool);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
player.SetBloodyHands( Dfloat );
|
||||
|
||||
//COTLog( sender, "Set bloody hands to " + Dfloat + " for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_KickTransport:
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
|
||||
|
||||
if ( vehCommand == NULL ) continue;
|
||||
|
||||
Transport trans = vehCommand.GetTransport();
|
||||
|
||||
if ( trans )
|
||||
{
|
||||
Car caro;
|
||||
if ( Class.CastTo(caro, trans) )
|
||||
{
|
||||
float speed = caro.GetSpeedometer();
|
||||
if ( speed <= 8 )
|
||||
{
|
||||
vehCommand.GetOutVehicle();
|
||||
}
|
||||
else
|
||||
{
|
||||
vehCommand.JumpOutVehicle();
|
||||
}
|
||||
|
||||
//COTLog( sender, "Kicked " + players[i].GetGUID() + " out of transport" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_RepairTransport:
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
array< Transport > completedTransports = new array< Transport >;
|
||||
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL || player.GetTransport() == NULL ) continue;
|
||||
|
||||
Transport transport = player.GetTransport();
|
||||
|
||||
if ( completedTransports.Find( transport ) > -1 )
|
||||
{
|
||||
ItemBase radiator;
|
||||
|
||||
Class.CastTo( radiator, transport.FindAttachmentBySlotName("CarRadiator") );
|
||||
|
||||
if ( radiator )
|
||||
{
|
||||
radiator.SetHealth( "", "", 1 );
|
||||
}
|
||||
|
||||
transport.SetHealth( "Engine", "", 1 );
|
||||
transport.SetHealth( "FuelTank", "", 1 );
|
||||
|
||||
CarScript car = CarScript.Cast( transport );
|
||||
|
||||
if ( car )
|
||||
{
|
||||
car.Fill( CarFluid.FUEL, car.GetFluidCapacity( CarFluid.FUEL ) );
|
||||
car.Fill( CarFluid.OIL, car.GetFluidCapacity( CarFluid.OIL ) );
|
||||
car.Fill( CarFluid.BRAKE, car.GetFluidCapacity( CarFluid.BRAKE ) );
|
||||
car.Fill( CarFluid.COOLANT, car.GetFluidCapacity( CarFluid.COOLANT ) );
|
||||
}
|
||||
|
||||
completedTransports.Insert( transport );
|
||||
|
||||
//COTLog( sender, "Repaired transport for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_TeleportToMe:
|
||||
ctx.Read(Dvector);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < players.Count(); i++ )
|
||||
{
|
||||
player = players[i].PlayerObject;
|
||||
|
||||
if ( player == NULL ) continue;
|
||||
|
||||
if ( player.GetTransport() != NULL ) continue;
|
||||
|
||||
player.SetPosition( Dvector );
|
||||
|
||||
//COTLog( sender, "Teleported " + players[i].GetGUID() + " to self" );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_TeleportMeTo:
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
PlayerBase senderPlayer = PlayerBase.Cast( target );
|
||||
|
||||
if ( senderPlayer == NULL || senderPlayer.GetTransport() != NULL ) return;
|
||||
|
||||
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
if ( players.Count() != 1 ) return;
|
||||
|
||||
player = players[0].PlayerObject;
|
||||
|
||||
if ( player == NULL ) return;
|
||||
|
||||
senderPlayer.SetPosition( player.GetPosition() );
|
||||
|
||||
//COTLog( sender, "Teleported self to " + players[0].GetGUID() );
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
// case M_RPCs.M_Admin_SpectatePlayer:
|
||||
// TODO
|
||||
// ctx.Read(Dbool);
|
||||
// ctx.Read(Dstring);
|
||||
// if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
// return;
|
||||
// if ( GetGame().IsServer() )
|
||||
// {
|
||||
// if ( !Dbool )
|
||||
// {
|
||||
// GetGame().SelectPlayer( sender, target );
|
||||
// GetRPCManager().SendRPC( "COT_Camera", "LeaveCamera", new Param, true, sender );
|
||||
|
||||
// COTLog( sender, "Left spectating/free camera" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// array< ref FPPlayer > players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
// if ( players.Count() != 1 ) return;
|
||||
|
||||
// player = players[0].PlayerObject;
|
||||
|
||||
// if ( player == NULL ) return;
|
||||
|
||||
// GetGame().SelectSpectator( sender, "SpectatorCamera", player.GetPosition() );
|
||||
|
||||
// GetGame().SelectPlayer( sender, NULL );
|
||||
|
||||
//GetRPCManager().SendRPC( "COT_Admin", "SpectatePlayer", new Param, true, sender, player );
|
||||
|
||||
// COTLog( sender, "Spectating " + players[0].GetGUID() );
|
||||
// }else
|
||||
// {
|
||||
// if ( GetGame().IsMultiplayer() )
|
||||
// {
|
||||
// CurrentActiveCamera = COTCamera.Cast( Camera.GetCurrentCamera() );
|
||||
// }
|
||||
|
||||
// if ( CurrentActiveCamera )
|
||||
// {
|
||||
// CurrentActiveCamera.SelectedTarget( target );
|
||||
// CurrentActiveCamera.SetActive( true );
|
||||
// GetPlayer().GetInputController().SetDisabled( true );
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
|
||||
case M_RPCs.M_Admin_Player_GodMode:
|
||||
// ctx.Read(Dbool);
|
||||
// ctx.Read(Dstring);
|
||||
// if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
// return;
|
||||
// if ( GetGame().IsServer() )
|
||||
// {
|
||||
// players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
// for (i = 0; i < players.Count(); i++ )
|
||||
// {
|
||||
// player = players[i].PlayerObject;
|
||||
|
||||
// if ( player == NULL ) continue;
|
||||
//TODO
|
||||
// player.SetGodMode( Dvector );
|
||||
|
||||
//COTLog( sender, "Set god mode to " + Dvector + " for " + players[i].GetGUID() );
|
||||
// }
|
||||
// }
|
||||
break;
|
||||
|
||||
case M_RPCs.M_Admin_SetConfigs:
|
||||
ctx.Read(Dstring1);
|
||||
ctx.Read(Dstring);
|
||||
if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
return;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
ref array< string > perms = new ref array< string >;
|
||||
perms.Copy( Dstring1 );
|
||||
|
||||
ref array< string > guids = new ref array< string >;
|
||||
guids.Copy( Dstring );
|
||||
|
||||
players = DeserializePlayersGUID( Dstring );
|
||||
|
||||
for (i = 0; i < guids.Count(); i++ )
|
||||
{
|
||||
for ( int k = 0; k < FileHandler().FPPlayers.Count(); k++ )
|
||||
{
|
||||
ref FPPlayer player1 = FileHandler().FPPlayers[k];
|
||||
|
||||
if ( guids[i] == player1.GetGUID() )
|
||||
{
|
||||
player1.ClearPermissions();
|
||||
|
||||
for ( int j = 0; j < perms.Count(); j++ )
|
||||
{
|
||||
player1.AddPermission( perms[j] );
|
||||
}
|
||||
//TODO
|
||||
//GetRPCManager().SendRPC( "PermissionsFramework", "UpdatePlayer", new Param1< ref PlayerDataN >( SerializePlayer( player1 ) ), true, player1.IdentityPlayer );
|
||||
ScriptRPC Adding = new ScriptRPC();
|
||||
Adding.Write(player1);
|
||||
Adding.Send(NULL, M_RPCs.M_Admin_Player_UpdatePlayer, true, player1.IdentityPlayer);
|
||||
player1.Save();
|
||||
|
||||
//COTLog( sender, "Set and saved permissions for " + players[i].GetGUID() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// case M_RPCs.M_Admin_KickPlayer:
|
||||
// ctx.Read(Dstring);
|
||||
// if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
// return;
|
||||
// if ( GetGame().IsServer() )
|
||||
// {
|
||||
// array< ref FPPlayer > auPlayers = DeserializePlayersGUID( Dstring );
|
||||
|
||||
// for (i = 0; i < auPlayers.Count(); i++ )
|
||||
// {
|
||||
// auPlayers[i].Kick();
|
||||
////COTLog( sender, "Kicked " + auPlayers[i].GetGUID() );
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
|
||||
// case M_RPCs.M_Admin_BanPlayer:
|
||||
// ctx.Read(Dstring);
|
||||
// if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
// return;
|
||||
// if ( GetGame().IsServer() )
|
||||
// {
|
||||
// auPlayers = DeserializePlayersGUID( Dstring );
|
||||
|
||||
// for (i = 0; i < auPlayers.Count(); i++ )
|
||||
// {
|
||||
// auPlayers[i].Ban();
|
||||
//COTLog( sender, "Banned " + auPlayers[i].GetGUID() );
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
|
||||
// case M_RPCs.M_Admin_SetConfigs:
|
||||
// ctx.Read(Dvector);
|
||||
// ctx.Read(Dstring);
|
||||
// if ( !FileHandler().HasPermission( "Admin", sender ) )
|
||||
// return;
|
||||
// if ( GetGame().IsServer() )
|
||||
// {
|
||||
|
||||
// }
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class TeleportModule
|
||||
{
|
||||
void TeleportModule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
GetFileHandler().CheckAndCreateFiles();
|
||||
GetFileHandler().LoadTeleport();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class AdminMenuGuiAbout extends ScriptedWidgetEventHandler
|
||||
{
|
||||
|
||||
protected Widget m_Root;
|
||||
protected AdminMenuGui m_Menu;
|
||||
protected MultilineTextWidget m_Text_Txt;
|
||||
void AdminMenuGuiAbout( Widget parent, AdminMenuGui menu )
|
||||
{
|
||||
m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_About.layout", parent );
|
||||
m_Menu = menu;
|
||||
m_Text_Txt = MultilineTextWidget.Cast( m_Root.FindAnyWidget( "Text_About_Txt" ) );
|
||||
}
|
||||
|
||||
void ~AdminMenuGuiAbout()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Focus()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class AdminMenuMessage extends UIScriptedMenu
|
||||
{
|
||||
ref AdminMenuManager AMenuM;
|
||||
protected MultilineTextWidget m_MessageBox_Text;
|
||||
string MyText;
|
||||
// int CURRENT_STAMP;
|
||||
|
||||
|
||||
void AdminMenuMessage(string myText)
|
||||
{
|
||||
MyText = myText;
|
||||
SetID(7001);
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.MessageClose, 1000, true );
|
||||
}
|
||||
|
||||
override void Update(float tome)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MessageClose()
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
override Widget Init()
|
||||
{
|
||||
layoutRoot = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\MessageBox.layout", null );
|
||||
SetID(7001);
|
||||
m_MessageBox_Text = TextWidget.Cast( layoutRoot.FindAnyWidget( "MessageBox_Text" ) );
|
||||
m_MessageBox_Text.SetText(MyText);
|
||||
return layoutRoot;
|
||||
}
|
||||
|
||||
void ~AdminMenuMessage()
|
||||
{
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).Remove( this.MessageClose );
|
||||
this.Close();
|
||||
}
|
||||
|
||||
override bool OnClick( Widget w, int x, int y, int button )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// ref AdminMenuGui Tomato_AdminMenu;
|
||||
|
||||
// ref AdminMenuGui GetAdminMenu()
|
||||
// {
|
||||
// if( !Tomato_AdminMenu )
|
||||
// {
|
||||
// Tomato_AdminMenu = new ref AdminMenuGui();
|
||||
// }
|
||||
|
||||
// return Tomato_AdminMenu;
|
||||
// }
|
@ -0,0 +1,219 @@
|
||||
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
|
||||
{
|
||||
TextWidgetClass TextWidget0 {
|
||||
position 0 10
|
||||
size 1 50
|
||||
halign center_ref
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 0
|
||||
vexactsize 1
|
||||
style Bold
|
||||
text "About"
|
||||
"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
|
||||
}
|
||||
GridSpacerWidgetClass GridSpacerWidget0 {
|
||||
position 65 100
|
||||
size 1273.06006 676.08002
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
Columns 1
|
||||
Rows 18
|
||||
{
|
||||
TextWidgetClass TextWidget2 {
|
||||
position 86.02499 79.7848
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "DayZ-Sa-Tomato "
|
||||
}
|
||||
TextWidgetClass TextWidget3 {
|
||||
position 273.02499 161.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "This mod is mainly created for fun."
|
||||
}
|
||||
TextWidgetClass TextWidget4 {
|
||||
position 230.02501 160.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "However it took and still takes me a lot of time "
|
||||
}
|
||||
TextWidgetClass TextWidget5 {
|
||||
position 223.02501 185.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "to create it and adding features you request. "
|
||||
}
|
||||
TextWidgetClass TextWidget6 {
|
||||
position 237.02501 229.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
}
|
||||
TextWidgetClass TextWidget7 {
|
||||
position 218.02501 186.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "I hope you enjoy it and it helps you managing"
|
||||
}
|
||||
TextWidgetClass TextWidget8 {
|
||||
position 209.02501 186.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "your Servers if you have any feature requests"
|
||||
}
|
||||
TextWidgetClass TextWidget9 {
|
||||
position 215.02501 224.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "I would be happy to hear them."
|
||||
}
|
||||
TextWidgetClass TextWidget10 {
|
||||
position 255.02501 237.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Follow the links down below."
|
||||
}
|
||||
TextWidgetClass TextWidget11 {
|
||||
position 255.02501 271.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
}
|
||||
TextWidgetClass TextWidget12 {
|
||||
position 229.02501 265.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "If you wanna support this mod and keep it alive"
|
||||
}
|
||||
TextWidgetClass TextWidget13 {
|
||||
position 219.02501 279.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "you got two options to do so :"
|
||||
}
|
||||
TextWidgetClass TextWidget14 {
|
||||
position 219.02501 277.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "- Paypal donation @ mariusgeb@live.de"
|
||||
}
|
||||
TextWidgetClass TextWidget15 {
|
||||
position 135.02501 279.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "- Renting a server I host DayZ and other gameservers "
|
||||
}
|
||||
TextWidgetClass TextWidget16 {
|
||||
position 121.02499 296.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text " with fair prices and multiple locations running on strong servers"
|
||||
}
|
||||
TextWidgetClass TextWidget17 {
|
||||
position 218.02501 307.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
}
|
||||
TextWidgetClass TextWidget18 {
|
||||
position 101.02499 305.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Discord : https://discord.gg/Svgz48m"
|
||||
}
|
||||
TextWidgetClass TextWidget19 {
|
||||
position 112.02499 296.785
|
||||
size 48 48
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
text "Hosting Service : https://Shop.Primary-Network.com/ "
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
FrameWidgetClass rootFrame {
|
||||
position 49.9999 50
|
||||
size 400.44601 108.393
|
||||
halign right_ref
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 1
|
||||
vexactsize 1
|
||||
{
|
||||
WindowWidgetClass WindowWidget0 {
|
||||
position 0 0
|
||||
size 1 1
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 0
|
||||
vexactsize 0
|
||||
style rover_sim_black
|
||||
{
|
||||
MultilineTextWidgetClass MessageBox_Text {
|
||||
disabled 1
|
||||
position 0 10
|
||||
size 0.9 0.8
|
||||
halign center_ref
|
||||
valign bottom_ref
|
||||
hexactpos 1
|
||||
vexactpos 1
|
||||
hexactsize 0
|
||||
vexactsize 0
|
||||
"text halign" center
|
||||
"text valign" center
|
||||
wrap 1
|
||||
"condense whitespace" 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class HordeModule
|
||||
{
|
||||
|
||||
|
||||
void HordeModule()
|
||||
{
|
||||
GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC );
|
||||
}
|
||||
|
||||
void Spawn(vector horde_pos, int Spawned_Horde = 50, int Spawned_Distance = 50 , string name = "", PlayerIdentity sender = NULL)
|
||||
{
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
vector hdynamic_pos;
|
||||
for(int hor = 0; hor < Spawned_Horde; hor++)
|
||||
{
|
||||
float ha = Math.RandomFloat(0.4, 1.0) * 2 * Math.PI;
|
||||
float hr = Spawned_Distance * Math.Sqrt(Math.RandomFloat(0.4, 1.0));
|
||||
hdynamic_pos = horde_pos;
|
||||
hdynamic_pos[0] = hdynamic_pos[0]+(hr * Math.Cos(ha));
|
||||
hdynamic_pos[2] = hdynamic_pos[2]+(hr * Math.Sin(ha));
|
||||
hdynamic_pos[1] = GetGame().SurfaceY(hdynamic_pos[0], hdynamic_pos[2]) + 0.3;
|
||||
GetGame().CreateObject(R_Horde.GetRandomElement(), hdynamic_pos, false, true);
|
||||
|
||||
}
|
||||
if(name == "")
|
||||
{
|
||||
TL().status(sender, "Horde Spawned at Position: " + horde_pos.ToString(false));
|
||||
}else{
|
||||
if (GetFileHandler().IsConfig("Horde_Message"))
|
||||
{
|
||||
string msg = GetFileHandler().GetConfig("Horde_Message_Location");
|
||||
int count = msg.Replace("{Location}", name);
|
||||
GetGame().ChatPlayer(0, msg);
|
||||
TL().status(sender, msg);
|
||||
}
|
||||
TL().status(sender, "Horde Spawned at Location : " + name);
|
||||
}
|
||||
}else{
|
||||
ScriptRPC Rpc = new ScriptRPC();
|
||||
Rpc.Write(horde_pos);
|
||||
Rpc.Write(Spawned_Horde);
|
||||
Rpc.Write(Spawned_Distance);
|
||||
Rpc.Write(name);
|
||||
Rpc.Send(NULL, M_RPCs.M_Admin_Horde, true, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
|
||||
{
|
||||
switch(rpc_type)
|
||||
{
|
||||
|
||||
case M_RPCs.M_Admin_Horde:
|
||||
vector HPos; //Vector Postition
|
||||
int HCount; //Vector Postition
|
||||
int HDist; //Vector Postition
|
||||
string name;
|
||||
ctx.Read(HPos);
|
||||
ctx.Read(HCount);
|
||||
ctx.Read(HDist);
|
||||
ctx.Read(name);
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
Spawn(HPos, HCount, HDist,name, sender);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected ref TStringArray R_Horde =
|
||||
{
|
||||
"ZmbF_BlueCollarFat_Green",
|
||||
"ZmbF_BlueCollarFat_Red",
|
||||
"ZmbF_BlueCollarFat_White",
|
||||
"ZmbF_CitizenANormal_Beige",
|
||||
"ZmbF_CitizenANormal_Blue",
|
||||
"ZmbF_CitizenANormal_Brown",
|
||||
"ZmbF_CitizenBSkinny",
|
||||
"ZmbF_Clerk_Normal_Blue",
|
||||
"ZmbF_Clerk_Normal_Green",
|
||||
"ZmbF_Clerk_Normal_Red",
|
||||
"ZmbF_Clerk_Normal_White",
|
||||
"ZmbF_DoctorSkinny",
|
||||
"ZmbF_HikerSkinny_Blue",
|
||||
"ZmbF_HikerSkinny_Green",
|
||||
"ZmbF_HikerSkinny_Grey",
|
||||
"ZmbF_HikerSkinny_Red",
|
||||
"ZmbF_JoggerSkinny_Blue",
|
||||
"ZmbF_JoggerSkinny_Brown",
|
||||
"ZmbF_JoggerSkinny_Green",
|
||||
"ZmbF_JoggerSkinny_Red",
|
||||
"ZmbF_JournalistNormal_Blue",
|
||||
"ZmbF_JournalistNormal_Green",
|
||||
"ZmbF_JournalistNormal_Red",
|
||||
"ZmbF_JournalistNormal_White",
|
||||
"ZmbF_MechanicNormal_Beige",
|
||||
"ZmbF_MechanicNormal_Green",
|
||||
"ZmbF_MechanicNormal_Grey",
|
||||
"ZmbF_MechanicNormal_Orange",
|
||||
"ZmbF_MilkMaidOld_Beige",
|
||||
"ZmbF_MilkMaidOld_Black",
|
||||
"ZmbF_MilkMaidOld_Green",
|
||||
"ZmbF_MilkMaidOld_Grey",
|
||||
"ZmbF_NurseFat",
|
||||
"ZmbF_ParamedicNormal_Blue",
|
||||
"ZmbF_ParamedicNormal_Green",
|
||||
"ZmbF_ParamedicNormal_Red",
|
||||
"ZmbF_PatientOld",
|
||||
"ZmbF_PoliceWomanNormal",
|
||||
"ZmbF_ShortSkirt_beige",
|
||||
"ZmbF_ShortSkirt_black",
|
||||
"ZmbF_ShortSkirt_brown",
|
||||
"ZmbM_VillagerOld_White",
|
||||
"ZmbM_VillagerOld_Green",
|
||||
"ZmbM_SurvivorDean_Black",
|
||||
"ZmbM_SoldierVest",
|
||||
"ZmbM_SoldierHelmet",
|
||||
"ZmbM_SoldierAlice",
|
||||
"ZmbM_SkaterYoung_Grey",
|
||||
"ZmbM_SkaterYoung_Blue",
|
||||
"ZmbM_priestPopSkinny",
|
||||
"ZmbM_PolicemanFat",
|
||||
"ZmbM_PatrolNormal_Summer",
|
||||
"ZmbM_ParamedicNormal_Green",
|
||||
"ZmbM_ParamedicNormal_Black",
|
||||
"ZmbM_OffshoreWorker_Orange",
|
||||
};
|
||||
}
|
||||
|
180
README.md
180
README.md
@ -1,6 +1,6 @@
|
||||
# DayZ SA Tomato
|
||||
# DayZ-SA-Tomato
|
||||
|
||||
Dayz Standalone UI Admin Tool
|
||||
Dayz Standalone GUI Based Admin Tool
|
||||
|
||||
|
||||
|
||||
@ -10,69 +10,111 @@ See CHANGELOG.md
|
||||
|
||||
## News
|
||||
|
||||
## 15.12.2018 23:00
|
||||
## 20.01.2019 21:00
|
||||
|
||||
### Fixed
|
||||
|
||||
- For 1.0 Update (make sure to kopy the Key from Keys folder again !)
|
||||
|
||||
### Added
|
||||
|
||||
- Teleport Locations Check the Config/List Folder u can add your own Locations to it (Adding Locations from ingame does not work since filewrite is bugged at the moment)
|
||||
- Teleport Locations added right from in-game gui.
|
||||
- Spawn a changable size horde of zombies by a simple click on the map or on a defined location.
|
||||
- Delete Object on cursor
|
||||
- Player files sorted by Steam64ID for easy adding of admin to the server.
|
||||
- Teleport on Map click
|
||||
- Horde on Map Click
|
||||
- Customizable Kill feed (standard is disabled, change it in Config.txt File in your profiles folder)
|
||||
- Customizable Welcome message
|
||||
- Kill log file
|
||||
- Spectate Player
|
||||
|
||||
|
||||
### next up
|
||||
-
|
||||
|
||||
- TBA
|
||||
|
||||
|
||||
#### If Someone got the mod to work on a 3rd Party hoster Cantact me or join https://discord.gg/Svgz48m
|
||||
#### If Someone has this mod working on a 3rd Party host (GSP) PLEASE Cantact me or join https://discord.gg/Svgz48m to let us know to help others with the same service get their mod working as well
|
||||
|
||||
## Notes
|
||||
|
||||
You can do with this tool what you want as the licence says if you add any features to it i would appreciate if you would share your code so that everyone can benefit from it.
|
||||
You can do what you like with this tool as the license states. But if you add any features to it, i would appreciate if you would share your code so that everyone can benefit from it.
|
||||
|
||||
|
||||
You could cantact me per mail at DayZ-SA-Tomato@Primary-Network.de
|
||||
You could cantact me by email at DayZ-SA-Tomato@Primary-Network.de
|
||||
Or @Discord https://discord.gg/qqjwVXV
|
||||
|
||||
### Installing
|
||||
|
||||
0. Check out this Link if you are using a 3rd party hoster they changed there Wiki since a user asked them how to Install this mod probs to them https://trugaming.com/wiki/index.php?title=DayZ#Server_Side_Mods hoefully this helps a little bit
|
||||
1. Copy DayZ-SA-Tomato to your Server/Client main Folder
|
||||
2. Copy SchnitzelPommes.bikey to your Servers keys folder
|
||||
3. Make sure YourServerFolder/DayZ-Sa-Tomato/Config/Admins.txt file exist (You can delete it Client side)
|
||||
4. If You need to use the mod folder with an @ Make sure to create DayZ-Sa-Tomato Folder with the Config Folder in it or it wont load Admins.txt and TpLocations file
|
||||
5. Make sure when step 3 completed add your Steam64ID to this file(for every ID 1 line)
|
||||
6. Set start param -mod=DayZ-SA-Tomato at Server/Client
|
||||
7. If not exist Add -profiles=D:\YourProfileFolderMaybe/DayzServer/Log and -scrAllowFileWrite To your server Parameters
|
||||
![alt text](https://steamuserimages-a.akamaihd.net/ugc/43117016076707122/9D374D1F7933C13B477EE6792A3735D9FFAC74B4/)
|
||||
|
||||
|
||||
Also Available in the Steam workshop (not updated all the time)
|
||||
https://steamcommunity.com/sharedfiles/filedetails/?id=1575615457
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Test and Use
|
||||
|
||||
Start your Server and login
|
||||
|
||||
Check your Server log for
|
||||
### Installation
|
||||
|
||||
0. If you upgrade from an older version delete all of it and start at step 1.
|
||||
1. Click download, get the zip file, and open it
|
||||
1. Copy DayZ-SA-Tomato to your Server AND Client main (ROOT) Folder
|
||||
2. Inside "keys" folder copy SchnitzelPommes.bikey to your Servers keys folder
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/5jcGNRQ/Screenshot-3.png)
|
||||
```
|
||||
```
|
||||
4. include "-mod=DayZ-SA-Tomato" in Server start parameters.
|
||||
5. If profiles isn't set, add "-profiles=PATH TO PROFILES FOLDER" as well then save and close.
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/YdpXCwS/Screenshot-2.png)
|
||||
```
|
||||
```
|
||||
6. Move the DayZ-Sa-Tomato profile folder from the mod folder's Tomato_Profiles folder to server profiles folder.
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/HgSFFbF/Screenshot-3.png)
|
||||
```
|
||||
```
|
||||
6. Make sure DayZ-Sa-Tomato is loaded in DayZ Launcher before starting
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/427c1Mr/Screenshot-1.png)
|
||||
```
|
||||
```
|
||||
7. If starting game from Steam make sure to add "-mod=Dayz-Sa-Tomato" to start params.
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/t3swkS3/Screenshot-7.png)
|
||||
```
|
||||
```
|
||||
8. Join your server and login by pressing "T" and typing #login ADMINPW and pressing "enter"
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/Sv78jk2/Screenshot-12.png)
|
||||
```
|
||||
```
|
||||
9. Press "T" again and this time type /opme and press "enter"
|
||||
10. ## DO NOT DO ANYTHING ELSE
|
||||
11. Close out of the game and restart the server
|
||||
12. Join the server once again and this time WITHOUT logging in hit "m" and there you go!
|
||||
```
|
||||
```
|
||||
Please note that the profiles folder on the server does NOT have to be named "profiles" that was just used to clarify locations.
|
||||
```
|
||||
```
|
||||
Check out this Link if you are using a 3rd party hoster. They changed their Wiki since a user asked them how to Install this mod probs to them https://trugaming.com/wiki/index.php?title=DayZ#Server_Side_Mods hopefully this helps a little bit
|
||||
```
|
||||
```
|
||||
### Enabling Logs and Messages
|
||||
|
||||
-First thing you do is to go in to your server and open DayZServer/URPROFILES/Tomato_Profiles/Config/Config.txt file. Find the features you'd like to add and change the number 0 at the end to a 1 to enable it.
|
||||
|
||||
-Next if you want to customize the messages you can but REMEMBER you can not change certain parts or you wont get all your information from the message. Make sure you DO NOT edit anyting BEFORE the = symbol, the = symbol, or anything in the {} brackets.
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/4KWcsCJ/Screenshot-2.png)
|
||||
```
|
||||
Adding Admin:
|
||||
```
|
||||
|
||||
If this Meessage appears the server loadet the tool if not you did something wrong
|
||||
## Troubleshooting
|
||||
|
||||
-If you are still not able to access the admin tool with "M" there IS another way to activate the menu on your server. First, go to your DayZ server root and find your "profiles" (or whatever you named your profiles folder) and open it. Inside that folder will be a DayZ-Sa-Tomato folder. Inside that there is a "config" folder and inside that one is a "players" folder. There should be a file in there YOURSTEAM64ID.player (i.e. 76561198161388867.Player). right click and edit that to change Admin = 0 to Admin = 1 save and close that file. Back out to the "config" folder and edit config.txt to change the first option Setup = 0 to setup = 1. Restart the server and join your server and "M" should now work for you.
|
||||
```
|
||||
```
|
||||
![alt text](https://i.ibb.co/NKWzG6q/Screenshot-1.png)
|
||||
```
|
||||
In Game press "M" Key
|
||||
```
|
||||
If Your Client is configured with the mod a Message will appear @chat
|
||||
If Your Server is also configured correct and Admins.txt Contains your id The Ui will open
|
||||
|
||||
## Features
|
||||
|
||||
* **In Game** - M Key brings up the UI
|
||||
@ -87,10 +129,21 @@ If Your Server is also configured correct and Admins.txt Contains your id The Ui
|
||||
* **Commands Tab** - Nighttime
|
||||
* **Commands Tab** - Spawn Car repaired and filled
|
||||
* **Commands Tab** - Refill nearest Car
|
||||
* **Commands Tab** - Delete at cursor
|
||||
|
||||
|
||||
|
||||
|
||||
![alt text](https://i.ibb.co/f2f231q/COMMANDS.jpg)
|
||||
|
||||
------------
|
||||
|
||||
* **Spawn Tab** - Item/AI/Building Spawning
|
||||
* **Spawn Tab** - Item/AI/Building Spawning
|
||||
|
||||
|
||||
|
||||
|
||||
![alt text](https://i.ibb.co/rGY1kWS/SPAWN.jpg)
|
||||
|
||||
------------
|
||||
|
||||
@ -101,17 +154,50 @@ If Your Server is also configured correct and Admins.txt Contains your id The Ui
|
||||
* **Player Tab** - Disable Stamina for specific Player
|
||||
* **Player Tab** - Heal Player
|
||||
* **Player Tab** - Kill Player
|
||||
* **Player Tab** - Spectate Player
|
||||
|
||||
|
||||
|
||||
|
||||
![alt text](https://i.ibb.co/HNtddT5/PLAYER.jpg)
|
||||
|
||||
------------
|
||||
|
||||
* **Teleport Tab** - Teleport location list
|
||||
* **Teleport Tab** - Add/remove teleport locations in list
|
||||
* **Teleport Tab** - Spawn zombie hordes on locations
|
||||
|
||||
|
||||
|
||||
|
||||
![alt text](https://i.ibb.co/XxWSmCb/TELEPORT.jpg)
|
||||
|
||||
------------
|
||||
|
||||
* **Map Tab** - Shows Location of all Players on the Map
|
||||
* **Map Tab** - Spawn Zombie Horde on map
|
||||
* **Map Tab** - Teleport by map
|
||||
|
||||
|
||||
|
||||
|
||||
![alt text](https://i.ibb.co/h73WcvQ/MAP.jpg)
|
||||
|
||||
------------
|
||||
|
||||
* **About Tab** - All the information about support for DayZ-Sa-Tomato
|
||||
|
||||
|
||||
|
||||
|
||||
![alt text](https://i.ibb.co/sVfqfTx/20190119155652-1.jpg)
|
||||
|
||||
|
||||
------------
|
||||
|
||||
|
||||
### Known Issues
|
||||
* **Spwan Tab** - Item Preview (right side not working)
|
||||
* **Spwan Tab** - Building spawning in ground
|
||||
* **Player Tab** - Blood Energy not showing correctly (sometimes it does)
|
||||
* **Player Tab** - Send Message not working
|
||||
|
||||
## License
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user