diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8156ea5..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,49 +0,0 @@ -# Change Log -All notable changes to this project will be documented in this file. - - -## 01.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 - -### 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 - -### Fixed -- If more then one admin is Online both of them can see Playerlist + Map -- Teleport Buttons working now on PlayerTab - -## 28.11.2018 23:30 - -### Fixed -- You can open the menu even if you are not the first one logged in to server :D -- Map shows all player and there names -- Playerlist Working -- Custom Loggin addet but not used much -- Install Guide Updated -- In your Profile Folder there is a new folder calld TomatoLogs Uplad contents to pastebin when reporting Bugs - - -## 2018-11-28 0:30am -### Hot Fix - -- UI opens for everyone on the server when Admin opens it -- Link to https://github.com/Arkensor/DayZCommunityOfflineMode in used Files - -## 2018-11-27 -### Signed - -Addet bikey you should be able to use the mod without Dissableing verifySignatures now - - -## 2018-11-26 -### Release -Initial Release - diff --git a/DayZ-Sa-Tomato/Config/Admins.txt b/DayZ-Sa-Tomato/Config/Admins.txt deleted file mode 100644 index 1aba231..0000000 --- a/DayZ-Sa-Tomato/Config/Admins.txt +++ /dev/null @@ -1,2 +0,0 @@ -76561198161388867 -76561198017833573 diff --git a/DayZ-Sa-Tomato/Config/List/TeleportLocation.txt b/DayZ-Sa-Tomato/Config/List/TeleportLocation.txt deleted file mode 100644 index d0fa773..0000000 --- a/DayZ-Sa-Tomato/Config/List/TeleportLocation.txt +++ /dev/null @@ -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 \ No newline at end of file diff --git a/DayZ-Sa-Tomato/Config/Test.txt b/DayZ-Sa-Tomato/Config/Test.txt deleted file mode 100644 index d012d14..0000000 --- a/DayZ-Sa-Tomato/Config/Test.txt +++ /dev/null @@ -1 +0,0 @@ -TestString \ No newline at end of file diff --git a/DayZ-Sa-Tomato/Keys/SchnitzelPommes.bikey b/DayZ-Sa-Tomato/Keys/SchnitzelPommes.bikey deleted file mode 100644 index 24edca7..0000000 Binary files a/DayZ-Sa-Tomato/Keys/SchnitzelPommes.bikey and /dev/null differ diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo deleted file mode 100644 index bac0897..0000000 Binary files a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo and /dev/null differ diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign deleted file mode 100644 index 227fa58..0000000 Binary files a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign and /dev/null differ diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ deleted file mode 100644 index 6c342f1..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$PREFIX$ +++ /dev/null @@ -1 +0,0 @@ -com\DayZ-SA-Tomato \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$REVISION$ b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$REVISION$ deleted file mode 100644 index 56a6051..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/$REVISION$ +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign deleted file mode 100644 index 20c7c23..0000000 Binary files a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign and /dev/null differ diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp deleted file mode 100644 index 471da7d..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp +++ /dev/null @@ -1,63 +0,0 @@ -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" - }; - }; - }; - }; -}; diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/3_Game/Moddedconstants.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/3_Game/Moddedconstants.c deleted file mode 100644 index eddb166..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/3_Game/Moddedconstants.c +++ /dev/null @@ -1,2 +0,0 @@ -const int MENU_Admin = 7000; -const int MENU_AdminMessage = 7001; \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/ConfigTypes.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/ConfigTypes.c deleted file mode 100644 index 05840cf..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/ConfigTypes.c +++ /dev/null @@ -1,23 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -enum ConfigType -{ - false, true, next, custom -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/FileConfig.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/FileConfig.c deleted file mode 100644 index d76840c..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/FileConfig.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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 ConfigNames = new array; - array ConfigTypes = new array; - 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 ConfigLine = new array; - array ConfigStringCut = new array; - 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 ConfigStringCut = new array; - // 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); - } - } - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPermission.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPermission.c deleted file mode 100644 index dc4b8d6..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPermission.c +++ /dev/null @@ -1,269 +0,0 @@ - /* - 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 tokens = new array; - - array spaces = new array; - 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 tokens = new array; - 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 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 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 tokens = new array; - 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 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; - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPlayer.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPlayer.c deleted file mode 100644 index 6a169ef..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPlayer.c +++ /dev/null @@ -1,204 +0,0 @@ - /* - 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; - } - -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionSystem.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionSystem.c deleted file mode 100644 index 3a40496..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionSystem.c +++ /dev/null @@ -1,108 +0,0 @@ - /* - 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 ); -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionType.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionType.c deleted file mode 100644 index 03fcdcd..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionType.c +++ /dev/null @@ -1,19 +0,0 @@ - /* - 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 -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PlayerData.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PlayerData.c deleted file mode 100644 index a592e03..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PlayerData.c +++ /dev/null @@ -1,81 +0,0 @@ - /* - 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(); - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/FileTeleport.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/FileTeleport.c deleted file mode 100644 index 7916de4..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/FileTeleport.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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 TeleportLine = new array; - array TeleportLineCut = new array; - array TeleportPositions = new array; - 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 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; - - - } - } - } - -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/TeleportData.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/TeleportData.c deleted file mode 100644 index e1c25ae..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/TeleportData.c +++ /dev/null @@ -1,91 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class TeleportData -{ - ref array 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; -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/DeathHandler.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/DeathHandler.c deleted file mode 100644 index ed074e9..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/DeathHandler.c +++ /dev/null @@ -1,296 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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; -// } \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/LogHandler.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/LogHandler.c deleted file mode 100644 index 4856ad8..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/LogHandler.c +++ /dev/null @@ -1,435 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ - -class 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 players = new array; - - 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 players = new array; - - 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( msg ), false, ident ); - } - - void playern(PlayerIdentity ident, string msg) - { - Param1 Msgparam = new Param1( 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(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(""), 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(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; -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/M_RPCs.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/M_RPCs.c deleted file mode 100644 index 878795c..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/M_RPCs.c +++ /dev/null @@ -1,111 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -enum M_RPCs -{ - M_SPAWN_OBJECT = 7000; - M_SET_GODMODE = 7001; - M_SET_CAM = 7002; - M_TELEPORT = 7003; - M_Admin_Menu = 7004; - M_Admin_Menu_OK = 7005; - M_Admin_Menu_Spawn_Ground = 7006; - M_Admin_Menu_Spawn_Cursor = 7007; - M_Admin_Menu_Spawn_Inventory = 7008; - M_Admin_Menu_Heal = 7009; - M_Admin_Menu_Strip = 7010; - M_Admin_Menu_TpTo = 7011; - M_Admin_Menu_TpMe = 7012; - M_Admin_Menu_TpAllMe = 7013; - M_Admin_Menu_Spawn_Car = 7014; - M_Admin_Menu_Day = 7015; - M_Admin_Menu_Night = 7016; - M_Admin_Menu_Car_Refill = 7017; - M_Admin_Menu_TpToPos = 7018; - M_Admin_Menu_Kill = 7019; - M_Admin_Menu_SpWear = 7020; - M_Admin_Menu_Spawn_ItemPrev = 7021; - M_Admin_Menu_Spawn_ItemPrev_ok = 7022; - M_Admin_Menu_KillAll = 7023; - M_Admin_Menu_StripAll = 7024; - M_Admin_Menu_HealAll = 7025; - M_Admin_Menu_Stamina_Enable = 7026; - M_Admin_Menu_Stamina_Dissable = 7027; - M_Admin_Menu_PM = 7028; - M_Admin_Menu_Map_Player = 7029; - M_Admin_Menu_Map_Player_Request = 7030; - M_Admin_Menu_Player_Health_Request = 7031; - M_Admin_Menu_Player_Health = 7032; - M_Admin_Menu_Player_Stamina_Request = 7033; - M_Admin_Menu_Player_Stamina_ok = 7034; - M_Admin_Menu_Log_Info = 7035; - M_Admin_Menu_Player_List_Request = 7036; - M_Admin_Menu_Player_List = 7037; - M_Admin_Menu_Log_Debug = 7038; - 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; - - -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/MiscGameplayFunctions.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/MiscGameplayFunctions.c deleted file mode 100644 index 9d2d4ab..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/MiscGameplayFunctions.c +++ /dev/null @@ -1,4 +0,0 @@ -static float GetWaterMetabolicSpeed(int movement_speed) -{ - return 0.0; -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/EmoteManager.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/EmoteManager.c deleted file mode 100644 index 52bb843..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/EmoteManager.c +++ /dev/null @@ -1,28 +0,0 @@ - - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -modded class EmoteManager -{ - override void LogSuicide() - { - m_Player.issic(true); - super.LogSuicide(); - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/PlayerBase.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/PlayerBase.c deleted file mode 100644 index 3c60f47..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/PlayerBase.c +++ /dev/null @@ -1,84 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -modded class 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(); - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/SurvivorBase.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/SurvivorBase.c deleted file mode 100644 index b6e5a62..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/SurvivorBase.c +++ /dev/null @@ -1,45 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ - -modded class 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; - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/Modules/FileHandler.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/Modules/FileHandler.c deleted file mode 100644 index da04162..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/Modules/FileHandler.c +++ /dev/null @@ -1,482 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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; -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionGameplay.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionGameplay.c deleted file mode 100644 index cd62514..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionGameplay.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -modded class MissionGameplay -{ - 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; - 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() - { - super.OnInit(); - - Print( " Mission Gameplay "); - } - - // override void OnMissionStart() - // { - - // super.OnMissionStart(); - // m_PermissionBase.OnStart(); - // GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Player_UpdatePlayers, new Param1( "" ), false, NULL ); - // } - - override void OnMissionFinish() - { - // m_PermissionBase.OnFinish(); - GetGame().GetUIManager().CloseMenu( MENU_INGAME ); - super.OnMissionFinish(); - } - - - - // override void OnUpdate( float timeslice ) - // { - // super.OnUpdate( timeslice ); - // m_PermissionBase.OnUpdate( timeslice ); - // } - - - - override void OnKeyPress (int key ) - { - super.OnKeyPress( key ); - PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer()); - if ( key == KeyCode.KC_N ) - { - adminMenuManager.Teleport(); - if ( GetGame().IsClient() ) - { - } - } - - 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; - } - if ( key == KeyCode.KC_M ) - { - if(GetGame().IsClient() || !GetGame().IsMultiplayer()) - { - if ( player ) - { - //GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", "DayZ-Sa-Tomato", "")); - Widget widget = g_Game.GetUIManager().GetWidgetUnderCursor(); - // Print("TL funx"); - // TL().playerSetup(); - adminMenuManager.MenuOpen(); - } - } - } - } -} - -//Mission CreateCustomMission(string path) -// { - // if ( GetGame().IsServer() && GetGame().IsMultiplayer() ) { - // return new CustomMission(); // this always runs because createcustommission isnt a client side function - // } - // return new MissionGameplay(); -// } -//class, function, params \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionServer.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionServer.c deleted file mode 100644 index 0ce30f2..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/M_MissionServer.c +++ /dev/null @@ -1,392 +0,0 @@ -/* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -modded class MissionServer -{ - 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 AdminMenu adminMenu; - ref DevCam devCam; - ref TeleportData Tdata; - ref ChatModules m_ChatModule; - //admin list - ref PlayerModule PModule; - PlayerBase Admin = NULL; - void 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 .." ); - devTeleport = new DevTeleport(); - PModule = new PlayerModule(); - adminMenu = new AdminMenu(); - devCam = new DevCam(); - //Tdata = new TeleportData(); - } - - void ~MissionServer() - { - - delete PModule; - delete adminMenu; - delete m_PermissionBase; - Print( "CommunityOfflineServer::~CommunityOfflineServer()" ); - } - - - - 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 request_info = new Param4(chat_params.param1, chat_params.param2, chat_params.param3, chat_params.param4); - GetChatModule().ChatHandler(request_info); //Send the param to Admintools - } - break; - } - } - - - override void TickScheduler(float timeslice) - { - GetGame().GetWorld().GetPlayerList(m_Players); - if( m_Players.Count() == 0 ) return; - for(int i = 0; i < SCHEDULER_PLAYERS_PER_TICK; i++) - { - if(m_currentPlayer >= m_Players.Count() ) - { - m_currentPlayer = 0; - } - - PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(m_currentPlayer)); - string PlayerName; - PlayerIdentity PlayerIdent; - string PlayerSteam64ID; - vector PlayerPos; - - PlayerIdent = currentPlayer.GetIdentity(); - PlayerName = PlayerIdent.GetName(); - PlayerSteam64ID = PlayerIdent.GetPlainId(); - PlayerPos = currentPlayer.GetPosition(); - currentPlayer.OnTick(); - - if(GetFileHandler().HasPermission("DisableStamina", PlayerIdent) - { - currentPlayer.GetStaminaHandler().SyncStamina(1000,1000); - currentPlayer.GetStatStamina().Set(currentPlayer.GetStaminaHandler().GetStaminaCap()); - } - - m_currentPlayer++; - - - } - } - - void SendPosTOAdmins() - { - int m_currentPlayer1; - array players = new array; - 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(); - vector pos; - - pos = currentPlayer.GetPosition(); - //SendPosToAdmins(PlayerName, pos); - m_currentPlayer1++; - - int m_currentPlayer2; - array players1 = new array; - 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 (GetFileHandler().HasPermission("Admin", AdminIdent1)) - { - ScriptRPC PPos = new ScriptRPC(); - PPos.Write(PlayerName); - PPos.Write(pos); - PPos.Send(NULL, M_RPCs.M_Admin_Menu_Map_Player, false, AdminIdent1); - } - m_currentPlayer2++; - } - - - } - } - - - PlayerBase IsAdminID(string name, PlayerIdentity ID ) - { - GetGame().GetWorld().GetPlayerList(m_Players); - array players = new array; - GetGame().GetPlayers( players ); - PlayerIdentity CurIdent; - string id; - int Count = 0; - for (int i = 0; i < players.Count(); ++i) - { - PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(i)); - CurIdent = currentPlayer.GetIdentity(); - if(GetFileHandler().HasPermission("Admin", ID) && CurIdent.GetName() == name ) - { - Admin = currentPlayer; - break; - }else - { - Admin = NULL; - } - Count ++; - } - return Admin; - } - - ref Man GetPlayerFromIdentity( PlayerIdentity identity ) - { - foreach( ref Man manBase : m_Players ) - { - if ( manBase.GetIdentity().GetPlayerId() == identity.GetPlayerId() ) - { - return manBase; - } - } - return NULL; - } - - override void OnInit() - { - super.OnInit(); - m_ConfigModule.Init(); - m_TeleportModule.Init(); - - } - - override void OnMissionStart() - { - super.OnMissionStart(); - - m_PermissionBase.OnStart(); - } - - override void OnMissionFinish() - { - m_PermissionBase.OnFinish(); - - 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() - { - - } - - override void OnUpdate( float timeslice ) - { - super.OnUpdate( timeslice ); - - //m_PermissionBase.OnUpdate( timeslice ); - } - - void CLogInfo(string log) - { - 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); - Print(log); - if(FileExist("$profile:\\TomatoLog")) - { - FileHandle file = OpenFile("$profile:\\TomatoLog\\Info.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - }else{ - MakeDirectory("$profile:\\TomatoLog"); - FileHandle file2 = OpenFile("$profile:\\TomatoLog\\Info.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - } - } - - void CLogRPC(string log) - { - 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); - Print(log); - if(FileExist("$profile:\\TomatoLog")) - { - FileHandle file = OpenFile("$profile:\\TomatoLog\\RPC.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - }else{ - MakeDirectory("$profile:\\TomatoLog"); - FileHandle file2 = OpenFile("$profile:\\TomatoLog\\RPC.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - } - } - - void CLogStartup(string log) - { - 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); - Print(log); - if(FileExist("$profile:\\TomatoLog")) - { - FileHandle file = OpenFile("$profile:\\TomatoLog\\Startup.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - }else{ - MakeDirectory("$profile:\\TomatoLog"); - FileHandle file2 = OpenFile("$profile:\\TomatoLog\\Startup.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - } - } - - void CLogDebug(string log) - { - 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); - Print(log); - if(FileExist("$profile:\\TomatoLog")) - { - FileHandle file = OpenFile("$profile:\\TomatoLog\\Debug.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - }else{ - MakeDirectory("$profile:\\TomatoLog"); - FileHandle file2 = OpenFile("$profile:\\TomatoLog\\Debug.log", FileMode.APPEND); - if (file != 0) - { - FPrintln(file, "[" + date + "] - " + log); - CloseFile(file); - } - } - } - - - // void InitHive() - // { - // Hive oHive = GetHive(); - - // if( !oHive ) - // { - // oHive = CreateHive(); - // } - - // if( oHive ) - // { - // oHive.InitOffline(); - // } - // } -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/KeyMouseBinding.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/KeyMouseBinding.c deleted file mode 100644 index 86f943d..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/KeyMouseBinding.c +++ /dev/null @@ -1,245 +0,0 @@ - /* - 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. - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class KeyMouseBinding -{ - const int KB_EVENT_PRESS = 0; - const int KB_EVENT_RELEASE = 1; - const int KB_EVENT_HOLD = 2; - - const int MB_EVENT_PRESS = 0; - const int MB_EVENT_CLICK = 1; - const int MB_EVENT_RELEASE = 2; - const int MB_EVENT_DOUBLECLICK = 3; - const int MB_EVENT_DRAG = 4; - const int MB_EVENT_HOLD = 5; - - protected typename m_Object; - protected ref map m_KeyBinds; - protected ref map m_MouseBinds; - protected string m_strCallbackFunction; - protected string m_strShortcut; - protected string m_strDescription; - protected bool canUseInMenu; - - void KeyMouseBinding( typename object, string callback, string shortcut, string description, bool menu = false ) - { - m_Object = object; - m_KeyBinds = new map< int, int >; - m_MouseBinds = new map< int, int >; - - m_strCallbackFunction = callback; - m_strShortcut = shortcut; - m_strDescription = description; - - canUseInMenu = menu; - } - - bool canUseInMenu() - { - return canUseInMenu; - } - - bool Check() - { - bool k_m_Pressed = true; - for ( int kb = 0; kb < m_KeyBinds.Count(); ++kb ) - { - int keyCode = m_KeyBinds.GetKey(kb); - int keyEvent = m_KeyBinds.Get(keyCode); - - if ( keyEvent == KB_EVENT_RELEASE ) - { // Skip checking for release keys - continue; - } - if ( KeyState( keyCode ) == 0 ) - { - k_m_Pressed = false; - } - } - - for ( int mb = 0; mb < m_MouseBinds.Count(); ++mb ) - { - int mouseButton = m_MouseBinds.GetKey(mb); - int mouseEvent = m_MouseBinds.Get(mouseButton); - - if ( mouseEvent == MB_EVENT_RELEASE || mouseEvent == MB_EVENT_CLICK || mouseEvent == MB_EVENT_DOUBLECLICK || mouseButton == MouseState.WHEEL || mouseEvent == MB_EVENT_DRAG ) - { - continue; // Skip checking for release buttons, click or double click, or mouse drag/wheel (handled else where) - } - if ( !(GetMouseState( mouseButton ) & MB_PRESSED_MASK ) ) - { - k_m_Pressed = false; - } - } - return k_m_Pressed; - } - - bool IsRecurring() // Recurring if both mouse or keys are hold, drag OR wheel - { - bool recurring = true; - - for ( int kb = 0; kb < m_KeyBinds.Count(); ++kb ) - { - int keyCode = m_KeyBinds.GetKey(kb); - int keyEvent = m_KeyBinds.Get(keyCode); - - - if ( keyEvent != KB_EVENT_HOLD ) - { - return false; // a key is found that is not hold or drag. so it should not be recurring - } - } - - for ( int mb = 0; mb < m_MouseBinds.Count(); ++mb ) - { - int mouseButton = m_MouseBinds.GetKey(mb); - int mouseEvent = m_MouseBinds.Get(mouseButton); - - if ( mouseEvent != MB_EVENT_DRAG && mouseEvent != MB_EVENT_HOLD && mouseButton != MouseState.WHEEL ) - { - return false; - } - } - - - return recurring; - } - - bool IsHold() - { - bool release = false; - - for ( int kb = 0; kb < GetKeyBinds().Count(); ++kb) - { - int keyCode = m_KeyBinds.GetKey(kb); - int keyEvent = m_KeyBinds.Get(keyCode); - - if ( keyEvent == KB_EVENT_RELEASE ) - { - - } - } - - return ( m_KeyBinds.GetKeyByValue(KB_EVENT_RELEASE) || m_MouseBinds.GetKeyByValue(MB_EVENT_RELEASE) ); - } - - bool HasKeyEvent( int key_Event ) - { - for ( int kb = 0; kb < GetKeyBinds().Count(); ++kb) - { - int keyCode = m_KeyBinds.GetKey(kb); - int keyEvent = m_KeyBinds.Get(keyCode); - - if ( keyEvent == key_Event ) - { - return true; - } - } - - return false; - } - - bool ContainsKey( int key ) - { - return m_KeyBinds.Contains( key ); - } - - bool ContainsButton( int button ) - { - return m_MouseBinds.Contains( button ); - } - - bool ContainsKeyEvent( int key, int key_Event ) - { - int kc = -1; - for ( int kb = 0; kb < GetKeyBinds().Count(); ++kb) - { - int keyCode = m_KeyBinds.GetKey(kb); - int keyEvent = m_KeyBinds.Get(keyCode); - - if ( keyCode == key && keyEvent == key_Event ) - { - kc = keyCode; - } - } - - return kc > -1; - } - - bool ContainsButtonEvent( int button, int button_Event ) - { - int m = -1; - for ( int mb = 0; mb < GetMouseBinds().Count(); ++mb) - { - int mouseBind = m_MouseBinds.GetKey(mb); - int mouseEvemt = m_MouseBinds.Get(mouseBind); - - if ( mouseBind == button && mouseEvemt == button_Event ) - { - m = mouseBind; - } - } - - return m > -1; - } - - void AddKeyBind( int key, int key_event ) - { - m_KeyBinds.Insert( key, key_event ); - } - - void AddMouseBind( int button, int mouse_event ) - { - m_MouseBinds.Insert( button, mouse_event ); - } - - ref map GetKeyBinds() - { - return m_KeyBinds; - } - - ref map GetMouseBinds() - { - return m_MouseBinds; - } - - typename GetObject() - { - return m_Object; - } - - string GetShortcut() - { - return m_strShortcut; - } - - string GetDescription() - { - return m_strDescription; - } - - string GetCallBackFunction() - { - return m_strCallbackFunction; - } - -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/StaticFunctions.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/StaticFunctions.c deleted file mode 100644 index 98da41e..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/StaticFunctions.c +++ /dev/null @@ -1,454 +0,0 @@ - /* - 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. - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -static string FormatFloat( float value, int decimals ) -{ - string result = ""; - array output = new array; - - value.ToString().Split(".", output); - - if ( output.Count() == 0 ) return value.ToString(); - - if ( decimals == 0 ) return output.Get(0); - - string right = output.Get(1).Substring(0, decimals); - result = output.Get(0) + "." + right; - - return result; -} - -static string VectorToString( vector vec ) -{ - string result = vec.ToString(); - result.Replace( "<", "" ); - result.Replace( ">", "" ); - result.Replace( ",", "" ); - - return result; -} - -static string VectorToString( vector vec, int decimals ) -{ - string result = ""; - result = FormatFloat(vec[0], decimals) + "|" + FormatFloat(vec[1], decimals) + "|" + FormatFloat(vec[2], decimals); - - return result; -} - -static TStringArray GetChildrenFromBaseClass( string strConfigName, string strBaseClass ) -{ - string child_name = ""; - int count = GetGame().ConfigGetChildrenCount ( strConfigName ); - TStringArray class_names = new TStringArray; - - for (int p = 0; p < count; p++) - { - GetGame().ConfigGetChildName ( strConfigName, p, child_name ); - - if ( GetGame().IsKindOf(child_name, strBaseClass ) && ( child_name != strBaseClass ) ) - { - class_names.Insert(child_name); - } - } - - return class_names; -} - -static TVectorArray GetSpawnPoints() -{ - return { "15135.1 0 13901.1", "15017.8 0 13892.4", "14887.1 0 14547.9", "14749.7 0 13248.7", - "14697.6 0 13418.4", "14537.3 0 14755.7", "14415.3 0 14025.2", "14338.0 0 12859.5", - "14263.8 0 12748.7", "14172.2 0 12304.9", "14071.4 0 12033.3", "14054.9 0 11341.3", - "14017.8 0 2959.1", "13905.5 0 12489.7", "13852.4 0 11686.0", "13846.6 0 12050.0", - "13676.0 0 12262.1", "13617.4 0 12759.8", "13610.1 0 11223.6", "13594.3 0 4064.0", - "13587.8 0 6026.5", "13571.1 0 3056.8", "13552.6 0 4653.7", "13529.9 0 3968.3", - "13520.8 0 4223.7", "13504.0 0 5004.5", "13476.7 0 6136.3", "13441.6 0 5262.2", - "13426.6 0 5747.3", "13416.8 0 11840.4", "13400.8 0 4120.7", "13395.8 0 5902.8", - "13385.0 0 3946.6", "13374.4 0 6454.3", "13367.1 0 10837.1", "13366.3 0 4906.0", - "13337.1 0 5120.8", "13326.7 0 5489.1", "13312.7 0 6771.1", "13288.7 0 11415.1", - "13261.6 0 11785.2", "13171.6 0 6534.8", "13159.8 0 5401.7", "13155.2 0 5475.2", - "13084.9 0 7938.6", "13056.8 0 4848.5", "13048.1 0 8357.6", "13048.1 0 3867.7", - "12991.7 0 7287.1", "12983.0 0 5539.1", "12978.9 0 9727.8", "12950.2 0 5226.7", - "12942.1 0 8393.1", "12891.5 0 3673.9", "12628.7 0 10495.2", "12574.3 0 3592.8", - "12566.3 0 6682.6", "12465.2 0 8009.0", "12354.5 0 3480.0", "13262.8 0 7225.8" }; -} - -static TStringArray WorkingZombieClasses() -{ - return { "ZmbM_HermitSkinny_Base","ZmbM_HermitSkinny_Beige","ZmbM_HermitSkinny_Black","ZmbM_HermitSkinny_Green", - "ZmbM_HermitSkinny_Red","ZmbM_FarmerFat_Base","ZmbM_FarmerFat_Beige","ZmbM_FarmerFat_Blue","ZmbM_FarmerFat_Brown", - "ZmbM_FarmerFat_Green","ZmbF_CitizenANormal_Base","ZmbF_CitizenANormal_Beige","ZmbF_CitizenANormal_Brown", - "ZmbF_CitizenANormal_Blue","ZmbM_CitizenASkinny_Base","ZmbM_CitizenASkinny_Blue","ZmbM_CitizenASkinny_Brown", - "ZmbM_CitizenASkinny_Grey","ZmbM_CitizenASkinny_Red","ZmbM_CitizenBFat_Base","ZmbM_CitizenBFat_Blue","ZmbM_CitizenBFat_Red", - "ZmbM_CitizenBFat_Green","ZmbF_CitizenBSkinny_Base","ZmbF_CitizenBSkinny","ZmbM_PrisonerSkinny_Base","ZmbM_PrisonerSkinny", - "ZmbM_FirefighterNormal_Base","ZmbM_FirefighterNormal","ZmbM_FishermanOld_Base","ZmbM_FishermanOld_Blue","ZmbM_FishermanOld_Green", - "ZmbM_FishermanOld_Grey","ZmbM_FishermanOld_Red","ZmbM_JournalistSkinny_Base","ZmbM_JournalistSkinny","ZmbF_JournalistNormal_Base", - "ZmbF_JournalistNormal_Blue","ZmbF_JournalistNormal_Green","ZmbF_JournalistNormal_Red","ZmbF_JournalistNormal_White", - "ZmbM_ParamedicNormal_Base","ZmbM_ParamedicNormal_Blue","ZmbM_ParamedicNormal_Green","ZmbM_ParamedicNormal_Red", - "ZmbM_ParamedicNormal_Black","ZmbF_ParamedicNormal_Base","ZmbF_ParamedicNormal_Blue","ZmbF_ParamedicNormal_Green", - "ZmbF_ParamedicNormal_Red","ZmbM_HikerSkinny_Base","ZmbM_HikerSkinny_Blue","ZmbM_HikerSkinny_Green","ZmbM_HikerSkinny_Yellow", - "ZmbF_HikerSkinny_Base","ZmbF_HikerSkinny_Blue","ZmbF_HikerSkinny_Grey","ZmbF_HikerSkinny_Green","ZmbF_HikerSkinny_Red", - "ZmbM_HunterOld_Base","ZmbM_HunterOld_Autumn","ZmbM_HunterOld_Spring","ZmbM_HunterOld_Summer","ZmbM_HunterOld_Winter", - "ZmbF_SurvivorNormal_Base","ZmbF_SurvivorNormal_Blue","ZmbF_SurvivorNormal_Orange","ZmbF_SurvivorNormal_Red", - "ZmbF_SurvivorNormal_White","ZmbM_SurvivorDean_Base","ZmbM_SurvivorDean_Black","ZmbM_SurvivorDean_Blue","ZmbM_SurvivorDean_Grey", - "ZmbM_PolicemanFat_Base","ZmbM_PolicemanFat","ZmbF_PoliceWomanNormal_Base","ZmbF_PoliceWomanNormal","ZmbM_PolicemanSpecForce_Base", - "ZmbM_PolicemanSpecForce","ZmbM_SoldierNormal_Base","ZmbM_SoldierNormal","ZmbM_usSoldier_normal_Base", - "ZmbM_usSoldier_normal_Woodland","ZmbM_usSoldier_normal_Desert","ZmbM_CommercialPilotOld_Base","ZmbM_CommercialPilotOld_Blue", - "ZmbM_CommercialPilotOld_Olive","ZmbM_CommercialPilotOld_Brown","ZmbM_CommercialPilotOld_Grey","ZmbM_PatrolNormal_Base", - "ZmbM_PatrolNormal_PautRev","ZmbM_PatrolNormal_Autumn","ZmbM_PatrolNormal_Flat","ZmbM_PatrolNormal_Summer","ZmbM_JoggerSkinny_Base", - "ZmbM_JoggerSkinny_Blue","ZmbM_JoggerSkinny_Green","ZmbM_JoggerSkinny_Red","ZmbF_JoggerSkinny_Base","ZmbF_JoggerSkinny_Blue", - "ZmbF_JoggerSkinny_Brown","ZmbF_JoggerSkinny_Green","ZmbF_JoggerSkinny_Red","ZmbM_MotobikerFat_Base","ZmbM_MotobikerFat_Beige", - "ZmbM_MotobikerFat_Black","ZmbM_MotobikerFat_Blue","ZmbM_VillagerOld_Base","ZmbM_VillagerOld_Blue","ZmbM_VillagerOld_Green", - "ZmbM_VillagerOld_White","ZmbM_SkaterYoung_Base","ZmbM_SkaterYoung_Blue","ZmbM_SkaterYoung_Brown","ZmbM_SkaterYoung_Green", - "ZmbM_SkaterYoung_Grey","ZmbF_SkaterYoung_Base","ZmbF_SkaterYoung_Brown","ZmbF_SkaterYoung_Striped","ZmbF_SkaterYoung_Violet", - "ZmbF_DoctorSkinny_Base","ZmbF_DoctorSkinny","ZmbF_BlueCollarFat_Base","ZmbF_BlueCollarFat_Blue","ZmbF_BlueCollarFat_Green", - "ZmbF_BlueCollarFat_Red","ZmbF_BlueCollarFat_White","ZmbF_MechanicNormal_Base","ZmbF_MechanicNormal_Beige","ZmbF_MechanicNormal_Green", - "ZmbF_MechanicNormal_Grey","ZmbF_MechanicNormal_Orange","ZmbM_MechanicSkinny_Base","ZmbM_MechanicSkinny_Blue","ZmbM_MechanicSkinny_Grey", - "ZmbM_MechanicSkinny_Green","ZmbM_MechanicSkinny_Red","ZmbM_ConstrWorkerNormal_Base","ZmbM_ConstrWorkerNormal_Beige", - "ZmbM_ConstrWorkerNormal_Black","ZmbM_ConstrWorkerNormal_Green","ZmbM_ConstrWorkerNormal_Grey","ZmbM_HeavyIndustryWorker_Base", - "ZmbM_HeavyIndustryWorker","ZmbM_OffshoreWorker_Base","ZmbM_OffshoreWorker_Green","ZmbM_OffshoreWorker_Orange","ZmbM_OffshoreWorker_Red", - "ZmbM_OffshoreWorker_Yellow","ZmbF_NurseFat_Base","ZmbF_NurseFat","ZmbM_HandymanNormal_Base","ZmbM_HandymanNormal_Beige", - "ZmbM_HandymanNormal_Blue","ZmbM_HandymanNormal_Green","ZmbM_HandymanNormal_Grey","ZmbM_HandymanNormal_White","ZmbM_DoctorFat_Base", - "ZmbM_DoctorFat","ZmbM_Jacket_Base","ZmbM_Jacket_beige","ZmbM_Jacket_black","ZmbM_Jacket_blue","ZmbM_Jacket_bluechecks", - "ZmbM_Jacket_brown","ZmbM_Jacket_greenchecks","ZmbM_Jacket_grey","ZmbM_Jacket_khaki","ZmbM_Jacket_magenta","ZmbM_Jacket_stripes", - "ZmbF_PatientOld_Base","ZmbF_PatientOld","ZmbM_PatientSkinny_Base","ZmbM_PatientSkinny","ZmbF_ShortSkirt_Base","ZmbF_ShortSkirt_beige", - "ZmbF_ShortSkirt_black","ZmbF_ShortSkirt_brown","ZmbF_ShortSkirt_green","ZmbF_ShortSkirt_grey","ZmbF_ShortSkirt_checks", - "ZmbF_ShortSkirt_red","ZmbF_ShortSkirt_stripes","ZmbF_ShortSkirt_white","ZmbF_ShortSkirt_yellow","ZmbF_VillagerOld_Base", - "ZmbF_VillagerOld_Blue","ZmbF_VillagerOld_Green","ZmbF_VillagerOld_Red","ZmbF_VillagerOld_White","ZmbM_Soldier","ZmbM_SoldierAlice", - "ZmbM_SoldierHelmet","ZmbM_SoldierVest","ZmbM_SoldierAliceHelmet","ZmbM_SoldierVestHelmet","ZmbF_MilkMaidOld_Base", - "ZmbF_MilkMaidOld_Beige","ZmbF_MilkMaidOld_Black","ZmbF_MilkMaidOld_Green","ZmbF_MilkMaidOld_Grey","ZmbM_priestPopSkinny_Base", - "ZmbM_priestPopSkinny","ZmbM_ClerkFat_Base","ZmbM_ClerkFat_Brown","ZmbM_ClerkFat_Grey","ZmbM_ClerkFat_Khaki","ZmbM_ClerkFat_White", - "ZmbF_Clerk_Normal_Base","ZmbF_Clerk_Normal_Blue","ZmbF_Clerk_Normal_White","ZmbF_Clerk_Normal_Green","ZmbF_Clerk_Normal_Red" }; -} - -static set< Object > GetObjectsAt( vector from, vector to, Object ignore = NULL, float radius = 0.5, Object with = NULL ) -{ - vector contact_pos; - vector contact_dir; - int contact_component; - - set< Object > geom = new set< Object >; - set< Object > view = new set< Object >; - - DayZPhysics.RaycastRV( from, to, contact_pos, contact_dir, contact_component, geom, with, ignore, false, false, ObjIntersectGeom, radius ); - DayZPhysics.RaycastRV( from, to, contact_pos, contact_dir, contact_component, view, with, ignore, false, false, ObjIntersectView, radius ); - - if ( geom.Count() > 0 ) - { - return geom; - } - if ( view.Count() > 0 ) - { - return view; - } - return NULL; -} - -static Object GetPointerObject( Object ignore = NULL, float radius = 0.5, Object with = NULL ) -{ - vector dir = GetGame().GetPointerDirection(); - - vector from = GetGame().GetCurrentCameraPosition(); - - vector to = from + ( dir * 10000 ); - - auto objs = GetObjectsAt( from, to, ignore, radius, with ); - - if( objs.Count() > 0 ) - { - return objs[ 0 ]; - } - - return NULL; -} - -static Object GetCursorObject() -{ - vector rayStart = GetGame().GetCurrentCameraPosition(); - vector rayEnd = rayStart + GetGame().GetCurrentCameraDirection() * 10000; - - auto objs = GetObjectsAt( rayStart, rayEnd ); - - if( objs.Count() > 0 ) - { - return objs[ 0 ]; - } - - return NULL; -} - -static vector GetPointerPos() -{ - if ( !GetPlayer() ) - { - return "0 0 0"; - } - - vector dir = GetGame().GetPointerDirection(); - - vector from = GetGame().GetCurrentCameraPosition(); - - vector to = from + ( dir * 10000 ); - - vector rayStart = from; - vector rayEnd = to; - vector hitPos; - vector hitNormal; - int hitComponentIndex; - DayZPhysics.RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, NULL, NULL, GetPlayer()); - - return hitPos; -} - -static vector GetCursorPos() -{ - if ( !GetPlayer() ) - { - return "0 0 0"; - } - - vector rayStart = GetGame().GetCurrentCameraPosition(); - vector rayEnd = rayStart + GetGame().GetCurrentCameraDirection() * 10000; - vector hitPos; - vector hitNormal; - int hitComponentIndex; - DayZPhysics.RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, NULL, NULL, GetPlayer()); - - return hitPos; -} - - - -static Weapon GetWeaponInHands() -{ - Weapon weapon_in_hands; - if( GetPlayer() && GetPlayer().GetItemInHands() ) Class.CastTo(weapon_in_hands, GetPlayer().GetItemInHands()); - - return weapon_in_hands; -} - -static MissionBase GetMission() -{ - return MissionBase.Cast( GetGame().GetMission() ); -} - -static void SetFreezePlayer( ref PlayerBase player, bool freeze ) -{ - player.GetInputController().OverrideMovementSpeed( freeze, 0 ); - player.GetInputController().OverrideAimChangeX( freeze, 0 ); - player.GetInputController().OverrideAimChangeY( freeze, 0 ); -} - -static MissionServer GetServerMission() -{ - return MissionServer.Cast( GetGame().GetMission() ); -} - -static ref PlayerBase GetPlayer() -{ - return PlayerBase.Cast(GetGame().GetPlayer()); -} - -static bool SHIFT() -{ - return( ( KeyState( KeyCode.KC_LSHIFT ) > 0 ) || ( KeyState( KeyCode.KC_RSHIFT ) > 0 ) ); -} - -static bool CTRL() -{ - return( ( KeyState( KeyCode.KC_LCONTROL ) > 0 ) || ( KeyState( KeyCode.KC_RCONTROL ) > 0 ) ); -} - -static bool ALT() -{ - return( ( KeyState( KeyCode.KC_LMENU ) > 0 ) || ( KeyState( KeyCode.KC_RMENU ) > 0 ) ); -} - -static bool WINKEY() -{ - return( ( KeyState( KeyCode.KC_LWIN ) > 0 ) || ( KeyState( KeyCode.KC_RWIN ) > 0 ) ); -} - -static ZombieBase SpawnInfected(vector pos) -{ - return ZombieBase.Cast(GetGame().CreateObject( WorkingZombieClasses().GetRandomElement(), pos, false, true )); -} - -/* -static Weapon_Base CreateWeapon( PlayerBase oPlayer ) -{ - Weapon_Base oWpn = Weapon_Base.Cast(oPlayer.GetInventory().CreateInInventory( "M4A1_Black" )); - oWpn.GetInventory().CreateAttachment( "M4_Suppressor" ); - oWpn.GetInventory().CreateAttachment( "M4_RISHndgrd_Black" ); - oWpn.GetInventory().CreateAttachment( "M4_MPBttstck_Black" ); - oWpn.GetInventory().CreateAttachment( "ACOGOptic" ); - - return oWpn; -} -*/ - -static Weapon_Base CreateWeapon( PlayerBase oPlayer, string sWeapon ) -{ - Weapon_Base oWpn = Weapon_Base.Cast(oPlayer.GetInventory().CreateInInventory( sWeapon )); - oWpn.GetInventory().CreateAttachment( "PistolSuppressor" ); - EntityAI optic = oWpn.GetInventory().CreateAttachment( "ReflexOptic" ); - optic.GetInventory().CreateAttachment("Battery9V"); - - return oWpn; -} - -static Magazine LoadMag( PlayerBase oPlayer, Weapon_Base oWpn ) -{ - Magazine oMag = Magazine.Cast(oPlayer.GetInventory().CreateInInventory( "Mag_UMP_25Rnd" )); - oPlayer.GetWeaponManager().AttachMagazine( oMag ); - - return oMag; -} - -static PlayerBase CreateCustomDefaultCharacter() -{ - PlayerBase oPlayer = PlayerBase.Cast( GetGame().CreatePlayer( NULL, GetGame().CreateRandomPlayer(), GetSpawnPoints().GetRandomElement(), 0, "NONE") ); - - EntityAI item = NULL; - - item = oPlayer.GetInventory().CreateInInventory( "AviatorGlasses" ); - item = oPlayer.GetInventory().CreateInInventory( "MilitaryBeret_UN" ); - item = oPlayer.GetInventory().CreateInInventory( "M65Jacket_Black" ); - item = oPlayer.GetInventory().CreateInInventory( "PlateCarrierHolster" ); - item = oPlayer.GetInventory().CreateInInventory( "TacticalGloves_Black" ); - item = oPlayer.GetInventory().CreateInInventory( "HunterPants_Autumn" ); - item = oPlayer.GetInventory().CreateInInventory( "MilitaryBoots_Black" ); - item = oPlayer.GetInventory().CreateInInventory( "AliceBag_Camo" ); - - item = oPlayer.GetInventory().CreateInInventory( "Mag_UMP_25Rnd" ); - - Weapon_Base oWpn = CreateWeapon(oPlayer, "UMP45"); - LoadMag(oPlayer, oWpn); - - oPlayer.LocalTakeEntityToHands( oWpn ); - oPlayer.SetQuickBarEntityShortcut( oWpn, 0, true ); - - return oPlayer; -} - -static string FileAttributeToString( FileAttr attr ) -{ - string fileType = ""; - if ( attr & FileAttr.DIRECTORY ) - { - fileType = fileType + "DIRECTORY"; - } - if ( attr & FileAttr.HIDDEN ) - { - fileType = fileType + "HIDDEN"; - } - if ( attr & FileAttr.READONLY ) - { - fileType = fileType + "READONLY"; - } - if ( attr & FileAttr.INVALID ) - { - fileType = fileType + "INVALID"; - } - return fileType; -} - -static vector SnapToGround(vector pos) -{ - float pos_x = pos[0]; - float pos_z = pos[2]; - float pos_y = GetGame().SurfaceY( pos_x, pos_z ); - vector tmp_pos = Vector( pos_x, pos_y, pos_z ); - tmp_pos[1] = tmp_pos[1] + pos[1]; - - return tmp_pos; -} - -static bool m_GodMode; // move these to player saves? Edit: Jacob says "yes" -static bool m_OldAiming; -static bool bc_Visible; - -static void SnapToGroundNew( Object object ) -{ - vector pos = object.GetPosition(); - pos[1] = GetGame().SurfaceY(pos[0], pos[2]); - - vector clippingInfo[2]; - vector objectBBOX[2]; - - object.GetCollisionBox( objectBBOX ); - object.ClippingInfo( clippingInfo ); - - //float clipY = objectBBOX[1][1] / 2.0//- clippingInfo[0][1]; - //pos[1] = pos[1] + objectBBOX[1][1] - clipY; - pos[1] = pos[1] + clippingInfo[1][1] / 2.0;//objectBBOX[0][1] - clipY - - object.SetPosition(pos); - - ForceTargetCollisionUpdate( object ); -} - -static void ForceTargetCollisionUpdate( Object oObj ) -{ - if ( !oObj ) return; - - vector roll = oObj.GetOrientation(); - roll [ 2 ] = roll [ 2 ] - 1; - oObj.SetOrientation( roll ); - roll [ 2 ] = roll [ 2 ] + 1; - oObj.SetOrientation( roll ); -} - -static void ToggleCursor() -{ - if ( GetGame().GetInput().HasGameFocus( INPUT_DEVICE_MOUSE ) ) - { - GetGame().GetInput().ChangeGameFocus( 1 ); - GetGame().GetUIManager().ShowUICursor( true ); - } - else - { - GetGame().GetUIManager().ShowUICursor( false ); - GetGame().GetInput().ResetGameFocus(); - } -} - -/* - Token types: - 0 - error, no token - 1 - defined token (special characters etc. . / * ) - 2 - quoted string. Quotes are removed -> TODO - 3 - alphabetic string - 4 - number - 5 - end of line -> TODO -*/ -static bool CheckStringType( string str, int type ) -{ - for(int i = 0; i. - */ -class AdminMenu //extends UIScriptedMenu -{ - protected ref map m_TPLocations; - //ref UIScriptedMenu adminMenuGui; - //ref AdminMenuGui m_adMenu; - //ref AdminMenuMessage m_adMenuMessage; - //ref AdminMenuGuiMap m_map; - PlayerBase Admin; - PlayerIdentity AdminIdentity; - string AdminUID; - //ref AdminMenuManager AMenuM; - ref array m_Players; - //ref LogHandler m_LogHandler; - - - - - void AdminMenu() - { - GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); - //m_LogHandler = new ref LogHandler(); - //adminMenuMain = new AdminMenuMain(); - } - - void ~AdminMenu() - { - //delete AMenuM; - //delete m_adMenu; - //delete m_LogHandler; - } - - void Message (string strMessage) - { - Param1 Msgparam1; - Msgparam1 = new Param1( strMessage ); - GetGame().RPCSingleParam(Admin, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam1, true, AdminIdentity); - } - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - array players = new array; - GetGame().GetPlayers( players ); - PlayerIdentity selectedIdentity; - PlayerBase selectedPlayer; - string strMessage; - Param1 Msgparam; - string PlayerName; - string cData; - ItemBase oItem = NULL; - PlayerIdentity AdminIdent; - string status; - bool ai = false; - int Count = 0; - - int quantity = 0; - string text = ""; - - - - switch(rpc_type) - { - - case (int)M_RPCs.M_Admin_Menu: - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - AdminIdentity = Admin.GetIdentity(); - AdminUID = AdminIdentity.GetId(); - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_OK, new Param1( "Test" ), false, AdminIdentity ); - } - } - break; - - case (int)M_RPCs.M_Admin_Menu_MessageBox: - Param1 MenuMessagep; - ctx.Read( MenuMessagep ); - string MenuMessage = MenuMessagep.param1; - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - //GetAdminMenuManager.MessageMenu(MenuMessage); - // UIScriptedMenu adminMenuMessage = NULL; - // adminMenuMessage = new AdminMenuMessage(MenuMessage); - - // if ( g_Game.GetUIManager().GetMenu() == NULL ) - // { - // g_Game.GetUIManager().ShowScriptedMenu( adminMenuGui, NULL ); - // } - - // if ( g_Game.GetUIManager().IsMenuOpen(7001) ) - // { - // g_Game.GetUIManager().CloseMenu(7001); - // g_Game.GetUIManager().ShowScriptedMenu( adminMenuMessage, NULL ); - // }else{ - // g_Game.GetUIManager().ShowScriptedMenu( adminMenuMessage, NULL ); - // } - } - break; - - - - case (int)M_RPCs.M_Admin_Menu_OK: - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - //UIScriptedMenu adminMenuGui = NULL; - //adminMenuGui = new AdminMenuGui(); - UIScriptedMenu adminMenuGui = NULL; - adminMenuGui = new AdminMenuGui(); - if ( g_Game.GetUIManager().GetMenu() == NULL ) - { - g_Game.GetUIManager().ShowScriptedMenu( adminMenuGui, NULL ); - } - - - // if ( g_Game.GetUIManager().IsMenuOpen(7000) ) - // { - // if(!AMenuM.CanClose) - // { - // return; - // } - - - // g_Game.GetUIManager().HideScriptedMenu(adminMenuGui); - - //g_Game.GetUIManager().Back(); - - // g_Game.GetUIManager().CloseMenu(7000); - // g_Game.GetUIManager().CloseAll(); - // delete adminMenuGui; - //GetGame().GetUIManager().Back(); - - - // }else{ - // UIScriptedMenu adminMenuGui = NULL; - // adminMenuGui = new ref AdminMenuGui(); - // g_Game.GetUIManager().ShowScriptedMenu( adminMenuGui, NULL ); - // AMenuM.CanClose = true; - // } - } - break; - - case (int)M_RPCs.M_Admin_Menu_Teleport_Write_Pre: - if ( GetGame().IsServer()) - { - Print("Pos Pre"); - string PosNamet; - ctx.Read(PosNamet); - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - vector TLLPos = Admin.GetPosition(); - // ScriptRPC Addingpos = new ScriptRPC(); - // Addingpos.Write(PosNamet); - // Addingpos.Write(TLLPos); - // Print("Pos RPC"); - // Addingpos.Send(NULL, M_RPCs.M_Admin_Menu_Teleport_Write, false, NULL); - GetFileHandler().AddLocation(PosNamet, TLLPos) - } - } - break; - - case M_RPCs.M_Admin_Delete_Object: - Param1 ObjectParam; - ctx.Read( ObjectParam ); - Object ObJIs = ObjectParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID( sender.GetName(), sender); - if ( Admin != NULL) - { - GetGame().ObjectDelete( ObJIs ); - status = "Object Deleted !"; - TL().status(sender, status); - } - - } - - case M_RPCs.M_Admin_Menu_Spawn_Ground: - //read stuff - string GroundN_Item; //ItemName - string GroundN_ai; //ai Bool - string QuantityItem; //Textbox - ctx.Read(GroundN_Item); - ctx.Read(GroundN_ai); - ctx.Read(QuantityItem); - - if (GroundN_ai == "true") - { - ai = true; - } - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID( sender.GetName(), sender); - if ( Admin != NULL) - { - - //EntityAI oObj = GetGame().CreateObject( GroundN_Item, Admin.GetPosition(), false, ai ); - EntityAI oObj = EntityAI.Cast(GetGame().CreateObject( GroundN_Item, Admin.GetPosition(), false, ai )); - - //obEditor.addObject( oObj ); - if ( oObj.IsInherited( ItemBase ) ) - { - //oItem = ( ItemBase ) oObj; - oItem = ItemBase.Cast(oObj); - SetupSpawnedItem( oItem, oItem.GetMaxHealth(), 1 ); - - quantity = 0; - text = QuantityItem; - text.ToUpper(); - //TODO ?? Check IsInherited EntetyAI - if (text == "MAX") - { - quantity = oItem.GetQuantityMax(); - } else - { - quantity = text.ToInt(); - } - oItem.SetQuantity(quantity); - return; - } - oObj.PlaceOnSurface(); - TL().status(sender, GroundN_Item + " Spawned"); - } - } - - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - } - break; - - case M_RPCs.M_Admin_Menu_Spawn_ItemPrev: - //read stuff - string ItemPrev_Item; //ItemName - ctx.Read(ItemPrev_Item); - - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID( sender.GetName(), sender); - if ( Admin != NULL) - { - - EntityAI oObjp = EntityAI.Cast(GetGame().CreateObject( ItemPrev_Item, vector.Zero, false, false )); - //obEditor.addObject( oObj ); - - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_ItemPrev_ok, new Param1( oObjp ), false, AdminIdentity ); - - - - - } - } - - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - } - break; - - - - case M_RPCs.M_Admin_Menu_Spawn_Inventory: - //read stuff - string Inventory_Item; //ItemName - string Inventory_ai; //ai Bool - string Inventory_QuantityItem; //Textbox - ctx.Read(Inventory_Item); - ctx.Read(Inventory_ai); - ctx.Read(Inventory_QuantityItem); - - if (Inventory_ai == "true") - { - ai = true; - } - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID( sender.GetName(), sender); - if ( Admin != NULL) - { - EntityAI oInvItem = Admin.GetInventory().CreateInInventory( Inventory_Item ); - oInvItem.SetHealth( oInvItem.GetMaxHealth() ); - if ( oInvItem.IsInherited( ItemBase ) ) - { - oItem = ItemBase.Cast(oObj); - SetupSpawnedItem( oItem, oItem.GetMaxHealth(), 1 ); - quantity = 0; - text = Inventory_QuantityItem; - text.ToUpper(); - if (text == "MAX") - { - quantity = oItem.GetQuantityMax(); - } else - { - quantity = text.ToInt(); - } - oItem.SetQuantity(quantity); - return; - } - } - } - - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - } - break; - - case M_RPCs.M_Admin_Menu_Spawn_Cursor: - //read stuff - string Cursor_Item; //ItemName - vector Cursor_Pos //Vector Postition - string Cursor_ai; //ai Bool - string Cursor_QuantityItem; //Textbox - ctx.Read(Cursor_Item); - ctx.Read(Cursor_Pos); - ctx.Read(Cursor_ai); - ctx.Read(Cursor_QuantityItem); - if (Cursor_ai == "true") - { - ai = true; - } - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - EntityAI oCursorObj = EntityAI.Cast(GetGame().CreateObject( Cursor_Item, Cursor_Pos, false, ai )); - //obEditor.addObject( oCursorObj ); - - if ( oCursorObj.IsInherited( ItemBase ) ) - { - oItem = ItemBase.Cast(oCursorObj); - SetupSpawnedItem( oItem, oItem.GetMaxHealth(), 1 ); - - quantity = 0; - text = Cursor_QuantityItem; - text.ToUpper(); - - if (text == "MAX") - { - quantity = oItem.GetQuantityMax(); - } else - { - quantity = text.ToInt(); - } - oItem.SetQuantity(quantity); - return; - } - oCursorObj.PlaceOnSurface(); - TL().status(sender, Cursor_Item + " Spawned"); - } - } - - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - } - break; - - case M_RPCs.M_Admin_Menu_Heal: - if ( GetGame().IsServer() ) - { - - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - //AdminIdentity = Admin.GetIdentity(); - //AdminUID = AdminIdentity.GetId(); - Print(AdminUID); - Admin.GetMaxHealth( "", "" ); - Admin.SetHealth( "","Blood", Admin.GetMaxHealth( "", "Blood" ) ); - Admin.SetHealth( "GlobalHealth", "Health", Admin.GetMaxHealth( "GlobalHealth", "Health" ) ); - Admin.GetStatHeatComfort().Set(0); - Admin.GetStatTremor().Set(0); - Admin.GetStatWet().Set(0); - Admin.GetStatEnergy().Set(20000); - Admin.GetStatWater().Set(5000); - Admin.GetStatStomachEnergy().Set(20000); - Admin.GetStatStomachWater().Set(5000); - Admin.GetStatStomachVolume().Set(0); - Admin.GetStatDiet().Set(2500); - Admin.GetStatSpecialty().Set(1); - Admin.SetBleedingBits(0); - TL().status(sender, sender.GetName() + " Healed"); - } - } - break; - - case M_RPCs.M_Admin_Menu_Strip: - string item; - Param1 stringParam; - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - for ( int a = 0; a < players.Count(); ++a ) - { - selectedPlayer = PlayerBase.Cast(players.Get(a)); - selectedIdentity = selectedPlayer.GetIdentity(); - if ( selectedIdentity.GetName() == PlayerName ) - { - selectedPlayer.RemoveAllItems(); - TL().status(sender, selectedIdentity.GetName() + " Striped"); - } - } - } - } - break; - - case M_RPCs.M_Admin_Menu_TpTo: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - array playerstptp = new array; - GetGame().GetPlayers( playerstptp ); - vector AdminPos; - AdminPos = Admin.GetPosition(); - for ( int it = 0; it < playerstptp.Count(); ++it ) - { - PlayerBase Targettpto = PlayerBase.Cast(playerstptp.Get(it)); - selectedIdentity =playerstptp.Get(it).GetIdentity(); - if ( selectedIdentity.GetName() == PlayerName ) - { - Targettpto.SetPosition( AdminPos ); - TL().status(sender, PlayerName + " Teleported"); - } - } - } - } - break; - - case M_RPCs.M_Admin_Menu_TpMe: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - for ( int zm = 0; zm < players.Count(); ++zm ) - { - if ( players.Get(zm).GetIdentity().GetName() == PlayerName ) - { - Admin.SetPosition(players.Get(zm).GetPosition()); - TL().status(sender, "Telepported to " + PlayerName); - } - } - } - } - break; - - case M_RPCs.M_Admin_Menu_TpMeToPos: - string TpDestination; - ctx.Read( TpDestination ); - if ( GetGame().IsServer() ) - { - - TStringArray strs = new TStringArray; - vector vecTpDestination = TpDestination.ToVector(); - TpDestination.Split(" ", strs ); - float x = strs.Get(0).ToFloat(); - float y = strs.Get(2).ToFloat(); - float z = 0.0; - string Vec = "" + strs.Get(0).ToFloat() + "0.0" + strs.Get(2).ToFloat(); - //vector ofixPlayerPos = Vector(x, 0.0, y) - //vector ofixPlayerPos = Vector( x, z, y ); - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - //vector position = strs.Get(0) + " 0 " + strs.Get(2); - vector position = TpDestination.ToVector(); - vector ofixPlayerPos; - ofixPlayerPos[0] = strs.Get(0).ToFloat(); - ofixPlayerPos[2] = strs.Get(2).ToFloat(); - - ofixPlayerPos = SnapToGround( ofixPlayerPos ); - Admin.SetPosition(ofixPlayerPos); - TL().status(sender, "Telepported to " + ofixPlayerPos.ToString(false) ); - } - } - break; - - - case M_RPCs.M_Admin_Menu_TpMeToPosVec: - // Param2 teleParam - // Param1 teleParam - float X, Y; - ctx.Read(X); - ctx.Read(Y); - Print(" Param2 = " + X + " Param 0 = " + Y); - float atlZ = GetGame().SurfaceY(X, Y); - vector reqpos = Vector(X, atlZ, Y); - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - Admin.SetPosition(reqpos); - TL().status(sender, "Telepported to " + reqpos.ToString(false) ); - } - } - break; - - case M_RPCs.M_Admin_Menu_TpAllMe: - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - int tpCount = TeleportAllPlayersTo(Admin); - string msgc = "All " + tpCount.ToString() + " Players Teleported here"; - TL().status(sender, msgc ); - } - } - break; - - case M_RPCs.M_Admin_Menu_Spawn_Car: - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - Car MyNiva; - vector position22 = Admin.GetPosition(); - float adminHeading = MiscGameplayFunctions.GetHeadingAngle(Admin); - vector posModifier = Vector(-(3 * Math.Sin(adminHeading)), 0, 3 * Math.Cos(adminHeading)); - - MyNiva = Car.Cast(GetGame().CreateObject( "OffroadHatchback", position22 + posModifier, false, true, true )); - MyNiva.GetInventory().CreateAttachment("HatchbackHood"); - MyNiva.GetInventory().CreateAttachment("HatchbackTrunk"); - MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); - MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); - MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); - MyNiva.GetInventory().CreateAttachment("HatchbackWheel"); - MyNiva.GetInventory().CreateAttachment("SparkPlug"); - MyNiva.GetInventory().CreateAttachment("CarRadiator"); - MyNiva.GetInventory().CreateAttachment("CarBattery"); - - MyNiva.Fill( CarFluid.FUEL, MyNiva.GetFluidCapacity( CarFluid.FUEL ) ); - MyNiva.Fill( CarFluid.OIL, MyNiva.GetFluidCapacity( CarFluid.OIL ) ); - MyNiva.Fill( CarFluid.BRAKE, MyNiva.GetFluidCapacity( CarFluid.BRAKE ) ); - MyNiva.Fill( CarFluid.COOLANT, MyNiva.GetFluidCapacity( CarFluid.COOLANT ) ); - TL().status(sender, "Car spawned and filled" ); - } - } - - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - } - break; - - case M_RPCs.M_Admin_Menu_Car_Refill: - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - ref array nearest_objects = new array; - ref array proxy_cargos = new array; - Car toBeFilled; - vector position1 = Admin.GetPosition(); - GetGame().GetObjectsAtPosition ( position1, 10, nearest_objects, proxy_cargos ); - - for (int i = 0; i < nearest_objects.Count(); i++) - { - if (nearest_objects[i].IsKindOf("CarScript")) - { - toBeFilled = Car.Cast(nearest_objects[i]); - float fuelReq = toBeFilled.GetFluidCapacity( CarFluid.FUEL ) - (toBeFilled.GetFluidCapacity( CarFluid.FUEL ) * toBeFilled.GetFluidFraction( CarFluid.FUEL )); - float oilReq = toBeFilled.GetFluidCapacity( CarFluid.OIL ) - (toBeFilled.GetFluidCapacity( CarFluid.OIL ) * toBeFilled.GetFluidFraction( CarFluid.OIL )); - float coolantReq = toBeFilled.GetFluidCapacity( CarFluid.COOLANT ) - (toBeFilled.GetFluidCapacity( CarFluid.COOLANT ) * toBeFilled.GetFluidFraction( CarFluid.COOLANT )); - float brakeReq = toBeFilled.GetFluidCapacity( CarFluid.BRAKE ) - (toBeFilled.GetFluidCapacity( CarFluid.BRAKE ) * toBeFilled.GetFluidFraction( CarFluid.BRAKE )); - toBeFilled.Fill( CarFluid.FUEL, fuelReq ); - toBeFilled.Fill( CarFluid.OIL, oilReq ); - toBeFilled.Fill( CarFluid.COOLANT, coolantReq ); - toBeFilled.Fill( CarFluid.BRAKE, brakeReq ); - TL().status(sender, "Car filled" ); - } - } - } - } - break; - - case M_RPCs.M_Admin_Menu_Day: - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - //TODO CHANGEABLE - GetGame().GetWorld().SetDate( 1988, 5, 23, 12, 0 ); - TL().status(sender, "Time Set to Day" ); - } - } - break; - - case M_RPCs.M_Admin_Menu_Night: - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - GetGame().GetWorld().SetDate( 1988, 9, 23, 22, 0 ); - TL().status(sender, "Time Set to Night" ); - } - } - break; - - case M_RPCs.M_Admin_Menu_Kill: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - for ( int ig = 0; ig < players.Count(); ++ig ) - { - PlayerBase Target = PlayerBase.Cast(players.Get(ig)); - if ( Target.GetIdentity().GetName() == PlayerName ) - { - Target.SetHealth(0); - TL().status(sender, PlayerName + "Killed" ); - } - } - } - } - break; - - case M_RPCs.M_Admin_Menu_KillAll: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - for ( int ig1 = 0; ig1 < players.Count(); ++ig1 ) - { - PlayerBase Target1 = PlayerBase.Cast(players.Get(ig1)); - Target1.SetHealth(0); - } - TL().status(sender, "All Player Killed" ); - } - } - break; - - case M_RPCs.M_Admin_Menu_HealAll: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - for ( int ig2 = 0; ig2 < players.Count(); ++ig2 ) - { - PlayerBase Target2 = PlayerBase.Cast(players.Get(ig2)); - Target2.GetMaxHealth( "", "" ); - Target2.SetHealth( "","Blood", Admin.GetMaxHealth( "", "Blood" ) ); - Target2.SetHealth( "GlobalHealth", "Health", Admin.GetMaxHealth( "GlobalHealth", "Health" ) ); - Target2.GetStatHeatComfort().Set(0); - Target2.GetStatTremor().Set(0); - Target2.GetStatWet().Set(0); - Target2.GetStatEnergy().Set(20000); - Target2.GetStatWater().Set(5000); - Target2.GetStatStomachEnergy().Set(20000); - Target2.GetStatStomachWater().Set(5000); - Target2.GetStatStomachVolume().Set(0); - Target2.GetStatDiet().Set(2500); - Target2.GetStatSpecialty().Set(1); - Target2.SetBleedingBits(0); - } - TL().status(sender, "All Player Healed" ); - } - } - break; - - case M_RPCs.M_Admin_Menu_StripAll: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - for ( int ig3 = 0; ig3 < players.Count(); ++ig3 ) - { - PlayerBase Target3 = PlayerBase.Cast(players.Get(ig3)); - Target3.RemoveAllItems(); - } - TL().status(sender, "All Player Striped" ); - } - } - - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - } - break; - - case M_RPCs.M_Admin_Menu_Stamina_Enable: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - GetFileHandler().SetPermission("DisableStamina", PermissionType.DISALLOW, GetPlayerIdentityFromName(PlayerName).GetId()); - TL().status(sender, "Stamina reset Removed for " + PlayerName); - } - } - break; - - case M_RPCs.M_Admin_Menu_Stamina_Dissable: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - GetFileHandler().SetPermission("DisableStamina", PermissionType.ALLOW, GetPlayerIdentityFromName(PlayerName).GetId()); - TL().status(sender, "Stamina reset Added for " + PlayerName); - } - } - break; - - case M_RPCs.M_Admin_Menu_Player_Stamina_Request: - ctx.Read( stringParam ); - PlayerName = stringParam.param1; - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - if(GetFileHandler().HasPermission("DisableStamina", GetPlayerIdentityFromName(PlayerName)) - { - ScriptRPC IsStamina = new ScriptRPC(); - IsStamina.Write(PlayerName); - IsStamina.Send(NULL, M_RPCs.M_Admin_Menu_Player_Stamina_ok, false, AdminIdentity); - }else - { - ScriptRPC IsStamina2 = new ScriptRPC(); - IsStamina2.Write("NULL"); - IsStamina2.Send(NULL, M_RPCs.M_Admin_Menu_Player_Stamina_ok, false, AdminIdentity); - } - } - } - break; - - case M_RPCs.M_Admin_Menu_Teleport_RequestData: - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - GetFileHandler().LoadTeleport(); - ref array TpName = new ref array< string >; - ref array TpPos = new ref array< vector >; - for ( i = 0; i < GetFileHandler().RootTeleport.Children.Count(); i++ ) - { - TpName.Insert(GetFileHandler().RootTeleport.Children[i].LocationName) - TpPos.Insert(GetFileHandler().RootTeleport.Children[i].LocationPos) - } - ScriptRPC Adding = new ScriptRPC(); - Adding.Write(TpName); - Adding.Write(TpPos); - Adding.Send(NULL, M_RPCs.M_Admin_Menu_Teleport_ReciveData, false, Admin.GetIdentity()); - } - } - break; - - case M_RPCs.M_Admin_Menu_PM: - string MSG; - string MSGName;//Vector Postition - ctx.Read(MSG); - ctx.Read(MSGName); - if ( GetGame().IsServer() ) - { - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - for ( int z1 = 0; z1 < players.Count(); ++z1 ) - { - selectedPlayer = PlayerBase.Cast(players.Get(z1)); - selectedIdentity = selectedPlayer.GetIdentity(); - if ( selectedIdentity.GetName() == MSGName ) - { - Msgparam = new Param1( MSG ); - GetGame().RPCSingleParam(NULL , ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, selectedIdentity); - TL().status(sender, "Message Sent to " + selectedIdentity.GetName()); - } - } - } - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - } - break; - - case M_RPCs.M_Admin_Menu_Map_Player_Request: - string PosName; - vector Pos1; //Vector Postition - ctx.Read(PosName); - ctx.Read(Pos1); - if ( GetGame().IsServer() ) - { - - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - GetServerMission().SendPosTOAdmins(); - } - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - - } - break; - - case M_RPCs.M_Admin_Menu_Player_List_Request: - if ( GetGame().IsServer() ) - { - - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - array playerss = new array; - array allplayers = new array; - GetGame().GetPlayers( playerss ); - for ( i = 0; i < playerss.Count(); ++i) - { - PlayerBase currentPlayer = PlayerBase.Cast(playerss.Get(i)); - string playername = currentPlayer.GetIdentity().GetName(); - allplayers.Insert(playername) - } - ScriptRPC Plist = new ScriptRPC(); - Plist.Write(allplayers); - Plist.Send(NULL, M_RPCs.M_Admin_Menu_Player_List, true, sender); - - } - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - - } - break; - - case M_RPCs.M_Admin_Menu_Player_Health_Request: - Param1 stringParamss; - ctx.Read( stringParamss ); - string RecPlayer = stringParamss.param1; - Print("Health Request"); - PlayerBase HealthPlayer; - if ( GetGame().IsServer() ) - { - - array playerssh = new array; - - GetGame().GetPlayers( playerssh ); - for ( i = 0; i < playerssh.Count(); ++i) - { - HealthPlayer = PlayerBase.Cast(playerssh.Get(i)); - string playername1 = HealthPlayer.GetIdentity().GetName(); - Print("Curretn = " + playername1 + "Looking for " + RecPlayer); - if(playername1 == RecPlayer) - { - ref FPPlayer HPlayer = NULL; - ref PlayerDataN HData = new ref PlayerDataN; - HPlayer = GetFileHandler().GetPlayerByIdentity(HealthPlayer.GetIdentity()); - HData = HPlayer.Data; - Admin = GetServerMission().IsAdminID(sender.GetName(), sender); - if ( Admin != NULL) - { - DebugMonitorValues values = HealthPlayer.GetDebugMonitorValues(); - string health, blood, HPos; - health = HData.FHealth.ToString(); - blood = HData.FBlood.ToString(); - HPos = HData.VPosition.ToString(); - Print("Healt Player Found " + health); - ScriptRPC PPos = new ScriptRPC(); - PPos.Write(health); - PPos.Write(blood); - PPos.Write(HPos); - PPos.Send(NULL, M_RPCs.M_Admin_Menu_Player_Health, false, AdminIdentity); - } - } - - - } - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - - } - break; - - - - } - } - - ref PlayerBase GetPlayerBaseFromName(string name) - { - array players = new array; - GetGame().GetPlayers( players ); - PlayerBase Target; - for ( int ig = 0; ig < players.Count(); ++ig ) - { - Target = PlayerBase.Cast(players.Get(ig)); - if ( Target.GetIdentity().GetName() == name ) - { - return Target; - } - } - return Target; - } - - ref PlayerIdentity GetPlayerIdentityFromName(string name) - { - array players = new array; - GetGame().GetPlayers( players ); - PlayerBase Target; - PlayerIdentity TargetIdent; - for ( int ig = 0; ig < players.Count(); ++ig ) - { - Target = PlayerBase.Cast(players.Get(ig)); - TargetIdent = Target.GetIdentity(); - if ( TargetIdent.GetName() == name ) - { - return TargetIdent; - } - } - return TargetIdent; - } - - void status(PlayerIdentity ident, string msg) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_MessageStatus, new Param1( msg ), false, ident ); - } - - void SendRPC() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu, new Param1( GetCursorPos() ), false, AdminIdentity ); - } - - void SendRPCItem(string item) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_Ground, new Param1(item), false, AdminIdentity ); - } - - - void SendRPCHeal() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Heal, new Param1(""), false, AdminIdentity ); - } - - void SendRPCStrip(string PlayerName) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Strip, new Param1(PlayerName), false, AdminIdentity ); - } - - void SendRPCTpTo(string PlayerName) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpTo, new Param1(PlayerName), false, AdminIdentity ); - } - - void SendRPCTpMe(string PlayerName) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpMe, new Param1(PlayerName), false, AdminIdentity ); - } - - void SendRPCTpAllMe() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpAllMe, new Param1(""), false, AdminIdentity ); - } - - void SendRPCSpCar() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_Car, new Param1(""), false, AdminIdentity ); - } - - void SendRPCDay() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Day, new Param1(""), false, AdminIdentity ); - } - - void SendRPCNight() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Night, new Param1(""), false, AdminIdentity ); - } - - void SendRPCRefill() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Car_Refill, new Param1(""), false, AdminIdentity ); - } - - - - void SendRPCTpToPos(string pos) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpToPos, new Param1(pos), false, AdminIdentity ); - } - - void SendRPCKill(string PlayerName) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Kill, new Param1(PlayerName), false, AdminIdentity ); - } - - void SendRPCSpWear() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_SpWear, new Param1(""), false, AdminIdentity ); - } - - - - - vector SnapToGround(vector pos) - { - float pos_x = pos[0]; - float pos_z = pos[2]; - float pos_y = GetGame().SurfaceY( pos_x, pos_z ); - vector tmp_pos = Vector( pos_x, pos_y, pos_z ); - tmp_pos[1] = tmp_pos[1] + pos[1]; - - return tmp_pos; - } - - int TeleportAllPlayersTo(PlayerBase Admin) - { - array players = new array; - GetGame().GetPlayers( players ); - - vector AdminPos; - AdminPos = Admin.GetPosition(); - - for ( int i = 0; i < players.Count(); ++i ) - { - PlayerBase Target = PlayerBase.Cast(players.Get(i)); - Target.SetPosition( AdminPos ); - } - return i; - } - - - void oSpawnItemFunc(int ground, string ClassName)//2nd PlayerBase player - { - EntityAI item; - ItemBase itemBs - - vector NewPosition; - vector OldPosition; - - if (ground == 1) - { - OldPosition = Admin.GetPosition(); - - NewPosition[0] = OldPosition[0] + 1.5; - NewPosition[1] = OldPosition[1] + 0.1; - NewPosition[2] = OldPosition[2] + 1.5; - GetGame().CreateObject( ClassName, NewPosition, false, true ); - }else{ - - item = Admin.GetInventory().CreateInInventory( ClassName ); - itemBs = ItemBase.Cast(item); - itemBs.SetQuantity(1); - } - } - - - -} -ref AdminMenu Tomato_AdminMenuM; -ref AdminMenu GetAdminM() -{ - if( !Tomato_AdminMenuM ) - { - Tomato_AdminMenuM = new ref AdminMenu(); - } - - return Tomato_AdminMenuM; -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/AdminMenuManager.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/AdminMenuManager.c deleted file mode 100644 index 34a68ab..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/AdminMenuManager.c +++ /dev/null @@ -1,184 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class AdminMenuManager -{ - - static bool Config_Teleport = false; - static bool Config_Cam = false; - static 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.30"; - static ref map m_PlayerLocations; - static ref map 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() - { - m_PlayerLocations = new map; - m_TeleportLocations = new map; - //LoadTeleportLocations(); - // GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.MessageClose, 1000, true ); - } - - void Teleport() - { - if (Config_Teleport) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, new Param1( GetCursorPos() ), false, NULL ); - } - } - - void Map_Teleport() - { - if (Config_Teleport) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, new Param1( 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) - { - 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( "" ), 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( msg ), false, ident ); - } - - void SendTeleportList(PlayerIdentity admin) - { - - string save; - string a =";"; - vector v; - - - ScriptRPC TList = new ScriptRPC(); - TList.Write(m_TeleportLocations); - TList.Send(NULL, M_RPCs.M_Admin_Menu_Teleport_List, false, admin); - - - - } - void LoadTeleportLocations(PlayerIdentity admin) - { - m_TeleportLocations.Clear(); - FileHandle TpList = OpenFile(m_TeleportLocationsPath, FileMode.READ); - if (TpList != 0) - { - string a =";"; - int i = 0; - string line_content = ""; - while ( FGets(TpList,line_content) > 0 ) - { - TStringArray strs = new TStringArray; - m_TeleportLocations.Insert(i,line_content); //int Name, posvector - i++; - } - CloseFile(TpList); - SendTeleportList(admin); - } - } - - - - - - void AddTeleportLocations() - { - - } - -} - -ref AdminMenuManager Tomato_AdminMenuManager; - -ref AdminMenuManager GetAdminMenuManager() -{ - if( !Tomato_AdminMenuManager ) - { - Tomato_AdminMenuManager = new ref AdminMenuManager(); - } - - return Tomato_AdminMenuManager; -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/ChatModule.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/ChatModule.c deleted file mode 100644 index 74c59d5..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/ChatModule.c +++ /dev/null @@ -1,143 +0,0 @@ - /* - 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 . - */ -typedef Param4 ChatParams; -class ChatModules -{ - - protected ref map m_Commands; - - void ChatModules() - { - m_Commands = new map; //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 players = new array; - 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 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 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 CheckCommand(string CommandLine) - { - ref array ret = new array; - 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; -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevCam.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevCam.c deleted file mode 100644 index 9b194ee..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevCam.c +++ /dev/null @@ -1,138 +0,0 @@ - /* - 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. - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ - -class DevCam -{ - void DevCam() - { - GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); - } - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - if ( rpc_type == M_RPCs.M_SET_CAM ) - { - if ( GetGame().IsServer() ) - { - Print( " receive rpc dev cam is server"); - - ref PlayerBase player = PlayerBase.Cast(GetServerMission().GetPlayerFromIdentity( sender )); - - Param3< bool, vector, bool > camParams; - ctx.Read( camParams ); - - bool spectating = camParams.param1; - vector pos = camParams.param2; - 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 ); - } - else - { - SetFreezePlayer( player, true ); - GetGame().SelectSpectator( sender, "DayZSpectator", GetServerMission().GetPlayerFromIdentity( sender ).GetPosition() ); - } - } - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { // test if setting camera works on client side. instead of server side ^ - } - - } - - if ( rpc_type == M_RPCs.M_SET_CAM_Spectate ) - { - Print("rpc spec"); - if ( GetGame().IsServer() ) - { - array players = new array; - 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 ^ - } - - } - } - - void SendRPC( bool isSpectating, vector toPos ) - { - Print("Send Cam RPC"); - GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM, new Param2< bool, vector >( isSpectating, toPos ), false, NULL ); - } -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevTeleport.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevTeleport.c deleted file mode 100644 index 2a0223d..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/DevTeleport.c +++ /dev/null @@ -1,65 +0,0 @@ - /* - 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. - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class DevTeleport -{ - void DevTeleport() - { - GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); - } - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - if ( rpc_type == M_RPCs.M_TELEPORT ) - { - vector positionToTeleport; - - Param1 vectorParam; - ctx.Read( vectorParam ); - - positionToTeleport = vectorParam.param1; - - if ( GetGame().IsServer() ) - { - ref PlayerBase player = PlayerBase.Cast(GetServerMission().GetPlayerFromIdentity( sender )); - // permission check - server mission file - // if has permissions send message back to client - if (GetFileHandler().HasPermission("Admin", sender) ) - - { - player.SetPosition( positionToTeleport ); //set player position on server side - - GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, vectorParam, false, NULL ); - } - } - - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - //GetPlayer().SetPosition( positionToTeleport ); //client side - } - } - } - - void SendRPC() - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_TELEPORT, new Param1( GetCursorPos() ), false, NULL ); - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Config/ConfigModule.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Config/ConfigModule.c deleted file mode 100644 index 6559c1e..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Config/ConfigModule.c +++ /dev/null @@ -1,66 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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(); - - - } - -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PermissionBase.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PermissionBase.c deleted file mode 100644 index ced711b..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PermissionBase.c +++ /dev/null @@ -1,168 +0,0 @@ - /* - 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; - - - } - - } -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PlayerModule.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PlayerModule.c deleted file mode 100644 index afa7e7b..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PlayerModule.c +++ /dev/null @@ -1,591 +0,0 @@ - /* - 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 Dstring = new ref array ; - ref array Dstring1 = new ref array ; - 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; - } - } - -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Teleport/TeleportModule.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Teleport/TeleportModule.c deleted file mode 100644 index 8b56e93..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Teleport/TeleportModule.c +++ /dev/null @@ -1,33 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class TeleportModule -{ - void TeleportModule() - { - - } - - void Init() - { - GetFileHandler().CheckAndCreateFiles(); - GetFileHandler().LoadTeleport(); - } - -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuAbout.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuAbout.c deleted file mode 100644 index e515d0c..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuAbout.c +++ /dev/null @@ -1,44 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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() - { - - } - -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuCommands.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuCommands.c deleted file mode 100644 index 4a3a797..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuCommands.c +++ /dev/null @@ -1,204 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class AdminMenuGuiCommands extends ScriptedWidgetEventHandler -{ - protected Widget m_Root; - - - - protected AdminMenuGui m_Menu; - CheckBoxWidget m_Config_Teleport; - CheckBoxWidget m_Config_Cam; - protected ref map> m_TextMap; - - protected ButtonWidget m_Command_Day; - protected ButtonWidget m_Command_Night; - protected ButtonWidget m_Command_Refill; - protected ButtonWidget m_Command_HealButton; - protected ButtonWidget m_Command_SpCar; - protected ButtonWidget m_Command_Cam; - protected ButtonWidget m_Command_CamTp; - protected ButtonWidget m_Command_DelObj; - protected ButtonWidget m_Command_Test; - protected ref map m_TestList; - protected string m_TestListPath = "$CurrentDir:\\DayZ-SA-Tomato\\Config\\"; - - ref AdminMenuManager AMenuM; - - void AdminMenuGuiCommands( Widget parent, AdminMenuGui menu ) - { - - m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Commands.layout", parent ); - - m_Menu = menu; - - m_Config_Teleport = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Config_Teleport" ) ); - m_Config_Cam = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Config_Cam" ) ); - - m_Command_HealButton = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Heal" ) ); - m_Command_SpCar = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_SpCar" ) ); - m_Command_Day = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Day" ) ); - m_Command_Night = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Night" ) ); - m_Command_Refill = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Refill" ) ); - m_Command_Cam = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Cam" ) ); - m_Command_CamTp = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_CamTp" ) ); - m_Command_DelObj = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_DelObj" ) ); - - m_Command_Test = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Command_Test" ) ); - - if (AMenuM.Config_Cam) - { - m_Config_Cam.SetChecked(true); - }else - { - m_Config_Cam.SetChecked(false); - } - - if (AMenuM.Config_Teleport) - { - m_Config_Teleport.SetChecked(true); - }else - { - m_Config_Teleport.SetChecked(false); - } - - } - - bool Click(Widget w, int x, int y, int button) - { - PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() ); - if (player) - { - if( ( w == m_Command_HealButton ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Heal, new Param1(""), false, NULL ); - return true; - } - - - if( ( w == m_Command_SpCar ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_Car, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_Command_Day ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Day, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_Command_Night ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Night, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_Command_Refill ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Car_Refill, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_Command_DelObj ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Delete_Object, new Param1(GetCursorObject( 50.0, GetGame().GetPlayer(), 0.01 )), false, NULL ); - return true; - } - - if( ( w == m_Command_Test ) ) - { - string msg; - msg = "TestLog"; - //GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TestConf, new Param1( msg ), false, NULL ); - return true; - } - return true; - } - 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) - { - AMenuM.Config_Teleport = false; - }else - { - AMenuM.Config_Teleport = true; - } - } - - void Set_Cam() - { - if (AMenuM.Config_Cam) - { - AMenuM.Config_Cam = false; - }else - { - AMenuM.Config_Cam = true; - } - } - - void ~AdminMenuGuiCommands() - { - } - - void Focus() - { - - } - - - override bool OnFocus( Widget w, int x, int y ) - { - if( m_Menu ) - m_Menu.OnFocus( w, x, y ); - if( w ) - { - Param2 p = m_TextMap.Get( w.GetUserID() ); - if( p ) - { - return true; - } - } - return ( w != null ); - } - - void Message( string txt ) - { - GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); - } -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuGui.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuGui.c deleted file mode 100644 index 9cf4814..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuGui.c +++ /dev/null @@ -1,404 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class AdminMenuGui extends UIScriptedMenu -{ - protected TabberUI m_Tabber; - protected ref AdminMenuGuiCommands m_CommandTab; - protected ref AdminMenuGuiSpawn m_SpawnTab; - protected ref AdminMenuGuiPlayer m_PlayerTab; - protected ref AdminMenuGuiMap m_MapTab; - protected ref AdminMenuGuiTeleport m_TeleportTab; - protected ref AdminMenuGuiAbout m_AboutTab; - protected ref AdminMenuGuiTeleport m_todo; - protected ref AdminMenuGuiTeleport m_todo2; - ref AdminMenuManager AMenuM; - protected ref map m_TestListS; - protected string m_TestListPath = "$CurrentDir:\\DayZ-SA-Tomato\\"; - ref array Locations; - protected ButtonWidget m_Back; - protected TextWidget m_txt_Main_Ver; - static MultilineTextWidget m_txt_Main_Status; - - void AdminMenuGui() - { - ref array Locations = new ref array; - 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 ) { - okstap = m_SpawnTab.OnItemSelect(w, x, y, row, column, oldRow, oldColumn); - return okstap; - } - return okstap; - } - - void Message( string txt ) - { - GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); - } - - override bool OnChange( Widget w, int x, int y, bool finished ) - { - if ( w == m_PlayerTab.m_PlayerList ) - { - m_PlayerTab.PlayerSelect(); - return true; - } - - if ( w == m_SpawnTab.m_Spawn_SearchBox ) - { - m_SpawnTab.UpdateList( "All" ); - return true; - } - - if ( w == m_CommandTab.m_Config_Teleport ) - { - m_CommandTab.Set_Teleport(); - return true; - } - - if ( w == m_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; - } - - return false; - } - - - void ItemPrevCall(EntityAI item) - { - m_SpawnTab.OnItemSelect2(item); - } - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - switch(rpc_type) - { - - case (int)M_RPCs.M_Admin_Menu_MessageStatus: - Param1 MenuMessagep; - ctx.Read( MenuMessagep ); - string MenuMessage = MenuMessagep.param1; - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - SetStatus(MenuMessage); - } - break; - } - } - - - - override Widget Init() - { - layoutRoot = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Main.layout", null ); - - layoutRoot.FindAnyWidget( "Tabber" ).GetScript( m_Tabber ); - - - - m_CommandTab = new AdminMenuGuiCommands( layoutRoot.FindAnyWidget( "Tab_0" ), this ); - m_SpawnTab = new AdminMenuGuiSpawn( layoutRoot.FindAnyWidget( "Tab_1" ), this ); - m_PlayerTab = new AdminMenuGuiPlayer( layoutRoot.FindAnyWidget( "Tab_2" ), this ); - m_MapTab = new AdminMenuGuiMap( layoutRoot.FindAnyWidget( "Tab_3" ), this ); - m_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 ); - 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 - bool ok = false; - if ( w.GetName().Contains("_spawn_") ) - { - ok = m_SpawnTab.Click(w, x, y, button); - return ok; - } - - //TeleportTab - if ( w.GetName().Contains("_Teleport_") ) - { - ok = m_TeleportTab.Click(w, x, y, button); - return ok; - } - - //CommandTab - if ( w.GetName().Contains("_Command_") ) - { - ok = m_CommandTab.Click(w, x, y, button); - return ok; - } - - //PlayerTab - if ( w.GetName().Contains("_Player_") ) - { - ok = m_PlayerTab.Click(w, x, y, button); - return ok; - } - - //Main Widget - if( button == MouseState.LEFT ) - { - if( w == m_Back ) - { - Back(); - return true; - } - } - return false; - } - - void OnTabSwitch( int tab ) - { - switch( tab ) - { - case 0: - { - m_CommandTab.Focus(); - break; - } - case 1: - { - m_SpawnTab.Focus(); - break; - } - case 2: - { - m_PlayerTab.Focus(); - break; - } - case 3: - { - m_TeleportTab.Focus(); - break; - } - case 4: - { - m_MapTab.Focus(); - break; - } - case 5: - { - m_AboutTab.Focus(); - break; - } - case 6: - { - //m_AboutTab.Focus(); - break; - } - } - } - - - void Back() - { - GetGame().EndOptionsVideo(); - GetGame().GetUIManager().Back(); - - } - - - override void OnShow() - { - super.OnShow(); - GetGame().GetUIManager().ShowUICursor( true ); - GetGame().GetInput().ChangeGameFocus( 1 ); - } - - override void OnHide() - { - super.OnHide(); - GetGame().GetUIManager().ShowUICursor( false ); - GetGame().GetInput().ResetGameFocus( ); - } - - -} -ref AdminMenuGui Tomato_AdminMenu; - -ref AdminMenuGui GetAdminMenu() -{ - if( !Tomato_AdminMenu ) - { - Tomato_AdminMenu = new ref AdminMenuGui(); - } - - return Tomato_AdminMenu; -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMap.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMap.c deleted file mode 100644 index f56c5a7..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMap.c +++ /dev/null @@ -1,223 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class AdminMenuGuiMap extends ScriptedWidgetEventHandler -{ - protected Widget m_Root; - - 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> 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_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(""), false, NULL ); - - if (GetAdminMenuManager().Config_Map_Teleport) - { - 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() - { - - } - - void Message( string txt ) - { - // GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); - } - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - switch(rpc_type) - { - - case M_RPCs.M_Admin_Menu_Map_Player: - string PosName; - vector Pos1; //Vector Postition - ctx.Read(PosName); - ctx.Read(Pos1); - if ( GetGame().IsServer() ) - { - - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - AddPlayerMarker(PosName, Pos1); - } - break; - } - } - - - void AddPlayerMarker(string name, vector pos) - { - m_Map_Map.AddUserMark(pos, name, ARGB(255,255,0,0), "\\dz\\gear\\navigation\\data\\map_tree_ca.paa"); - } - - override bool OnFocus( Widget w, int x, int y ) - { - if( m_Menu ) - m_Menu.OnFocus( w, x, y ); - if( w ) - { - Param2 p = m_TextMap.Get( w.GetUserID() ); - if( p ) - { - return true; - } - } - - return ( w != null ); - } - - -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMessage.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMessage.c deleted file mode 100644 index 08d5eab..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMessage.c +++ /dev/null @@ -1,79 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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; -// } \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuPlayer.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuPlayer.c deleted file mode 100644 index 798d309..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuPlayer.c +++ /dev/null @@ -1,379 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler -{ - protected Widget m_Root; - - - ref AdminMenuManager AMenuM; - protected AdminMenuGui m_Menu; - - protected ref map> m_TextMap; - protected ButtonWidget m_btn_Player_Kill; - protected ButtonWidget m_btn_Player_Strip; - protected ButtonWidget m_btn_Player_Heal; - protected ButtonWidget m_btn_Player_TpTo; - protected ButtonWidget m_btn_Player_TpMe; - protected ButtonWidget m_btn_Player_Stamina; - protected ButtonWidget m_btn_Player_KillAll; - protected ButtonWidget m_btn_Player_HealAll; - protected ButtonWidget m_btn_Player_StripAll; - protected ButtonWidget m_btn_Player_TpMeAll; - protected ButtonWidget m_btn_Player_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; - EditBoxWidget m_Box_Player_Message; - CheckBoxWidget m_Cb_Player_Stamina; - TextListboxWidget m_PlayerList; - - void AdminMenuGuiPlayer( Widget parent, AdminMenuGui menu ) - { - - m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_Player.layout", parent ); - - m_Menu = menu; - GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); - m_PlayerList = TextListboxWidget.Cast( m_Root.FindAnyWidget( "Player_Player_List" ) ); - m_Box_Player_Message = EditBoxWidget.Cast( m_Root.FindAnyWidget( "Box_Player_Message" ) ); - m_btn_Player_Strip = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Strip" ) ); - m_btn_Player_Kill = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Kill" ) ); - m_btn_Player_Heal = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Heal" ) ); - m_btn_Player_TpMe = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_tpMe" ) ); - m_btn_Player_TpTo = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_tpto" ) ); - m_btn_Player_Stamina = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_Stamina" ) ); - m_btn_Player_KillAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_KillAll" ) ); - m_btn_Player_HealAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_HealAll" ) ); - m_btn_Player_StripAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_StripAll" ) ); - m_btn_Player_TpMeAll = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Player_tpMeAll" ) ); - m_btn_Player_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" ) ); - m_Text_Player_Pos = TextWidget.Cast( m_Root.FindAnyWidget( "Text_Player_Pos" ) ); - m_Cb_Player_Stamina = CheckBoxWidget.Cast( m_Root.FindAnyWidget( "Cb_Player_Stamina" ) ); - //PlayerList(); - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_List_Request, new Param1(""), false, NULL ); - - } - - - void LogD(string s) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Log_Debug, new Param1( s ), false, NULL ); - } - bool Click(Widget w, int x, int y, int button) - { - PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() ); - string PlayerName; - PlayerName = GetCurrentSelection(); - if (player) - { - if( ( w == m_PlayerList ) ) - { - PlayerSelect(); - return true; - } - - if( ( w == m_btn_Player_Strip ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Strip, new Param1(PlayerName), false, NULL ); - return true; - } - - - if( ( w == m_btn_Player_Kill ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Kill, new Param1(PlayerName), false, NULL ); - return true; - } - - if( ( w == m_btn_Player_Heal ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Heal, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_btn_Player_TpMe ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpMe, new Param1(PlayerName), false, NULL ); - return true; - } - - if( ( w == m_btn_Player_TpTo ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpTo, new Param1(PlayerName), false, NULL ); - return true; - } - - - if( ( w == m_btn_Player_KillAll ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_KillAll, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_btn_Player_HealAll ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_HealAll, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_btn_Player_StripAll ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_StripAll, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_btn_Player_TpMeAll ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_TpAllMe, new Param1(""), false, NULL ); - return true; - } - - if( ( w == m_btn_Player_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 ) ) - { - TL().all(m_Box_Player_Message.GetText()); - return true; - } - return true; - } - return false; - } - void Set_Stamina() - { - - if(m_Cb_Player_Stamina.IsChecked()) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Stamina_Dissable, new Param1(GetCurrentSelection()), false, NULL ); - }else - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Stamina_Enable, new Param1(GetCurrentSelection()), false, NULL ); - - } - } - void ~AdminMenuGuiPlayer() - { - 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() - { - - } - - - override bool OnFocus( Widget w, int x, int y ) - { - if( m_Menu ) - m_Menu.OnFocus( w, x, y ); - if( w ) - { - Param2 p = m_TextMap.Get( w.GetUserID() ); - if( p ) - { - return true; - } - } - - return ( w != null ); - } - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - int i; - switch(rpc_type) - { - - case M_RPCs.M_Admin_Menu_Player_Health: - string health; - string blood - string position; //Vector Postition - ctx.Read(health); - ctx.Read(blood); - ctx.Read(position); - if ( GetGame().IsServer() ) - { - - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - m_Text_Player_Health.SetText(health); - m_Text_Player_Blood.SetText(blood); - m_Text_Player_Pos.SetText(position); - } - - - break; - - case M_RPCs.M_Admin_Menu_Player_Stamina_ok: - string StaminName; - ctx.Read(StaminName); - if ( GetGame().IsServer() ) - { - - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - if(StaminName == "NULL") - { - m_Cb_Player_Stamina.SetChecked(false); - }else if (StaminName == GetCurrentSelection()) - { - m_Cb_Player_Stamina.SetChecked(true); - } - } - - - break; - - case M_RPCs.M_Admin_Menu_Player_List: - array allplayers = new array; - ctx.Read(allplayers); - - if ( GetGame().IsServer() ) - { - - } - if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) - { - 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 UpdateStats()//Remove - { - array players = new array; - 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_Stamina_Request, new Param1(selectedIdentity.GetName()), false, NULL ); - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Health_Request, new Param1(selectedIdentity.GetName()), false, NULL ); - } - } - //GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Health_Request, new Param1(selectedPlayer), false, NULL ); - } - - void PlayerSelect() - { - //GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1(GetCurrentSelection() ), false, NULL ); - array players = new array; - 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(selectedIdentity.GetName()), false, NULL ); - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1(selectedIdentity.GetName()), false, NULL ); - } - } - GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.UpdateStats, 1500, true ); - - } - - void PlayerList() - { - - m_PlayerList.ClearItems(); - array players = new array; - 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( msg ), false, NULL ); - m_PlayerList.AddItem( players.Get(i).GetIdentity().GetName(), NULL, 0 ); - } - } - - string GetCurrentSelection() - { - if ( m_PlayerList.GetSelectedRow() != -1 ) - { - string result; - m_PlayerList.GetItemText( m_PlayerList.GetSelectedRow(), 0, result ); - return result; - } - - return ""; - } - - void Message( string txt ) - { - // GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); - } - - - -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuSpawn.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuSpawn.c deleted file mode 100644 index 05c8285..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuSpawn.c +++ /dev/null @@ -1,519 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class AdminMenuGuiSpawn extends ScriptedWidgetEventHandler -{ - - - protected Widget m_Root; - - protected AdminMenuGui m_Menu; - TextListboxWidget m_classList; - EditBoxWidget m_Spawn_SearchBox; - protected ButtonWidget m_Spawn_btnSpawnGround; - protected ButtonWidget m_Spawn_btnSpawnCursor; - protected ButtonWidget m_Spawn_btnSpawnInventory; - protected ButtonWidget m_Spawn_btnCancel; - EditBoxWidget m_Spawn_QuantityItem; - ItemPreviewWidget m_item_widget; - //ref AdminMenuManager AMenuM; - //private ItemPreviewWidget m_item_widget; - protected EntityAI previewItem; - private int m_characterRotationX; - private int m_characterRotationY; // Borrowed from inspectmenu - private int m_characterScaleDelta; - private vector m_characterOrientation; - - protected EditBoxWidget m_Spawn_editBox; - protected ref map> m_TextMap; - - void AdminMenuGuiSpawn( Widget parent, AdminMenuGui menu ) - { - - m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_spawn.layout", parent ); - - m_Menu = menu; - GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); - m_classList = TextListboxWidget.Cast( m_Root.FindAnyWidget( "classlist" ) ); - m_Spawn_SearchBox = EditBoxWidget.Cast( m_Root.FindAnyWidget( "search_input" ) ); - m_Spawn_btnSpawnGround = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_spawn_ground" ) ); - m_Spawn_btnSpawnCursor = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_spawn_cursorpos" ) ); - m_Spawn_btnSpawnInventory = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_spawn_inventory" ) ); - m_Spawn_btnCancel = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_cancel" ) ); - m_item_widget = ItemPreviewWidget.Cast( m_Root.FindAnyWidget( "ItemPrev" ) ); - m_Spawn_QuantityItem = EditBoxWidget.Cast( m_Root.FindAnyWidget( "quantity_items" ) ); - - m_Spawn_editBox = EditBoxWidget.Cast( m_Root.FindAnyWidget("className_spawner_box") ); - - UpdateList( "All" ); - } - - //TODO - bool Click( Widget w, int x, int y, int button ) - { - - string strSelection = GetCurrentSelection(); - bool ai = false; - - int quantity = 0; - string text = ""; - ItemBase oItem = NULL; - string ai_new = ""; - if ( strSelection == "" ) - { - strSelection = GetEditBoxInput(); - } - - if( strSelection != "" ) - { - strSelection.ToLower(); - //ObjectEditor obEditor = GetModuleManager().GetModule( ObjectEditor ); - if ( GetGame().IsKindOf( strSelection, "DZ_LightAI" ) ) - { - ai = true; - ai_new = "true"; - } - - if( w == m_Spawn_btnSpawnCursor ) - { - - text = m_Spawn_QuantityItem.GetText(); - - ScriptRPC Cursor_rpc = new ScriptRPC(); - Cursor_rpc.Write(strSelection); - Cursor_rpc.Write(GetCursorPos()); - Cursor_rpc.Write(ai_new); - Cursor_rpc.Write(text); - Cursor_rpc.Send(NULL, M_RPCs.M_Admin_Menu_Spawn_Cursor, false, NULL); - - - - - - - text = m_Spawn_QuantityItem.GetText(); - - } - else if ( w == m_Spawn_btnSpawnGround ) - { - EntityAI oObj = EntityAI.Cast(g_Game.CreateObject( strSelection, GetGame().GetPlayer().GetPosition(), false, ai )); - text = m_Spawn_QuantityItem.GetText(); - //RPC Build and Send - ScriptRPC rpc = new ScriptRPC(); - rpc.Write(strSelection); - rpc.Write(ai_new); - rpc.Write(text); - rpc.Send(NULL, M_RPCs.M_Admin_Menu_Spawn_Ground, false, NULL); - - } - else if ( w == m_Spawn_btnSpawnInventory ) - { - text = m_Spawn_QuantityItem.GetText(); - //RPC Build and Send - ScriptRPC Inventory_rpc = new ScriptRPC(); - Inventory_rpc.Write(strSelection); - Inventory_rpc.Write(ai_new); - Inventory_rpc.Write(text); - Inventory_rpc.Send(NULL, M_RPCs.M_Admin_Menu_Spawn_Inventory, false, NULL); - } - } - if ( w.GetName().Contains( "btn_spawn_filter" ) ) - { - string buttonName = w.GetName(); - buttonName.Replace("btn_spawn_filter_", ""); - UpdateList( buttonName ); - - return true; - } - - return false; - - } - - void 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 ); - configs.Insert( CFG_WEAPONSPATH ); - configs.Insert( CFG_MAGAZINESPATH ); - - string strSearch = m_Spawn_SearchBox.GetText(); - - strSearch.ToLower(); - - for ( int nConfig = 0; nConfig < configs.Count(); ++nConfig ) - { - string strConfigPath = configs.Get( nConfig ); - - int nClasses = g_Game.ConfigGetChildrenCount( strConfigPath ); - - for ( int nClass = 0; nClass < nClasses; ++nClass ) - { - string strName; - - g_Game.ConfigGetChildName( strConfigPath, nClass, strName ); - - int scope = g_Game.ConfigGetInt( strConfigPath + " " + strName + " scope" ); - - if ( scope == 0 ) - { - continue; - } - - if ( strName == "Mag_Scout_5Rnd") continue; // fix crash for this dumb item. dont spawn it - - string strNameLower = strName; - - strNameLower.ToLower(); - - if ( GetGame().IsKindOf( strNameLower, classFilter ) || classFilter == "All" ) // Fix for weapon_base not being child of "All" - { - - if ( (strSearch != "" && (!strNameLower.Contains( strSearch ))) ) - { - continue; - } - - if ( strName == "ItemOptics" ) - { - continue; // Fix crash - } - - m_classList.AddItem( strName, NULL, 0 ); - } - } - } - - } - - string GetCurrentSelection() - { - if ( m_classList.GetSelectedRow() != -1 ) - { - string result; - m_classList.GetItemText( m_classList.GetSelectedRow(), 0, result ); - return result; - } - - return ""; - } - - string GetEditBoxInput() - { - return m_Spawn_editBox.GetText(); - } - - bool OnItemSelect( Widget w, int x, int y, int row, int column, int oldRow, int oldColumn) - { - /* - if ( w == m_classList ) - { - EntityAI item; - item = EntityAI.Cast(g_Game.CreateObject( GetCurrentSelection(), vector.Zero, false, false, false )); - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Spawn_ItemPrev, new Param1( GetCurrentSelection() ), false, NULL ); - if (item) - { - //InspectMenuNew.UpdateItemInfo(m_Root, item); - - if (!m_item_widget) - { - if (m_item_widget) - { - float l; - float h; - m_item_widget.GetSize(l, h); - m_item_widget = ItemPreviewWidget.Cast( GetGame().GetWorkspace().CreateWidget(ItemPreviewWidgetTypeID, 0, 0, 1, 1, WidgetFlags.VISIBLE, ARGB(255, 255, 255, 255), 10, m_item_widget) ); - } - } - - m_item_widget.SetItem(item); - m_item_widget.SetView( item.GetViewIndex() ); - m_item_widget.SetModelPosition(Vector(0,0,1)); - - float v, c; - m_item_widget.GetPos(v, c); - - m_item_widget.SetSize( 1.75, 1.75 ); - - // align to center - m_item_widget.SetPos( -0.375, -0.375 ); - - //m_item_widget.SetModelOrientation - //PPEffects.SetBlurInventory(1); - } - return true; - } - return true; - */ - } - - void OnItemSelect2(EntityAI item) - { - /* - - - if (item) - { - //InspectMenuNew.UpdateItemInfo(m_Root, item); - - if (!m_item_widget) - { - Widget preview_frame = m_Root.FindAnyWidget("ItemPrev"); - if (preview_frame) - { - float l; - float h; - preview_frame.GetSize(l, h); - m_item_widget = ItemPreviewWidget.Cast( GetGame().GetWorkspace().CreateWidget(ItemPreviewWidgetTypeID, 0, 0, 1, 1, WidgetFlags.VISIBLE, ARGB(255, 255, 255, 255), 10, preview_frame) ); - } - } - - m_item_widget.SetItem(item); - m_item_widget.SetView( item.GetViewIndex() ); - m_item_widget.SetModelPosition(Vector(0,0,1)); - - float v, c; - m_item_widget.GetPos(v, c); - - m_item_widget.SetSize( 1.75, 1.75 ); - - // align to center - m_item_widget.SetPos( -0.375, -0.375 ); - - //m_item_widget.SetModelOrientation - PPEffects.SetBlurInventory(1); - } - */ - } - - override bool OnMouseButtonDown( Widget w, int x, int y, int button ) - { - if (w == m_item_widget) - { - GetGame().GetDragQueue().Call(this, "UpdateRotation"); - g_Game.GetMousePos(m_characterRotationX, m_characterRotationY); - return true; - } - return false; - } - - override bool OnMouseWheel( Widget w, int x, int y, int wheel ) - { - if ( w == m_item_widget ) - { - GetGame().GetDragQueue().Call(this, "UpdateScale"); - m_characterScaleDelta = wheel ; - } - return false; - } - - void UpdateScale(int mouse_x, int mouse_y, int wheel, bool is_dragging) // Borrowed from inspect menu - { - float w, h, x, y; - m_item_widget.GetPos(x, y); - m_item_widget.GetSize(w,h); - w = w + ( m_characterScaleDelta / 4); - h = h + ( m_characterScaleDelta / 4 ); - if ( w > 0.5 && w < 4 ) - { - m_item_widget.SetSize( w, h ); - - //align to center - int screen_w, screen_h; - GetScreenSize(screen_w, screen_h); - float new_x = x - ( m_characterScaleDelta / 8 ); - float new_y = y - ( m_characterScaleDelta / 8 ); - m_item_widget.SetPos( new_x, new_y ); - } - } - - void UpdateRotation(int mouse_x, int mouse_y, bool is_dragging) // Borrowed from inspect menu - { - vector o = m_characterOrientation; - o[0] = o[0] + (m_characterRotationY - mouse_y); - o[1] = o[1] - (m_characterRotationX - mouse_x); - - m_item_widget.SetModelOrientation( o ); - - if (!is_dragging) - { - m_characterOrientation = o; - } - } - - void ~AdminMenuGuiSpawn() - { - if ( previewItem ) - { - GetGame().ObjectDelete( previewItem ); - delete m_item_widget; - } - } - - void Focus() - { - - } - - override bool OnChange( Widget w, int x, int y, bool finished ) - { - if ( w == m_Spawn_SearchBox ) - { - UpdateList( "All" ); - return true; - } - - return false; - } - - bool OnMouseLeave( Widget w, Widget enterW, int x, int y ) - { - if ( w == m_Spawn_SearchBox ) - { - GetPlayer().GetInputController().OverrideMovementSpeed( false, 0 ); - } - return false; - } - - bool OnMouseEnter( Widget w , int x, int y ) - { - if ( w == m_Spawn_SearchBox ) - { - GetPlayer().GetInputController().OverrideMovementSpeed( true, 0 ); - } - return false; - } - - void Message( string txt ) - { - // GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); - } - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - switch(rpc_type) - { - - case M_RPCs.M_Admin_Menu_Spawn_ItemPrev_ok: - - EntityAI PrevItem; - ctx.Read(PrevItem); - SetItem(PrevItem); - - break; - } - } - - void SetItem(EntityAI item) - { - /* - if (item) - { - - //InspectMenuNew.UpdateItemInfo(m_Root, item); - //delete m_item_widget; - - - - if (item == NULL) - { - item = EntityAI.Cast(GetGame().CreateObject( "WaterBottle", vector.Zero, false, false )); - } - if (!m_item_widget) - { - Widget preview_frame = m_Root.FindAnyWidget("ItemPrev"); - if (preview_frame) - { - float w; - float h; - preview_frame.GetSize(w, h); - m_item_widget = ItemPreviewWidget.Cast( GetGame().GetWorkspace().CreateWidget(ItemPreviewWidgetTypeID, 0, 0, 1, 1, WidgetFlags.VISIBLE, ARGB(255, 255, 255, 255), 10, preview_frame) ); - } - } - - m_item_widget.SetItem(item); - m_item_widget.SetView( item.GetViewIndex() ); - m_item_widget.SetModelPosition(Vector(0,0,1)); - - float x, y; - m_item_widget.GetPos(x, y); - - m_item_widget.SetSize( 1.75, 1.75 ); - - // align to center - m_item_widget.SetPos( -0.375, -0.375 ); - - //m_item_widget.SetModelOrientation - //PPEffects.SetBlurInventory(1); - } - */ - } - - override bool OnFocus( Widget w, int x, int y ) - { - if( m_Menu ) - m_Menu.OnFocus( w, x, y ); - if( w ) - { - Param2 p = m_TextMap.Get( w.GetUserID() ); - if( p ) - { - return true; - } - } - return ( w != null ); - - - } - - -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuTeleport.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuTeleport.c deleted file mode 100644 index c267def..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuTeleport.c +++ /dev/null @@ -1,267 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class AdminMenuGuiTeleport extends ScriptedWidgetEventHandler -{ - - protected Widget m_Root; - - - - protected AdminMenuGui m_Menu; - - protected ref map> m_TextMap; - protected ButtonWidget m_btn_Teleport_Teleport; - protected ButtonWidget m_btn_Teleport_Reload; - protected ButtonWidget m_btn_Teleport_Add_Location; - protected ButtonWidget m_btn_Teleport_Spawn_Horde; - //ref AdminMenuManager adminMenuManager; - EditBoxWidget m_Text_Teleport_Loacation_Name; - EditBoxWidget m_editbox_Teleport_HordeCount; - static ref map m_TeleportLocations; - static ref map m_TeleportLocations_old; - TextListboxWidget m_List_Teleport_Location; - ref array TLoacations; - ref array 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(); - m_HordeModule = new ref HordeModule(); - m_Menu = menu; - GetDayZGame().Event_OnRPC.Insert( this.ReceiveRPC ); - m_TeleportLocations = new map; - m_TeleportLocations_old = new map; - 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_btn_Teleport_Spawn_Horde = ButtonWidget.Cast( m_Root.FindAnyWidget( "btn_Teleport_Spawn_Horde" ) ); - //m_List_Teleport_Location.ClearItems(); - //TpLocations; - // 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(""), 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( 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 ) ) - { - 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 ) ) - { - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_RequestData, new Param1(""), false, NULL ); - } - - if( ( w == m_btn_Teleport_Add_Location ) ) - { - string text = m_Text_Teleport_Loacation_Name.GetText(); - SendToFile(text); - GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Teleport_RequestData, new Param1(""), 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() - { - - } - - void Focus() - { - - } - - void AddLocationToFile(string LocationName) - { - - } - - override bool OnFocus( Widget w, int x, int y ) - { - /* - if( m_Menu ) - m_Menu.OnFocus( w, x, y ); - if( w ) - { - Param2 p = m_TextMap.Get( w.GetUserID() ); - if( p ) - { - return true; - } - } - - return ( w != null ); - */ - } - bool stop = false; - - - - void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx ) - { - - int ListCount = 0; - ref array TLoacations = new ref array< string >; - ref array TPos = new ref array< vector >; - PlayerBase Admin; - switch(rpc_type) - { - case M_RPCs.M_Admin_Menu_Teleport_ReciveData: - Print("Data Recived"); - ref array TpName = new ref array< string >; - ref array TpPos = new ref array< vector >; - ctx.Read(TpName); - ctx.Read(TpPos); - Print("Data Count = " + TpName.Count()) - if ( GetGame().IsServer() ) - { - - } - 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(); - } - break; - } - - } - - string GetCurrentSelection() - { - if ( m_List_Teleport_Location.GetSelectedRow() != -1 ) - { - string result; - m_List_Teleport_Location.GetItemText( m_List_Teleport_Location.GetSelectedRow(), 0, result ); - return result; - } - - return ""; - } - - // void Message( string txt ) - // { - // GetGame().GetMission().OnEvent(ChatMessageEventTypeID, new ChatMessageEventParams(0, "", txt, "")); - // } - - - -} diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_About.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_About.layout deleted file mode 100644 index 4653cb7..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_About.layout +++ /dev/null @@ -1,219 +0,0 @@ -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/ " - } - } - } - } - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Commands.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Commands.layout deleted file mode 100644 index 27fb91a..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Commands.layout +++ /dev/null @@ -1,160 +0,0 @@ -FrameWidgetClass rootFrame { - position 10 10 - size 1400 800 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - { - FrameWidgetClass command_settings_root { - ignorepointer 1 - position 0 0 - size 1 1 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - { - ButtonWidgetClass btn_Command_Day { - position 125 360 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Day" - } - ButtonWidgetClass ButtonWidget2 { - position 947.81403 -136.842 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Heal" - } - ButtonWidgetClass btn_Command_Night { - position 550 360 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Night" - } - ButtonWidgetClass btn_Command_Refill { - position 550 460 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Refuel" - } - CheckBoxWidgetClass Config_Cam { - position 125 165 - size 544.16296 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Free Cam Teleport (insert Key)" - } - ButtonWidgetClass ButtonWidget5 { - position 310.56699 -154.14101 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Heal" - } - ButtonWidgetClass btn_Command_Heal { - clipchildren 1 - inheritalpha 0 - position 125 260 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style Default - text "Heal" - } - ButtonWidgetClass btn_Command_SpCar { - position 125 460 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Spawn Car" - } - ButtonWidgetClass ButtonWidget9 { - position 611.57001 -97.7071 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Heal" - } - ButtonWidgetClass ButtonWidget10 { - position 1304.92004 -109.47 - size 300 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Heal" - } - ButtonWidgetClass btn_Command_DelObj { - position 125 560 - size 460.19101 50 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Delete Obj on cursor" - } - TextWidgetClass TextWidget0 { - position 0 10 - size 1 50 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style Bold - text "Commands" - "exact text" 0 - "size to text h" 0 - "size to text v" 0 - "text halign" center - "text valign" center - } - PanelWidgetClass PanelWidget0 { - color 0.9333 0 0.0784 1 - position 0 75 - size 0.9 3.5 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style rover_sim_colorable - } - CheckBoxWidgetClass Config_Teleport { - position 125 100 - size 320.33899 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Teleport (n Key)" - checked 0 - } - } - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Main.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Main.layout deleted file mode 100644 index af871b6..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Main.layout +++ /dev/null @@ -1,858 +0,0 @@ -FrameWidgetClass settings_menu_root { - size 1500 980 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - priority 951 - { - FrameWidgetClass Tabber { - ignorepointer 1 - position 0 0 - size 1 1 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 1 - scriptclass "TabberUI" - { - SpacerWidgetClass TabControls { - visible 1 - clipchildren 0 - ignorepointer 1 - position 80 40 - size 1350 60 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - "no focus" 1 - Padding 0 - Margin 0 - "Size To Content H" 1 - "Size To Content V" 1 - { - SpacerWidgetClass TabBar { - clipchildren 1 - ignorepointer 1 - position 0 0 - size 1 1 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - "no focus" 1 - Padding 0 - Margin 0 - "Size To Content H" 1 - "Size To Content V" 1 - { - ImageWidgetClass Tabs_Background { - visible 1 - ignorepointer 1 - color 1 1 1 0.5098 - position 0 0 - size 1 1 - hexactpos 0 - vexactpos 0 - hexactsize 0 - vexactsize 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - } - GridSpacerWidgetClass Tab_Control_Container { - ignorepointer 1 - position 0 0 - size 1050 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 1 - "no focus" 1 - Padding 0 - Margin 0 - "Size To Content H" 1 - "Size To Content V" 1 - Columns 10 - Rows 1 - { - PanelWidgetClass Tab_Control_0 { - visible 1 - clipchildren 1 - size 160 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_0_Title { - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "Commands" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_0_Background { - visible 1 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position 0 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - PanelWidgetClass Tab_Control_1 { - visible 1 - clipchildren 1 - position 0 0 - size 170 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_1_Title { - visible 1 - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "Spawn" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_1_Background { - visible 0 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position -160 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - PanelWidgetClass Tab_Control_2 { - visible 1 - clipchildren 1 - position 0 0 - size 160 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_2_Title { - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "Player" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_2_Background { - visible 0 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position -330 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - PanelWidgetClass Tab_Control_4 { - visible 1 - clipchildren 1 - position 0 0 - size 170 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_1_Title0 { - visible 1 - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "Teleport" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_1_Background0 { - visible 0 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position -160 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - PanelWidgetClass Tab_Control_3 { - visible 1 - clipchildren 1 - position 0 0 - size 170 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_3_Title { - visible 1 - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "Map" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_3_Background { - visible 0 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position -490 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - PanelWidgetClass Tab_Control_5 { - visible 1 - clipchildren 1 - position 0 0 - size 170 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_1_Title1 { - visible 1 - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "About" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_1_Background1 { - visible 0 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position -160 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - PanelWidgetClass Tab_Control_6 { - visible 0 - clipchildren 1 - position 0 0 - size 170 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_1_Title2 { - visible 1 - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "Config" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_1_Background2 { - visible 0 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position -160 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - PanelWidgetClass Tab_Control_7 { - visible 0 - clipchildren 1 - position 0 0 - size 170 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - priority 200 - userID 0 - style blank - "no focus" 1 - "next down" "XComboBoxWidget1" - { - TextWidgetClass Tab_Control_1_Title3 { - visible 1 - ignorepointer 1 - position 0 0 - size 1 0.48 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - priority 250 - text "Config" - font "gui/fonts/sdf_MetronLight72" - "text halign" center - "text valign" center - } - ImageWidgetClass Tab_Control_1_Background3 { - visible 0 - disabled 0 - inheritalpha 0 - ignorepointer 1 - color 1 1 1 0.7843 - position -160 0 - size 710 1 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 0 - draggable 0 - imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds" - mode blend - "src alpha" 1 - "no wrap" 0 - stretch 1 - "flip u" 0 - "flip v" 0 - filter 1 - nocache 0 - } - } - } - } - } - } - } - FrameWidgetClass XboxControls { - visible 0 - clipchildren 0 - ignorepointer 1 - size 1 1 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - { - ImageWidgetClass XboxTabLeftControl { - visible 0 - clipchildren 1 - ignorepointer 1 - position -45 0 - size 38 40 - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - image0 "set:xbox_buttons image:LB" - mode blend - "src alpha" 1 - "no wrap" 1 - stretch 0 - } - ImageWidgetClass XboxTabRightControl { - visible 0 - clipchildren 1 - ignorepointer 1 - position -45 0 - size 38 40 - halign right_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - image0 "set:xbox_buttons image:RB" - mode blend - "src alpha" 1 - "no wrap" 1 - stretch 0 - } - } - } - } - } - FrameWidgetClass Tab_0 { - visible 1 - ignorepointer 1 - position 0 110 - size 1400 800 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - } - FrameWidgetClass Tab_1 { - visible 0 - ignorepointer 1 - position 0 110 - size 1400 800 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - } - FrameWidgetClass Tab_2 { - visible 0 - ignorepointer 1 - position 0 110 - size 1400 800 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - } - FrameWidgetClass Tab_3 { - visible 0 - ignorepointer 1 - position 0 110 - size 1400 800 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - } - FrameWidgetClass Tab_4 { - visible 0 - ignorepointer 1 - position 0 110 - size 1400 800 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - } - FrameWidgetClass Tab_5 { - visible 0 - ignorepointer 1 - position 0 110 - size 1400 800 - halign center_ref - hexactpos 1 - vexactpos 1 - 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 { - ignorepointer 1 - position 0.00178 2.4828 - size 1 37.15 - halign right_ref - hexactpos 0 - vexactpos 1 - hexactsize 0 - vexactsize 1 - priority 1 - style Normal - text "DayZ SA Tomato" - font "gui/fonts/sdf_MetronLight72" - "text color" 0.8157 0.1255 0.7843 1 - "exact text" 0 - "text halign" center - "text valign" center - } - WrapSpacerWidgetClass play_panel_root { - visible 1 - ignorepointer 1 - position 0.01561 19.9362 - size 0.2 42.5477 - halign right_ref - valign bottom_ref - hexactpos 0 - vexactpos 1 - hexactsize 0 - vexactsize 1 - priority 1 - Padding 10 - Margin 0 - "Size To Content H" 1 - content_halign center - content_valign bottom - { - WrapSpacerWidgetClass top { - ignorepointer 1 - color 0 0 0 0.7843 - position 0 0 - size 1 48 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style DayZDefaultPanel - "no focus" 1 - Padding 0 - Margin 0 - "Size To Content V" 1 - content_valign bottom - { - ButtonWidgetClass back { - color 0.0392 0.0392 0.0392 1 - position 0 88 - size 1 38 - halign center_ref - valign bottom_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style DayZDefaultButtonBottom - "no focus" 0 - "next up" "" - "next down" "" - text "Close" - text_proportion 0.6 - font "gui/fonts/sdf_MetronLight24" - switch normal - } - PanelWidgetClass character { - visible 0 - ignorepointer 0 - position 0 172 - size 1 38 - halign center_ref - valign bottom_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style blank - { - TextWidgetClass character_name_text { - inheritalpha 1 - ignorepointer 1 - size 1 0.55 - halign center_ref - valign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - font "gui/fonts/sdf_MetronLight24" - "exact text" 0 - "text halign" center - "text valign" center - } - } - } - } - } - } - } - GridSpacerWidgetClass settings_details { - visible 0 - clipchildren 1 - ignorepointer 1 - color 0 0 0 0.8627 - position 720 160 - size 600 200 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - priority 3 - "no focus" 1 - Padding 8 - Margin 16 - "Size To Content V" 1 - Columns 1 - Rows 2 - { - TextWidgetClass details_label { - clipchildren 0 - ignorepointer 1 - position 0 0 - size 1 36 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - font "gui/fonts/sdf_MetronLight72" - text_proportion 0.9 - } - RichTextWidgetClass details_content { - clipchildren 0 - ignorepointer 1 - position 0 0 - size 1 1 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - font "gui/fonts/sdf_MetronLight24" - "exact text" 1 - "exact text size" 22 - "size to text h" 0 - "size to text v" 1 - wrap 1 - "condense whitespace" 1 - } - } - } - WindowWidgetClass WindowWidget0 { - color 0.4235 0.0078 0.0078 1 - position 0 0 - size 1 1 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - style rover_sim_black - "title visible" 0 - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Map.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Map.layout deleted file mode 100644 index 2a0ac07..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Map.layout +++ /dev/null @@ -1,93 +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 "Map" - "exact text" 0 - "size to text h" 0 - "size to text v" 0 - "text halign" center - "text valign" center - } - PanelWidgetClass PanelWidget0 { - color 0.9333 0 0.0784 1 - position 0 75 - size 0.9 3.5 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style rover_sim_colorable - } - MapWidgetClass Map_Map_Main { - position 0 20 - size 0.9 580 - halign center_ref - valign bottom_ref - hexactpos 1 - vexactpos 1 - 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 - } - } - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Player.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Player.layout deleted file mode 100644 index c5cf689..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Player.layout +++ /dev/null @@ -1,294 +0,0 @@ -FrameWidgetClass rootFrame { - position 10 10 - size 1400 800 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - { - FrameWidgetClass command_settings_root { - ignorepointer 1 - position -3.92 0 - size 1 1 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - { - PanelWidgetClass PanelWidget0 { - color 0.9333 0 0.0784 1 - position 0 75 - size 0.9 3.5 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style rover_sim_colorable - } - PanelWidgetClass Panel { - position 100 150 - size 450 500 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style rover_sim_black_2 - } - TextListboxWidgetClass Player_Player_List { - position 100 150 - size 450 500 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - lines 20 - } - TextWidgetClass TextWidget1 { - position 100 90 - size 450 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Online Player :" - "text halign" center - "text valign" center - } - TextWidgetClass TextWidget2 { - position 610 90 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Selection Commands :" - "text halign" center - "text valign" center - } - ButtonWidgetClass btn_Player_Kill { - position 610 150 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Kill Player" - } - ButtonWidgetClass btn_Player_Strip { - position 610 270 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Strip Player" - } - ButtonWidgetClass btn_Player_tpMe { - position 610 330 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Teleport To Player" - } - ButtonWidgetClass btn_Player_tpto { - position 610 390 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Teleport Player here" - } - ButtonWidgetClass btn_Player_Heal { - position 610 210 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Heal Player" - } - TextWidgetClass TextWidget0 { - position 0 10 - size 1 50 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style Bold - text "Player" - "exact text" 0 - "size to text h" 0 - "size to text v" 0 - "text halign" center - "text valign" center - } - TextWidgetClass TextWidget3 { - position 100 660 - size 100 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Pos : " - "text halign" center - "text valign" center - } - TextWidgetClass Text_Player_Pos { - position 220 660 - size 1140 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "XXX" - "text valign" center - } - EditBoxWidgetClass Box_Player_Message { - position 361.21002 720 - size 893 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style ServerBrowser - } - ButtonWidgetClass btn_Player_Send { - position 1270.2699 720 - size 90.21 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Send" - } - TextWidgetClass TextWidget6 { - position 1020 90 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Selection Commands :" - "text halign" center - "text valign" center - } - ButtonWidgetClass btn_Player_KillAll { - position 1020 150 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Kill all Player" - } - ButtonWidgetClass btn_Player_HealAll { - position 1020 210 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Heal all Player" - } - ButtonWidgetClass btn_Player_StripAll { - position 1020 270 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Strip all Player" - } - ButtonWidgetClass btn_Player_tpMeAll { - position 1020 390 - size 350 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Teleport all here" - } - CheckBoxWidgetClass Cb_Player_Stamina { - position 610 500 - size 350 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - 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" - } - } - } - TextWidgetClass textWidgettxt { - position 88 720 - size 265.38998 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Private Message" - "text halign" center - "text valign" center - } - TextWidgetClass TextWidget5 { - position 610 550 - size 130 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Blood :" - "text halign" center - "text valign" center - } - TextWidgetClass TextWidget7 { - position 1100 550 - size 130 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Health :" - "text halign" center - "text valign" center - } - TextWidgetClass Text_Player_Blood { - position 610 605 - size 260 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "XXX" - "text halign" center - "text valign" center - } - TextWidgetClass Text_Player_Energy { - position 1100 605 - size 260 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "XXX" - "text halign" center - "text valign" center - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Spawn.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Spawn.layout deleted file mode 100644 index 1b18668..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Spawn.layout +++ /dev/null @@ -1,255 +0,0 @@ -FrameWidgetClass rootFrame { - position 10 10 - size 1400 800 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - { - FrameWidgetClass command_settings_root { - ignorepointer 1 - position -1.47211 0 - size 1 1 - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 0 - { - TextWidgetClass TextWidget0 { - position 0 10 - size 1 50 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style Bold - text "Spawn" - "exact text" 0 - "size to text h" 0 - "size to text v" 0 - "text halign" center - "text valign" center - } - PanelWidgetClass PanelWidget0 { - color 0.9333 0 0.0784 1 - position 0 75 - size 0.9 3.5 - halign center_ref - hexactpos 1 - vexactpos 1 - hexactsize 0 - vexactsize 1 - style rover_sim_colorable - } - TextWidgetClass search_text { - position 100 100 - size 150 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Search :" - "text halign" center - "text valign" center - } - EditBoxWidgetClass search_input { - position 280 100 - size 500 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style ServerBrowser - } - ButtonWidgetClass btn_spawn_filter_All { - position 100 180 - size 150 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "All" - } - ButtonWidgetClass btn_spawn_filter_edible_base { - position 100 240 - size 150 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Food" - } - ButtonWidgetClass btn_spawn_filter_weapon_base { - position 100 300 - size 150 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Weapons" - } - ButtonWidgetClass btn_spawn_filter_clothing_base { - position 100 360 - size 150 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Cloth" - } - ButtonWidgetClass btn_spawn_filter_transport { - position 100 420 - size 150 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Vehicles" - } - ButtonWidgetClass btn_spawn_filter_house { - position 100 480 - size 150 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Buildings" - } - ButtonWidgetClass btn_spawn_filter_dz_lightai { - position 100 540 - size 150 47 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Ai" - } - PanelWidgetClass PanelWidget1 { - position 280 180 - size 500 410 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style rover_sim_black_2 - } - TextListboxWidgetClass classlist { - position 280 180 - size 500 410 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - lines 20 - } - ButtonWidgetClass btn_spawn_cursorpos { - position 280 720 - size 160 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Cursor" - } - ButtonWidgetClass btn_spawn_ground { - position 460 720 - size 160 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Ground" - } - ButtonWidgetClass btn_spawn_inventory { - position 640 720 - size 160 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Inventory" - } - TextWidgetClass className_spawner { - position 45 660 - size 100 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Class Name :" - "size to text h" 1 - "size to text v" 0 - "text halign" center - "text valign" center - } - TextWidgetClass spawn_text { - position 40 720 - size 100 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Spawn Type :" - "size to text h" 1 - "size to text v" 0 - "text halign" center - "text valign" center - } - EditBoxWidgetClass className_spawner_box { - position 280 660 - size 500 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style ServerBrowser - } - TextWidgetClass quantity_text { - position 500 660 - size 100 48 - halign right_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Quantity Number/\"Max\" :" - "size to text h" 1 - "size to text v" 0 - "text halign" center - "text valign" center - } - EditBoxWidgetClass quantity_items { - position 1220 660 - size 120 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "MAX" - } - ItemPreviewWidgetClass ItemPrev { - position 100 180 - size 500 410 - halign right_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - priority 5 - } - PanelWidgetClass PanelWidget2 { - visible 0 - position 100 180 - size 500 410 - halign right_ref - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style rover_sim_blackbox - } - } - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Teleport.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Teleport.layout deleted file mode 100644 index 5bb4e2e..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_Teleport.layout +++ /dev/null @@ -1,143 +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 "Teleport" - "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 - } - PanelWidgetClass PanelWidget1 { - visible 0 - position 20 160 - size 400 570 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style rover_sim_black_2 - } - TextListboxWidgetClass List_Teleport_Location { - position 26.6539 160 - size 386.76901 570 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style Editor - lines 20 - } - ButtonWidgetClass btn_Teleport_Add_Location { - position 450 680.46002 - size 430 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Add Current Location" - } - ButtonWidgetClass btn_Teleport_Teleport { - position 450 160 - size 431.70602 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Teleport to Location" - } - ButtonWidgetClass btn_Teleport_Reload { - position 20 740 - size 403.58899 45 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Reload from File" - } - EditBoxWidgetClass Text_Teleport_Loacation_Name { - position 904.15796 680 - size 430 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - style ServerBrowser - text "Location Name" - } - TextWidgetClass TextWidget1 { - position 20 100 - size 400 48 - hexactpos 1 - vexactpos 1 - hexactsize 1 - vexactsize 1 - text "Locations" - "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" - } - } - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/MessageBox.layout b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/MessageBox.layout deleted file mode 100644 index 27b93fb..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/MessageBox.layout +++ /dev/null @@ -1,37 +0,0 @@ -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 - } - } - } - } -} \ No newline at end of file diff --git a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/HordeModule.c b/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/HordeModule.c deleted file mode 100644 index e709b1e..0000000 --- a/DayZ-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/HordeModule.c +++ /dev/null @@ -1,152 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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", - }; -} - \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign deleted file mode 100644 index 20c7c23..0000000 Binary files a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/DayZ-SA-Tomato.pbo.SchnitzelPommes.bisign and /dev/null differ diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp deleted file mode 100644 index 471da7d..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/config.cpp +++ /dev/null @@ -1,63 +0,0 @@ -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" - }; - }; - }; - }; -}; diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/3_Game/Moddedconstants.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/3_Game/Moddedconstants.c deleted file mode 100644 index eddb166..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/3_Game/Moddedconstants.c +++ /dev/null @@ -1,2 +0,0 @@ -const int MENU_Admin = 7000; -const int MENU_AdminMessage = 7001; \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/ConfigTypes.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/ConfigTypes.c deleted file mode 100644 index 05840cf..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/ConfigTypes.c +++ /dev/null @@ -1,23 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -enum ConfigType -{ - false, true, next, custom -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/FileConfig.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/FileConfig.c deleted file mode 100644 index d76840c..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Config/FileConfig.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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 ConfigNames = new array; - array ConfigTypes = new array; - 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 ConfigLine = new array; - array ConfigStringCut = new array; - 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 ConfigStringCut = new array; - // 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); - } - } - } - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPermission.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPermission.c deleted file mode 100644 index dc4b8d6..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPermission.c +++ /dev/null @@ -1,269 +0,0 @@ - /* - 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 tokens = new array; - - array spaces = new array; - 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 tokens = new array; - 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 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 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 tokens = new array; - 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 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; - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPlayer.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPlayer.c deleted file mode 100644 index 6a169ef..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/FPPlayer.c +++ /dev/null @@ -1,204 +0,0 @@ - /* - 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; - } - -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionSystem.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionSystem.c deleted file mode 100644 index 3a40496..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionSystem.c +++ /dev/null @@ -1,108 +0,0 @@ - /* - 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 ); -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionType.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionType.c deleted file mode 100644 index 03fcdcd..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PermissionType.c +++ /dev/null @@ -1,19 +0,0 @@ - /* - 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 -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PlayerData.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PlayerData.c deleted file mode 100644 index a592e03..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Player/PlayerData.c +++ /dev/null @@ -1,81 +0,0 @@ - /* - 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(); - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/FileTeleport.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/FileTeleport.c deleted file mode 100644 index 7916de4..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/FileTeleport.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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 TeleportLine = new array; - array TeleportLineCut = new array; - array TeleportPositions = new array; - 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 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; - - - } - } - } - -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/TeleportData.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/TeleportData.c deleted file mode 100644 index e1c25ae..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/FileHandeling/Tp_Locations/TeleportData.c +++ /dev/null @@ -1,91 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class TeleportData -{ - ref array 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; -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/DeathHandler.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/DeathHandler.c deleted file mode 100644 index ed074e9..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/DeathHandler.c +++ /dev/null @@ -1,296 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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; -// } \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/LogHandler.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/LogHandler.c deleted file mode 100644 index 4856ad8..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/LogSystem/LogHandler.c +++ /dev/null @@ -1,435 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ - -class 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 players = new array; - - 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 players = new array; - - 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( msg ), false, ident ); - } - - void playern(PlayerIdentity ident, string msg) - { - Param1 Msgparam = new Param1( 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(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(""), 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(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; -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/EmoteManager.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/EmoteManager.c deleted file mode 100644 index 52bb843..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/EmoteManager.c +++ /dev/null @@ -1,28 +0,0 @@ - - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -modded class EmoteManager -{ - override void LogSuicide() - { - m_Player.issic(true); - super.LogSuicide(); - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/PlayerBase.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/PlayerBase.c deleted file mode 100644 index 3c60f47..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/PlayerBase.c +++ /dev/null @@ -1,84 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -modded class 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(); - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/SurvivorBase.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/SurvivorBase.c deleted file mode 100644 index b6e5a62..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/ModdedClasses/SurvivorBase.c +++ /dev/null @@ -1,45 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ - -modded class 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; - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/Modules/FileHandler.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/Modules/FileHandler.c deleted file mode 100644 index da04162..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/4_World/Modules/FileHandler.c +++ /dev/null @@ -1,482 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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; -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/ChatModule.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/ChatModule.c deleted file mode 100644 index 74c59d5..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/ChatModule.c +++ /dev/null @@ -1,143 +0,0 @@ - /* - 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 . - */ -typedef Param4 ChatParams; -class ChatModules -{ - - protected ref map m_Commands; - - void ChatModules() - { - m_Commands = new map; //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 players = new array; - 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 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 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 CheckCommand(string CommandLine) - { - ref array ret = new array; - 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; -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Config/ConfigModule.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Config/ConfigModule.c deleted file mode 100644 index 6559c1e..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Config/ConfigModule.c +++ /dev/null @@ -1,66 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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(); - - - } - -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PermissionBase.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PermissionBase.c deleted file mode 100644 index ced711b..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PermissionBase.c +++ /dev/null @@ -1,168 +0,0 @@ - /* - 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; - - - } - - } -} diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PlayerModule.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PlayerModule.c deleted file mode 100644 index afa7e7b..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Player/PlayerModule.c +++ /dev/null @@ -1,591 +0,0 @@ - /* - 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 Dstring = new ref array ; - ref array Dstring1 = new ref array ; - 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; - } - } - -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Teleport/TeleportModule.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Teleport/TeleportModule.c deleted file mode 100644 index 8b56e93..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/Files/Teleport/TeleportModule.c +++ /dev/null @@ -1,33 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class TeleportModule -{ - void TeleportModule() - { - - } - - void Init() - { - GetFileHandler().CheckAndCreateFiles(); - GetFileHandler().LoadTeleport(); - } - -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuAbout.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuAbout.c deleted file mode 100644 index e515d0c..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuAbout.c +++ /dev/null @@ -1,44 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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() - { - - } - -} diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMessage.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMessage.c deleted file mode 100644 index 08d5eab..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/AdminMenuMessage.c +++ /dev/null @@ -1,79 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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; -// } \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_About.layout b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_About.layout deleted file mode 100644 index 4653cb7..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/Admin_About.layout +++ /dev/null @@ -1,219 +0,0 @@ -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/ " - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/MessageBox.layout b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/MessageBox.layout deleted file mode 100644 index 27b93fb..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/GUI/Layouts/MessageBox.layout +++ /dev/null @@ -1,37 +0,0 @@ -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 - } - } - } - } -} \ No newline at end of file diff --git a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/HordeModule.c b/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/HordeModule.c deleted file mode 100644 index e709b1e..0000000 --- a/Dayz-Sa-Tomato/addons/DayZ-SA-Tomato/scripts/5_Mission/core/modules/HordeModule.c +++ /dev/null @@ -1,152 +0,0 @@ - /* - DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de - Copyright (C) 2018 DayZ-SA-Tomato - - This file is part of DayZ SA Tomato. - - DayZ SA Tomato is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DayZ SA Tomato is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DayZ SA Tomato. If not, see . - */ -class 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", - }; -} - \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f288702..0000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/README.md b/README.md deleted file mode 100644 index bcb6c9a..0000000 --- a/README.md +++ /dev/null @@ -1,180 +0,0 @@ -# DayZ SA Tomato - -Dayz Standalone UI Admin Tool - - - -## Changelog - -See CHANGELOG.md - -## News - -## 15.12.2018 23: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) - - ### next up - - - - -#### If Someone got the mod to work on a 3rd Party hoster Cantact me or join https://discord.gg/Svgz48m - -## 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 could cantact me per mail 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 - - -<<<<<<< HEAD -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 Tomato_Profiles profile folder from the mod folder's to server profiles folder. (If the folder "DayzServer/YOURPROFILESNAME/Tomato_Profiles/Config/Players/" does not exist please create it BEFORE you start your server for the first time) -``` -``` -![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 -======= ->>>>>>> parent of c8d7f7d... Update to Ver. 1.30 - - - - -## Test and Use - -Start your Server and login - -Check your Server log for - -``` -Adding Admin: -``` - -If this Meessage appears the server loadet the tool if not you did something wrong - -``` -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 -* **In Game** - Insert Key go to Camera Mode Insert again to tp to Cursor -* **In Game** - N Key to Teleport to Cursor - ------------- - -* **Commands Tab** - Toggle In Game Keys -* **Commands Tab** - Self Heal -* **Commands Tab** - Daytime -* **Commands Tab** - Nighttime -* **Commands Tab** - Spawn Car repaired and filled -* **Commands Tab** - Refill nearest Car - ------------- - -* **Spawn Tab** - Item/AI/Building Spawning - ------------- - -* **Player Tab** - Player List -* **Player Tab** - Tp Players and tp to Players -* **Player Tab** - Strip Player -* **Player Tab** - Position of Player -* **Player Tab** - Disable Stamina for specific Player -* **Player Tab** - Heal Player -* **Player Tab** - Kill Player - ------------- - -* **Map Tab** - Shows Location of all Players on the Map - - -### 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 - -This project is licensed under the GNU v3 License - see the [LICENSE.md](LICENSE.md) file for details - -## Acknowledgments - -* Everyone on the Forums/Discord who answered question (not only me but everyone) -* DayZCommunityOfflineMode for Snippets -