1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-01-10 15:43:00 +08:00
cfx-server-data/resources/[system]/rconlog/rconlog_client.lua
2016-12-15 13:40:07 +01:00

25 lines
484 B
Lua

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)