Search the Community
Showing results for tags 'online'.
-
No caso quero mostrar quantos staffs estão online em 10 em 10 minutos e não fasso ideia
-
I want get online player count from my secondary server, and show with a label.. But how is it possible?
-
Client.lua : LblOnlineAdmins = {} admins = "" function setAdminList(list) if (admins ~= list) then admins = list if (admins == "") then guiSetText(LblOnlineAdmins, "Admins online: none") else guiSetText(LblOnlineAdmins, "Admins online: " .. admins) end end end addEvent( "setAdminList", true ) addEventHandler( "setAdminList", getRootElement(), setAdminList ) function getAdmins() LblOnlineAdmins = guiCreateLabel(0,0.9466,0.3799,0.0247,"",true) guiLabelSetColor(LblOnlineAdmins,255,0,0) guiLabelSetVerticalAlign(LblOnlineAdmins,"top") guiLabelSetHorizontalAlign(LblOnlineAdmins,"left",true) guiSetFont(LblOnlineAdmins,"default-bold-small") end addEventHandler( "onClientResourceStart", getRootElement( ), getAdmins) Server.lua : admins = "" function processAdminList() players = getElementsByType ( "player" ) admins = "" for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then if (admins == "") then admins = getPlayerName(v) else admins = admins .. ", " .. getPlayerName(v) end end end end triggerClientEvent("setAdminList", getResourceRootElement(), admins) end addEventHandler( "onPlayerLogin", getRootElement(), processAdminList ) addEventHandler( "onPlayerLogout", getRootElement(), processAdminList ) addEventHandler( "onPlayerChangeNick", getRootElement(), processAdminList ) addEventHandler( "onPlayerQuit", getRootElement(), processAdminList ) addEventHandler("onPlayerJoin", getRootElement(), processAdminList) how to fix?:(
-
local screenW, screenH = guiGetScreenSize() local online = #getElementsByType("player") addEventHandler("onClientRender", root, function() dxDrawRectangle(screenW * 0.0069, screenH * 0.7144, screenW * 0.2188, screenH * 0.0289, tocolor(0, 0, 0, 178), false) dxDrawText("#00FF00Online #FFffffkockák: #00bafF"..online.."/32", screenW * 0.0097, screenH * 0.7144, screenW * 0.2257, screenH * 0.7422, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, true, false) end ) will not charge players only if resource restart, why? /sorry for my bad english/