revert adaption

This commit is contained in:
in0finite 2021-02-22 20:21:14 +01:00
parent e36c87861f
commit 000a8a6cc9
2 changed files with 8 additions and 3 deletions

View file

@ -1,4 +1,5 @@
using UnityEngine;
using SanAndreasUnity.Utilities;
using UnityEngine;
namespace SanAndreasUnity.Behaviours
{
@ -14,7 +15,10 @@ namespace SanAndreasUnity.Behaviours
{
if (Ped.Instance != null)
{
Chat.ChatManager.SendChatMessageToAllPlayersAsLocalPlayer("/veh");
if (NetUtils.IsServer)
Vehicles.Vehicle.CreateRandomInFrontOf(Ped.Instance.transform);
else
Chat.ChatManager.SendChatMessageToAllPlayersAsLocalPlayer("/veh");
}
}
}

View file

@ -2,6 +2,7 @@
using UnityEngine;
using SanAndreasUnity.Behaviours;
using System.Linq;
using SanAndreasUnity.Behaviours.Vehicles;
namespace SanAndreasUnity.UI {
@ -56,7 +57,7 @@ namespace SanAndreasUnity.UI {
if (GUILayout.Button ("Spawn random vehicle")) {
if (Ped.Instance != null)
SendCommand("/veh");
Vehicle.CreateRandomInFrontOf(nearbyTransform);
}
if (GUILayout.Button("Change player model"))