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:
@@ -281,12 +281,18 @@ SYNC = {}
|
|||||||
----------------------------------------------------------------------------------]]--
|
----------------------------------------------------------------------------------]]--
|
||||||
-- Returns if the given player has the remote open
|
-- Returns if the given player has the remote open
|
||||||
function SYNC:IsRemoteAlreadyOpen( ply )
|
function SYNC:IsRemoteAlreadyOpen( ply )
|
||||||
|
if ( not RADAR:IsPassengerViewAllowed() ) then
|
||||||
|
return false
|
||||||
|
else
|
||||||
return DecorGetBool( ply, "wk_wars2x_sync_remoteOpen" )
|
return DecorGetBool( ply, "wk_wars2x_sync_remoteOpen" )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Sets the remote open decor for the local player to the given state
|
-- Sets the remote open decor for the local player to the given state
|
||||||
function SYNC:SetRemoteOpenState( state )
|
function SYNC:SetRemoteOpenState( state )
|
||||||
|
if ( RADAR:IsPassengerViewAllowed() ) then
|
||||||
DecorSetBool( PLY.ped, "wk_wars2x_sync_remoteOpen", state )
|
DecorSetBool( PLY.ped, "wk_wars2x_sync_remoteOpen", state )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Used to get the other ped (driver/passenger) in a vehicle and calls the given callback. This function will only work
|
-- 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