From d7aadf29dc6fcc18cbfc8981faae112536489306 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 13 Nov 2020 19:18:39 +0000 Subject: [PATCH] Added PLY:CanControlRadar() --- cl_radar.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cl_radar.lua b/cl_radar.lua index 9d05daf..2ebb5ee 100644 --- a/cl_radar.lua +++ b/cl_radar.lua @@ -184,6 +184,11 @@ function PLY:CanRunRadar() return self:VehicleStateValid() and ( self:IsDriver() or ( self:IsPassenger() and RADAR:IsPassengerViewAllowed() ) ) end +-- Returns if the player is allowed to control the radar from the passenger seat +function PLY:CanControlRadar() + return self:VehicleStateValid() and self:IsPassenger() and RADAR:IsPassengerControlAllowed() +end + -- The main purpose of this thread is to update the information about the local player, including their -- ped id, the vehicle id (if they're in one), whether they're in a driver seat, and if the vehicle's class -- is valid or not