- MOTD will be send only to player who is joining

- after mission end mission hash will be set to ""
This commit is contained in:
Szymon Porwolik
2019-03-09 16:51:53 +01:00
committed by VladMordock
parent 3be5a8765f
commit 8d1835f6f5
3 changed files with 8 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ Perun.MOTD_L2 = "Wymagamy obecnosci na 255Mhz (DCS SRS)" -- (string) Message
-- Variable init -- Variable init
Perun.Version = "v0.4.1" Perun.Version = "v0.5.0"
Perun.StatusData = {} Perun.StatusData = {}
Perun.SlotsData = {} Perun.SlotsData = {}
Perun.MissionData = {} Perun.MissionData = {}
@@ -319,9 +319,10 @@ end
Perun.onSimulationStop = function() Perun.onSimulationStop = function()
Perun.LogEvent("SimStop","Mission " .. Perun.MissionHash .. " finished"); Perun.LogEvent("SimStop","Mission " .. Perun.MissionHash .. " finished");
Perun.MissionHash="";
end end
Perun.onPlayerDisconnect= function(id, err_code) Perun.onPlayerDisconnect = function(id, err_code)
Perun.LogEvent("disconnect", "Player " .. net.get_player_info(id, "name") .. " disconnected; " .. err_code); Perun.LogEvent("disconnect", "Player " .. net.get_player_info(id, "name") .. " disconnected; " .. err_code);
end end
@@ -347,15 +348,11 @@ Perun.onSimulationFrame = function()
Perun.UpdateStatus() Perun.UpdateStatus()
end end
end end
Perun.onPlayerStart = function (id) Perun.onPlayerStart = function (id)
net.send_chat(Perun.MOTD_L1, id); net.send_chat_to(Perun.MOTD_L1, id);
net.send_chat(Perun.MOTD_L2, id); net.send_chat_to(Perun.MOTD_L2, id);
end end
Perun.onPlayerTrySendChat = function (playerID, msg, all) Perun.onPlayerTrySendChat = function (playerID, msg, all)

View File

@@ -33,7 +33,7 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>Perun.htm</WebPage> <WebPage>Perun.htm</WebPage>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.4.1.%2a</ApplicationVersion> <ApplicationVersion>0.5.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
// Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki // Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki
// przy użyciu symbolu „*”, tak jak pokazano poniżej: // przy użyciu symbolu „*”, tak jak pokazano poniżej:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.0.0")] [assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.4.0.0")] [assembly: AssemblyFileVersion("0.5.0.0")]
[assembly: NeutralResourcesLanguage("en")] [assembly: NeutralResourcesLanguage("en")]