SanAndreasUnity/Assets/Scripts/Behaviours/CharacterModelChanger.cs

24 lines
506 B
C#
Raw Normal View History

using UnityEngine;
2020-05-31 19:07:22 +02:00
2019-07-06 00:52:22 +02:00
namespace SanAndreasUnity.Behaviours
2020-05-31 19:07:22 +02:00
{
2019-07-06 00:52:22 +02:00
public class CharacterModelChanger : MonoBehaviour
2020-05-31 19:07:22 +02:00
{
2019-07-06 00:52:22 +02:00
public KeyCode actionKey = KeyCode.P;
2020-05-31 19:07:22 +02:00
2019-07-06 00:52:22 +02:00
private void Update()
2020-05-31 19:07:22 +02:00
{
if (Input.GetKeyDown(actionKey) && GameManager.CanPlayerReadInput())
2019-07-06 00:52:22 +02:00
{
if (Ped.Instance != null)
{
Chat.ChatManager.SendChatMessageToAllPlayersAsLocalPlayer("/skin");
}
2019-07-06 00:52:22 +02:00
}
2020-05-31 19:07:22 +02:00
}
}
2019-07-06 00:52:22 +02:00
}