-
Content Count
9 -
Joined
-
Last visited
-
Mostabdel started following madmax1337
-
did you fill it with gasoline?
-
check here - file cfgeventspawns.xml , if you want to know the positions exactly on a picture (map) or add more vehicles. Download this Config Tool and place it into your server, of course you need to download also the server files for this because its needs the files to read the coordinates etc....
-
last update fixed windows 2008 crashes i give you a tip, you need to make a new instace (fresh), install update on a exist one makes server buggy, you need to make a backup from your files first, and i may suggest to not replace every file because this file may has changed in the last update.... My server was buggy as hell after update, and had to install new....
-
i dont quote your message now because it would be too long..... same problem as here and i posted a solution so far if you would like to use it and yeah, currently on the safezone there is no restriction for taking damage because this doesnt exist yet... but i dont know if a command has added on the last update....
-
i give you a tip, put the code into the init, and the AdminToolExtended also into the code you insert.... something with include is buggy or changed like i asked here... https://steamcommunity.com/app/221100/discussions/0/1752358461523707101/#c1752358461524092826 because if you can see on error, it cant be an error so, and if you would like to know where exactly, right? so you have to put the whole code into the init to figure out which line it is, same like the AdminToolExtended and you see there isnt any error in the script itself..... checked, but less commands and i dont like it :/
-
you got a variable that is called but doesnt exist... i added it... this should work now i tested it... (But keep in mind, this is atm only a text that work for the SafeZone, you will take damage until there is a solution about it...) void main() { Hive ce = CreateHive(); if (ce) ce.InitOffline(); Weather weather = g_Game.GetWeather(); weather.GetOvercast().SetLimits(0.0, 0.1); weather.GetRain().SetLimits(0.0, 0.1); weather.GetFog().SetLimits(0.0, 0.1); weather.GetOvercast().SetForecastChangeLimits(0.0, 0.2); weather.GetRain().SetForecastChangeLimits(0.0, 0.1); weather.GetFog().SetForecastChangeLimits(0.15, 0.45); weather.GetOvercast().SetForecastTimeLimits(1800, 1800); weather.GetRain().SetForecastTimeLimits(600, 600); weather.GetFog().SetForecastTimeLimits(1800, 1800); weather.GetOvercast().Set(Math.RandomFloatInclusive(0.0, 0.3), 0, 0); weather.GetRain().Set(Math.RandomFloatInclusive(0.0, 0.2), 0, 0); weather.GetFog().Set(Math.RandomFloatInclusive(0.0, 0.1), 0, 0); weather.SetWindMaximumSpeed(15); weather.SetWindFunctionParams(0.1, 0.3, 50); } class CustomMission: MissionServer { void NumPLayersOnServer() { ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); int numPlayers = players.Count(); for ( int i = 0; i < players.Count(); ++i ) { Man player = players.Get(i); if( player ) { string messPlayers = "Players on the server: " + numPlayers.ToString(); Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } bool m_StaminaStatus; bool m_SafeZone; vector SAFEZONE_LOACTION = "12432.80 0 9538.90"; //Map coords (position of the safe zone) float SAFEZONE_RADIUS = 200; //In meter string ENTRY_MESSAGE = "Welcome to The SafeZone! Godmode ENABLED!"; string EXIT_MESSAGE = "You Have Left The SafeZone! Godmode DISABLED!"; //Runs every tick (Stat time tick!) IMPORANT: Does reduce about 120 FPS when server is High-Full Pop! void SafeZoneHandle(PlayerBase player) { float distance; string ZoneCheck, GUID; GUID = player.GetIdentity().GetPlainId(); //Steam 64 Param1<string> Msgparam; distance = vector.Distance(player.GetPosition(),SAFEZONE_LOACTION); if (distance <= SAFEZONE_RADIUS) //Player Inside Zone { g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck); if (ZoneCheck == "true") //Already in zone { return; } else { g_Game.SetProfileString("SafeZoneStatus"+ GUID, "true"); Msgparam = new Param1<string>( ENTRY_MESSAGE ); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity()); } } else if (distance > SAFEZONE_RADIUS) //Plauer Outside of Zone { g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck); if (ZoneCheck == "false") { return; } else { g_Game.SetProfileString("SafeZoneStatus"+ GUID, "false"); Msgparam = new Param1<string>( EXIT_MESSAGE ); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity()); } } } 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)); if (m_StaminaStatus) { currentPlayer.GetStatStamina().Set(1000); } if (m_SafeZone) { SafeZoneHandle(currentPlayer); } //Check if player is near safezone currentPlayer.OnTick(); m_currentPlayer++; } } static vector zonepvp_pos1 = {5231.25, 0, 9820.31};// point1 static vector zonepvp_pos2 = {2321.25, 0, 8452.31};// point2 void CheckPVPZone()//pvp { bool in_zone1 = true; bool in_zone2 = true; ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); if ( players.Count() > 0 ) { for ( int i = 0; i < players.Count(); i++ ) { PlayerBase player; Class.CastTo(player, players.Get(i)); float dist1 = vector.Distance(player.GetPosition(),zonepvp_pos1); float dist2 = vector.Distance(player.GetPosition(),zonepvp_pos2); if (dist1 > 346) in_zone1 = false; //DISTANCE ZONE 1 if (dist2 > 346) in_zone2 = false;// DISTANCE ZONE 2 if(!in_zone1 && !in_zone2) //distance from the center to the player, from where the player will receive warnings and damage { float newHeal = player.GetHealth("", "") - 5; //5 - this is damage to the player //CHANGED TO 5 BECAUSE OF TIME-CHANGE ABOVE player.SetHealth("", "", newHeal); string messPlayers = "Hey, you (" + player.GetIdentity().GetName() + ") go back, and then is healthy!"; Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } } override void OnInit() { m_SafeZone = true; m_StaminaStatus = true; //Enable it = Unlimited Stamina GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 120000, true); // 2 mins super.OnInit(); GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(CheckPVPZone, 5000, true); //pvp //CHANGED TO 5 SECONDS TO AVOID SERVER STRESS } override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName) { Entity playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE"); Class.CastTo(m_player, playerEnt); GetGame().SelectPlayer(identity, m_player); return m_player; } void addMags(PlayerBase player, string mag_type, int count) { if (count < 1) return; EntityAI mag; for (int i = 0; i < count; i++) { mag = player.GetInventory().CreateInInventory(mag_type); } player.SetQuickBarEntityShortcut(mag, 1, true); } EntityAI assaultClass(PlayerBase player) { EntityAI gun = player.GetHumanInventory().CreateInHands("M4A1"); gun.GetInventory().CreateAttachment("M4_RISHndgrd_Black"); gun.GetInventory().CreateAttachment("M4_MPBttstck_Black"); gun.GetInventory().CreateAttachment("M4_Suppressor"); gun.GetInventory().CreateAttachment("ACOGOptic"); addMags(player, "Mag_STANAGCoupled_30Rnd", 3); return gun; } override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { player.RemoveAllItems(); player.GetInventory().CreateInInventory("Jeans_Black"); player.GetInventory().CreateInInventory("TacticalShirt_Black"); player.GetInventory().CreateInInventory("AthleticShoes_Black"); player.GetInventory().CreateInInventory("CowboyHat_black"); player.GetInventory().CreateInInventory("AssaultBag_Black"); player.GetInventory().CreateInInventory("SodaCan_Pipsi"); player.GetInventory().CreateInInventory("Canteen"); player.GetInventory().CreateInInventory("SpaghettiCan"); player.GetInventory().CreateInInventory("HuntingKnife"); player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd"); player.GetInventory().CreateInInventory("MakarovIJ70"); player.GetInventory().CreateInInventory("AmmoBox_380_35rnd"); ItemBase rags = player.GetInventory().CreateInInventory("Rag"); rags.SetQuantity(4); EntityAI primary; EntityAI axe = player.GetInventory().CreateInInventory("WoodAxe"); player.LocalTakeEntityToHands(primary); player.SetQuickBarEntityShortcut(primary, 0, true); player.SetQuickBarEntityShortcut(rags, 2, true); player.SetQuickBarEntityShortcut(axe, 3, true); } }; Mission CreateCustomMission(string path) { return new CustomMission(); }
-
@John Mccalum try but not tested, you put it wrong together void main() { Hive ce = CreateHive(); if (ce) ce.InitOffline(); Weather weather = g_Game.GetWeather(); weather.GetOvercast().SetLimits(0.0, 0.1); weather.GetRain().SetLimits(0.0, 0.1); weather.GetFog().SetLimits(0.0, 0.1); weather.GetOvercast().SetForecastChangeLimits(0.0, 0.2); weather.GetRain().SetForecastChangeLimits(0.0, 0.1); weather.GetFog().SetForecastChangeLimits(0.15, 0.45); weather.GetOvercast().SetForecastTimeLimits(1800, 1800); weather.GetRain().SetForecastTimeLimits(600, 600); weather.GetFog().SetForecastTimeLimits(1800, 1800); weather.GetOvercast().Set(Math.RandomFloatInclusive(0.0, 0.3), 0, 0); weather.GetRain().Set(Math.RandomFloatInclusive(0.0, 0.2), 0, 0); weather.GetFog().Set(Math.RandomFloatInclusive(0.0, 0.1), 0, 0); weather.SetWindMaximumSpeed(15); weather.SetWindFunctionParams(0.1, 0.3, 50); } class CustomMission: MissionServer { bool m_StaminaStatus; bool m_SafeZone; vector SAFEZONE_LOACTION = "12432.80 0 9538.90"; //Map coords (position of the safe zone) Current Coords: [Green Mountain - Radio Tower (Military Base)] float SAFEZONE_RADIUS = 200; //In meter string ENTRY_MESSAGE = "Welcome to The SafeZone! Godmode ENABLED!"; string EXIT_MESSAGE = "You Have Left The SafeZone! Godmode DISABLED!"; //Runs every tick (Stat time tick!) IMPORANT: Does reduce about 120 FPS when server is High-Full Pop! void SafeZoneHandle(PlayerBase player) { float distance; string ZoneCheck, GUID; GUID = player.GetIdentity().GetPlainId(); //Steam 64 Param1<string> Msgparam; distance = vector.Distance(player.GetPosition(),SAFEZONE_LOACTION); if (distance <= SAFEZONE_RADIUS) //Player Inside Zone { g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck); if (ZoneCheck == "true") //Already in zone { return; } else { g_Game.SetProfileString("SafeZoneStatus"+ GUID, "true"); Msgparam = new Param1<string>( ENTRY_MESSAGE ); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity()); } } else if (distance > SAFEZONE_RADIUS) //Plauer Outside of Zone { g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck); if (ZoneCheck == "false") { return; } else { g_Game.SetProfileString("SafeZoneStatus"+ GUID, "false"); Msgparam = new Param1<string>( EXIT_MESSAGE ); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity()); } } } 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)); if (m_StaminaStatus) { currentPlayer.GetStatStamina().Set(1000); } if (m_SafeZone) { SafeZoneHandle(currentPlayer); } //Check if player is near safezone currentPlayer.OnTick(); m_currentPlayer++; } } static vector zonepvp_pos1 = {5231.25, 0, 9820.31};// point1 static vector zonepvp_pos2 = {2321.25, 0, 8452.31};// point2 void CheckPVPZone()//pvp { bool in_zone1 = true; bool in_zone2 = true; ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); if ( players.Count() > 0 ) { for ( int i = 0; i < players.Count(); i++ ) { PlayerBase player; Class.CastTo(player, players.Get(i)); float dist1 = vector.Distance(player.GetPosition(),zonepvp_pos1); float dist2 = vector.Distance(player.GetPosition(),zonepvp_pos2); if (dist1 > 346) in_zone1 = false; //DISTANCE ZONE 1 if (dist2 > 346) in_zone2 = false;// DISTANCE ZONE 2 if(!in_zone1 && !in_zone2) //distance from the center to the player, from where the player will receive warnings and damage { float newHeal = player.GetHealth("", "") - 5; //5 - this is damage to the player //CHANGED TO 5 BECAUSE OF TIME-CHANGE ABOVE player.SetHealth("", "", newHeal); string messPlayers = "Hey, you (" + player.GetIdentity().GetName() + ") go back, and then is healthy!"; Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } } override void OnInit() { m_SafeZone = true; m_StaminaStatus = true; //Enable it = Unlimited Stamina GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 60000, true); // 10 min // DOES NOT BELONG TO PVP ZONE!!! super.OnInit(); GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(CheckPVPZone, 5000, true); //pvp //CHANGED TO 5 SECONDS TO AVOID SERVER STRESS } override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName) { Entity playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE"); Class.CastTo(m_player, playerEnt); GetGame().SelectPlayer(identity, m_player); return m_player; } void addMags(PlayerBase player, string mag_type, int count) { if (count < 1) return; EntityAI mag; for (int i = 0; i < count; i++) { mag = player.GetInventory().CreateInInventory(mag_type); } player.SetQuickBarEntityShortcut(mag, 1, true); } EntityAI assaultClass(PlayerBase player) { EntityAI gun = player.GetHumanInventory().CreateInHands("M4A1"); gun.GetInventory().CreateAttachment("M4_RISHndgrd_Black"); gun.GetInventory().CreateAttachment("M4_MPBttstck_Black"); gun.GetInventory().CreateAttachment("M4_Suppressor"); gun.GetInventory().CreateAttachment("ACOGOptic"); addMags(player, "Mag_STANAGCoupled_30Rnd", 3); return gun; } override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { player.RemoveAllItems(); player.GetInventory().CreateInInventory("Jeans_Black"); player.GetInventory().CreateInInventory("TacticalShirt_Black"); player.GetInventory().CreateInInventory("AthleticShoes_Black"); player.GetInventory().CreateInInventory("CowboyHat_black"); player.GetInventory().CreateInInventory("AssaultBag_Black"); player.GetInventory().CreateInInventory("SodaCan_Pipsi"); player.GetInventory().CreateInInventory("Canteen"); player.GetInventory().CreateInInventory("SpaghettiCan"); player.GetInventory().CreateInInventory("HuntingKnife"); player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd"); player.GetInventory().CreateInInventory("MakarovIJ70"); player.GetInventory().CreateInInventory("AmmoBox_380_35rnd"); ItemBase rags = player.GetInventory().CreateInInventory("Rag"); rags.SetQuantity(4); EntityAI primary; EntityAI axe = player.GetInventory().CreateInInventory("WoodAxe"); player.LocalTakeEntityToHands(primary); player.SetQuickBarEntityShortcut(primary, 0, true); player.SetQuickBarEntityShortcut(rags, 2, true); player.SetQuickBarEntityShortcut(axe, 3, true); } }; Mission CreateCustomMission(string path) { return new CustomMission(); } hmm i dunno, so far i readed, not possible atm
-
yea correct, somehow this doesnt work but why i dont know sadly.... godmode in admin tool doesnt work too maybe not possible atm
-
madmax1337 changed their profile photo
-
So after a while, i figured out how this scriptmods works. At your: init.c class CustomMission: MissionServer { }; add bool m_StaminaStatus; bool m_SafeZone; vector SAFEZONE_LOACTION = "3700 0 6060"; //Map coords (position of the safe zone) Current Coords: [Green Mountain - Radio Tower (Military Base)] float SAFEZONE_RADIUS = 500; //In meter string ENTRY_MESSAGE = "Welcome to The SafeZone! Godmode ENABLED!"; string EXIT_MESSAGE = "You Have Left The SafeZone! Godmode DISABLED!"; //Runs every tick (Stat time tick!) IMPORANT: Does reduce about 120 FPS when server is High-Full Pop! void SafeZoneHandle(PlayerBase player) { float distance; string ZoneCheck, GUID; GUID = player.GetIdentity().GetPlainId(); //Steam 64 Param1<string> Msgparam; distance = vector.Distance(player.GetPosition(),SAFEZONE_LOACTION); if (distance <= SAFEZONE_RADIUS) //Player Inside Zone { g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck); if (ZoneCheck == "true") //Already in zone { return; } else { g_Game.SetProfileString("SafeZoneStatus"+ GUID, "true"); Msgparam = new Param1<string>( ENTRY_MESSAGE ); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity()); } } else if (distance > SAFEZONE_RADIUS) //Plauer Outside of Zone { g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck); if (ZoneCheck == "false") { return; } else { g_Game.SetProfileString("SafeZoneStatus"+ GUID, "false"); Msgparam = new Param1<string>( EXIT_MESSAGE ); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity()); } } } 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)); if (m_StaminaStatus) { currentPlayer.GetStatStamina().Set(1000); } if (m_SafeZone) { SafeZoneHandle(currentPlayer); } //Check if player is near safezone currentPlayer.OnTick(); m_currentPlayer++; } } and at your: override void OnInit() { } add m_SafeZone = true; m_StaminaStatus = false; //Enable it = Unlimited Stamina Notice: You get only a message about Entering Exiting the SafeZone when you run into it, if you spawn or teleport in, there will no message. Hope it helps