mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
feat(sync): require passenger view enabled for remote decors
This commit is contained in:
10
cl_sync.lua
10
cl_sync.lua
@@ -281,12 +281,18 @@ SYNC = {}
|
||||
----------------------------------------------------------------------------------]]--
|
||||
-- Returns if the given player has the remote open
|
||||
function SYNC:IsRemoteAlreadyOpen( ply )
|
||||
return DecorGetBool( ply, "wk_wars2x_sync_remoteOpen" )
|
||||
if ( not RADAR:IsPassengerViewAllowed() ) then
|
||||
return false
|
||||
else
|
||||
return DecorGetBool( ply, "wk_wars2x_sync_remoteOpen" )
|
||||
end
|
||||
end
|
||||
|
||||
-- Sets the remote open decor for the local player to the given state
|
||||
function SYNC:SetRemoteOpenState( state )
|
||||
DecorSetBool( PLY.ped, "wk_wars2x_sync_remoteOpen", state )
|
||||
if ( RADAR:IsPassengerViewAllowed() ) then
|
||||
DecorSetBool( PLY.ped, "wk_wars2x_sync_remoteOpen", state )
|
||||
end
|
||||
end
|
||||
|
||||
-- Used to get the other ped (driver/passenger) in a vehicle and calls the given callback. This function will only work
|
||||
|
||||
Reference in New Issue
Block a user