mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-24 11:17:11 +00:00
show teleport locations only on server
This commit is contained in:
parent
a7dd283fd4
commit
8a38f81df7
1 changed files with 9 additions and 3 deletions
|
@ -43,9 +43,12 @@ namespace SanAndreasUnity.UI {
|
|||
|
||||
public static Transform[] FindSpawnPlaces ()
|
||||
{
|
||||
var obj = GameObject.Find("Player Spawns");
|
||||
if (obj)
|
||||
return obj.GetComponentsInChildren<Transform> ();
|
||||
if (Utilities.NetUtils.IsServer)
|
||||
{
|
||||
var obj = GameObject.Find("Player Spawns");
|
||||
if (obj)
|
||||
return obj.GetComponentsInChildren<Transform> ();
|
||||
}
|
||||
return new Transform[0];
|
||||
}
|
||||
|
||||
|
@ -60,6 +63,9 @@ namespace SanAndreasUnity.UI {
|
|||
protected override void OnWindowGUI ()
|
||||
{
|
||||
|
||||
if (!Utilities.NetUtils.IsServer)
|
||||
return;
|
||||
|
||||
if (null == Ped.Instance) {
|
||||
GUILayout.Label ("Player object not found");
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue