adapt VehicleSpawnerWindow

This commit is contained in:
in0finite 2019-07-08 23:50:54 +02:00
parent a935c442ae
commit 8510935b63

View file

@ -88,7 +88,17 @@ namespace SanAndreasUnity.UI {
//GUILayout.BeginHorizontal ();
if (GUILayout.Button (v.GameName, GUILayout.Width(this.columnWidths[0]))) {
Vehicle.CreateInFrontOf (v.Id, Ped.Instance.transform);
if (Utilities.NetUtils.IsServer)
{
if (Ped.Instance != null)
Vehicle.CreateInFrontOf (v.Id, Ped.Instance.transform);
}
else if (Net.PlayerRequests.Local != null)
{
Net.PlayerRequests.Local.RequestVehicleSpawn(v.Id);
}
}
//GUILayout.Label (v.ClassName, GUILayout.Width (this.columnWidths [1]));
//GUILayout.Label (v.Id.ToString(), GUILayout.Width (this.columnWidths [2]));