mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
fix: still syncing when there's no other player
This commit is contained in:
@@ -35,9 +35,11 @@ SYNC = {}
|
|||||||
function SYNC:SendPowerState( state )
|
function SYNC:SendPowerState( state )
|
||||||
local otherPed = PLY:GetOtherPed()
|
local otherPed = PLY:GetOtherPed()
|
||||||
|
|
||||||
local otherPly = GetPlayerServerId( NetworkGetPlayerIndexFromPed( otherPed ) )
|
if ( otherPed ~= nil and otherPed ~= 0 ) then
|
||||||
|
local otherPly = GetPlayerServerId( NetworkGetPlayerIndexFromPed( otherPed ) )
|
||||||
|
|
||||||
TriggerServerEvent( "wk_wars2x_sync:sendPowerState", otherPly, state )
|
TriggerServerEvent( "wk_wars2x_sync:sendPowerState", otherPly, state )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user