Commit 2c586e6e authored by Indra's avatar Indra

bug fixes

* fixed bug where password would't update in the gui
* fixed bug where port was 0 if port wasn't changed in gui at startup (gui would still show 4499)
* added default value at some GetUserInput fields so if you edit them they still have the same value as in the gui
* addeded scriptversion 0.9.4
* changed localscriptversion to 0.9.4
* fixed bug where displayname would be the password
parent 443d6e6b
......@@ -46,28 +46,23 @@
<ItemGroup>
<Reference Include="Lidgren.Network, Version=2012.1.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lidgren.Network.1.0.2\lib\net451\Lidgren.Network.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MaxMind.Db, Version=2.0.0.0, Culture=neutral, PublicKeyToken=66afa4cc5ae853ac, processorArchitecture=MSIL">
<HintPath>..\packages\MaxMind.Db.2.0.0\lib\net45\MaxMind.Db.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\MaxMind.Db.2.1.2\lib\net45\MaxMind.Db.dll</HintPath>
</Reference>
<Reference Include="MaxMind.GeoIP2, Version=2.6.0.0, Culture=neutral, PublicKeyToken=66afa4cc5ae853ac, processorArchitecture=MSIL">
<HintPath>..\packages\MaxMind.GeoIP2.2.6.0\lib\net45\MaxMind.GeoIP2.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\MaxMind.GeoIP2.2.7.1\lib\net45\MaxMind.GeoIP2.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NativeUI, Version=1.7.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\libs\NativeUI.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="protobuf-net, Version=2.1.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>..\packages\protobuf-net.2.1.0\lib\net451\protobuf-net.dll</HintPath>
<Private>True</Private>
<Reference Include="protobuf-net, Version=2.3.1.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>..\packages\protobuf-net.2.3.1\lib\net40\protobuf-net.dll</HintPath>
</Reference>
<Reference Include="ScriptHookVDotNet, Version=2.9.2.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
......@@ -110,8 +105,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PostBuildEvent>COPY "$(TargetPath)" "C:\Program Files\Rockstar Games\Grand Theft Auto V\scripts"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
......@@ -26,7 +26,7 @@ namespace GTACoOp
{
public static PlayerSettings PlayerSettings;
public static ServerSettings ServerSettings;
public static ScriptVersion LocalScriptVersion = ScriptVersion.VERSION_0_9_3;
public static ScriptVersion LocalScriptVersion = ScriptVersion.VERSION_0_9_4;
private readonly UIMenu _mainMenu;
public UIMenu _serverBrowserMenu;
......@@ -182,7 +182,7 @@ namespace GTACoOp
listenItem.SetRightLabel(PlayerSettings.LastIP);
listenItem.Activated += (menu, item) =>
{
_clientIp = Game.GetUserInput(255);
_clientIp = Game.GetUserInput(listenItem.RightLabel, 255);
if (!string.IsNullOrWhiteSpace(_clientIp))
{
PlayerSettings.LastIP = _clientIp;
......@@ -193,9 +193,10 @@ namespace GTACoOp
var portItem = new UIMenuItem("Port");
portItem.SetRightLabel(PlayerSettings.LastPort.ToString());
Port = PlayerSettings.LastPort;
portItem.Activated += (menu, item) =>
{
string newPort = Game.GetUserInput(5);
string newPort = Game.GetUserInput(Port.ToString(), 5);
int nPort; bool success = int.TryParse(newPort, out nPort);
if (!success)
{
......@@ -219,18 +220,18 @@ namespace GTACoOp
}
passItem.Activated += (menu, item) =>
{
string _LastPassword = Game.GetUserInput(255);
string _LastPassword = Game.GetUserInput(passItem.RightLabel, 255);
if (!string.IsNullOrEmpty(_LastPassword))
{
PlayerSettings.DisplayName = _LastPassword;
PlayerSettings.LastPassworde = _LastPassword;
Util.SaveSettings(null);
if (PlayerSettings.HidePasswords)
{
passItem.SetRightLabel(new String('*', PlayerSettings.LastPassword.Length));
passItem.SetRightLabel(new String('*', _LastPassword.Length));
}
else
{
passItem.SetRightLabel(PlayerSettings.LastPassword.ToString());
passItem.SetRightLabel(_LastPassword);
}
}
};
......@@ -265,13 +266,10 @@ namespace GTACoOp
_mainMenu.BindMenuToItem(_playersMenu, playersItem);
playersItem.Activated += (sender, item) => RebuildPlayersList();
var aboutItem = new UIMenuItem("~g~GTA V~w~ Coop mod v" + ReadableScriptVersion() + " by ~b~Bluscream~w~.")
var aboutItem = new UIMenuItem("~g~GTA V~w~ Coop mod v" + ReadableScriptVersion() + " by ~b~Bluscream~w~.");
aboutItem.Activated += (menu, item) =>
{
Enabled = true
};
aboutItem.Activated += (sender, item) =>
{
UI.Notify("GTA V Coop mod by Guad, temporary continued by Bluscream and wolfmitchell.");
UI.Notify("GTA V Coop mod by Guad, temporary continued by Bluscream, TheIndra and wolfmitchell.");
UI.Notify("Mod Version: " + ReadableScriptVersion());
UI.Notify("https://pydio.studiowolfree.com/public/gtacoop");
};
......@@ -288,15 +286,15 @@ namespace GTACoOp
var nameItem = new UIMenuItem("Display Name");
nameItem.SetRightLabel(PlayerSettings.DisplayName);
nameItem.SetRightLabel(PlayerSettings.LastPassworde);
nameItem.Activated += (menu, item) =>
{
string _DisplayName = Game.GetUserInput(32);
if (!string.IsNullOrWhiteSpace(_DisplayName))
{
PlayerSettings.DisplayName = _DisplayName;
PlayerSettings.LastPassworde = _DisplayName;
Util.SaveSettings(null);
nameItem.SetRightLabel(PlayerSettings.DisplayName);
nameItem.SetRightLabel(PlayerSettings.LastPassworde);
}
};
......@@ -811,7 +809,7 @@ namespace GTACoOp
UI.Notify("Clicked");
};*/
var meItem = new UIMenuItem(PlayerSettings.DisplayName);
var meItem = new UIMenuItem(PlayerSettings.LastPassworde);
meItem.SetRightLabel(((int)(Latency * 1000)) + "ms");
_playersMenu.AddItem(meItem);
/*meItem.Activated += (sender, item) =>
......@@ -1262,7 +1260,7 @@ namespace GTACoOp
var obj = new ConnectionRequest();
obj.Name = string.IsNullOrWhiteSpace(Game.Player.Name) ? "Player" : Game.Player.Name; // To be used as identifiers in server files
obj.DisplayName = string.IsNullOrWhiteSpace(PlayerSettings.DisplayName) ? obj.Name : PlayerSettings.DisplayName.Trim();
obj.DisplayName = string.IsNullOrWhiteSpace(PlayerSettings.LastPassworde) ? obj.Name : PlayerSettings.LastPassworde.Trim();
if (!string.IsNullOrEmpty(_password)) obj.Password = _password;
obj.ScriptVersion = (byte)LocalScriptVersion;
obj.GameVersion = (int)Game.Version;
......
......@@ -4,7 +4,7 @@ namespace GTACoOp
{
public class PlayerSettings
{
public string DisplayName { get; set; }
public string LastPassworde { get; set; }
public string LastIP { get; set; }
public int LastPort { get; set; }
public string LastPassword { get; set; }
......@@ -26,10 +26,10 @@ namespace GTACoOp
public PlayerSettings()
{
DisplayName = string.IsNullOrWhiteSpace(GTA.Game.Player.Name) ? "Player" : GTA.Game.Player.Name;
LastPassworde = string.IsNullOrWhiteSpace(GTA.Game.Player.Name) ? "Player" : GTA.Game.Player.Name;
MaxStreamedNpcs = 10;
MasterServerAddress = "http://46.101.1.92/";
BackupMasterServerAddress = "http://79.143.189.135/";
MasterServerAddress = "https://gtamaster.theindra.eu/";
BackupMasterServerAddress = "http://gtamaster.nofla.me/";
ActivationKey = Keys.F9;
HidePasswords = false;
LastIP = "127.0.0.1";
......
......@@ -34,8 +34,8 @@ namespace GTACoOp
Announce = true;
AllowNickNames = true;
AllowOutdatedClients = false;
MasterServer = "http://46.101.1.92/";
BackupMasterServer = "http://79.143.189.135/";
MasterServer = "https://gtamaster.theindra.eu/";
BackupMasterServer = "http://gtamaster.nofla.me/";
Filterscripts = new string[] { "" };
}
}
......
......@@ -36,6 +36,7 @@ namespace GTACoOp
VERSION_0_9_1 = 6,
VERSION_0_9_2 = 7,
VERSION_0_9_3 = 8,
VERSION_0_9_4 = 9
}
[ProtoContract]
......
......@@ -8,7 +8,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
......
......@@ -2,9 +2,9 @@
<packages>
<package id="Colorful.Console" version="1.0.5" targetFramework="net452" />
<package id="Lidgren.Network" version="1.0.2" targetFramework="net452" />
<package id="MaxMind.Db" version="2.0.0" targetFramework="net452" />
<package id="MaxMind.GeoIP2" version="2.6.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
<package id="protobuf-net" version="2.1.0" targetFramework="net452" />
<package id="MaxMind.Db" version="2.1.2" targetFramework="net452" />
<package id="MaxMind.GeoIP2" version="2.7.1" targetFramework="net452" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" />
<package id="protobuf-net" version="2.3.1" targetFramework="net452" />
<package id="System.Net.Http" version="4.1.0" targetFramework="net452" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment