mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
docs: sv/cl_sync.lua headers
This commit is contained in:
@@ -32,6 +32,10 @@
|
|||||||
|
|
||||||
SYNC = {}
|
SYNC = {}
|
||||||
|
|
||||||
|
|
||||||
|
--[[----------------------------------------------------------------------------------
|
||||||
|
Sync functions
|
||||||
|
----------------------------------------------------------------------------------]]--
|
||||||
function SYNC:SendPowerState( state )
|
function SYNC:SendPowerState( state )
|
||||||
local otherPed = PLY:GetOtherPed()
|
local otherPed = PLY:GetOtherPed()
|
||||||
|
|
||||||
@@ -43,7 +47,9 @@ function SYNC:SendPowerState( state )
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--[[----------------------------------------------------------------------------------
|
||||||
|
Sync client events
|
||||||
|
----------------------------------------------------------------------------------]]--
|
||||||
RegisterNetEvent( "wk_wars2x_sync:receivePowerState" )
|
RegisterNetEvent( "wk_wars2x_sync:receivePowerState" )
|
||||||
AddEventHandler( "wk_wars2x_sync:receivePowerState", function( state )
|
AddEventHandler( "wk_wars2x_sync:receivePowerState", function( state )
|
||||||
local power = RADAR:IsPowerOn()
|
local power = RADAR:IsPowerOn()
|
||||||
|
|||||||
@@ -30,6 +30,9 @@
|
|||||||
|
|
||||||
---------------------------------------------------------------------------------------]]--
|
---------------------------------------------------------------------------------------]]--
|
||||||
|
|
||||||
|
--[[----------------------------------------------------------------------------------
|
||||||
|
Sync server events
|
||||||
|
----------------------------------------------------------------------------------]]--
|
||||||
RegisterNetEvent( "wk_wars2x_sync:sendPowerState" )
|
RegisterNetEvent( "wk_wars2x_sync:sendPowerState" )
|
||||||
AddEventHandler( "wk_wars2x_sync:sendPowerState", function( target, state )
|
AddEventHandler( "wk_wars2x_sync:sendPowerState", function( target, state )
|
||||||
TriggerClientEvent( "wk_wars2x_sync:receivePowerState", target, state )
|
TriggerClientEvent( "wk_wars2x_sync:receivePowerState", target, state )
|
||||||
|
|||||||
Reference in New Issue
Block a user