1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-01-11 00:03:18 +08:00
cfx-server-data/resources/[system]/rconlog/rconlog_client.lua

25 lines
484 B
Lua
Raw Normal View History

2016-12-15 20:40:07 +08:00
RegisterNetEvent('rlUpdateNames')
AddEventHandler('rlUpdateNames', function()
local names = {}
for i = 0, 31 do
if NetworkIsPlayerActive(i) then
names[GetPlayerServerId(i)] = { id = i, name = GetPlayerName(i) }
end
end
TriggerServerEvent('rlUpdateNamesResult', names)
end)
Citizen.CreateThread(function()
while true do
Wait(0)
if NetworkIsSessionStarted() then
TriggerServerEvent('rlPlayerActivated')
return
end
end
end)