From b8e93dce698c23cb38382242c1b5b3e6608783ef Mon Sep 17 00:00:00 2001 From: in0finite Date: Mon, 8 Jul 2019 22:21:23 +0200 Subject: [PATCH] "kill all peds" button available only on server --- Assets/Scripts/UI/PedsWindow.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/UI/PedsWindow.cs b/Assets/Scripts/UI/PedsWindow.cs index db169633..0408e2f8 100644 --- a/Assets/Scripts/UI/PedsWindow.cs +++ b/Assets/Scripts/UI/PedsWindow.cs @@ -60,11 +60,14 @@ namespace SanAndreasUnity.UI { widthPercsButtons, buttonSpacing ); } - // button to kill all peds - if (GUILayout.Button ("Kill all peds", GUILayout.Width (100))) { - KillAllPeds (); + if (NetUtils.IsServer) + { + // button to kill all peds + if (GUILayout.Button ("Kill all peds", GUILayout.Width (100))) { + KillAllPeds (); + } + GUILayout.Space (5); } - GUILayout.Space (5); // page view numbers