From 914b6d5f4494e7bede5407c349567384f2b76f03 Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 7 Nov 2020 12:32:36 +0000 Subject: [PATCH] Update cl_sync.lua --- cl_sync.lua | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/cl_sync.lua b/cl_sync.lua index d96472d..a533a80 100644 --- a/cl_sync.lua +++ b/cl_sync.lua @@ -46,9 +46,31 @@ SYNC.decors = { "wk_wars2x__rearAntennaLocked", DECOR_TYPES.BOOL } } +SYNC.data_types = +{ + radarEnabled = 1, + frontAntEnabled = 2, + frontAntMode = 3, + frontAntLockState = 4, + rearAntEnabled = 5, + rearAntMode = 6, + rearAntennaLockState = 7 +} + -- Create a thread to register the decorators that will be used Citizen.CreateThread( function() for _, v in pairs( SYNC.decors ) do DecorRegister( v[1], v[2] ) end -end ) \ No newline at end of file +end ) + +function SYNC:IsRadarOn() + return DecorGetBool( PLY.veh, "wk_wars2x__radarEnabled" ) +end + +-- data could be: +-- { _type = SYNC.radarEnabled, state = false } +-- { _type = SYNC.frontAntMode, state = 2 } +function SYNC:SendMessage( target, data ) + +end \ No newline at end of file