ZeyadGTX Posted October 30, 2014 Posted October 30, 2014 Tried that to draw Text for admins - Moderators but not working Client function showOnlineStaff(moderators,admins) moderatorText = "Moderators: " adminText = "Admins: " for k,moderator in ipairs(moderators) do local name = getPlayerName(moderator):gsub("#%x%x%x%x%x%x","") if k == 1 then moderatorText = moderatorText..""..name else moderatorText = moderatorText..", "..name end end for k,admin in ipairs(admins) do local name = getPlayerName(admin):gsub("#%x%x%x%x%x%x","") if k == 1 then adminText = adminText..""..name else adminText = adminText..", "..name end end end addEvent("onClientStaffRefresh", true) addEventHandler("onClientStaffRefresh", getRootElement(), showOnlineStaff) function showStaffMembers() if getElementData(player, "state.hud") == "disabled" then return end if moderatorText then dxDrawText(moderatorText, (8/1024)*sWidth, (730/768)*sHeight, (130/1024)*sWidth, (130/768)*sHeight, tocolor (255, 255, 255, 255), (0.4/1366)*sWidth,(0.4/768)*sHeight,"bankgothic","left","top",false,false,false,false) end if adminText then dxDrawText(adminText, (8/1024)*sWidth, (745/768)*sHeight, (130/1024)*sWidth, (130/768)*sHeight, tocolor (255, 255, 255, 255), (0.4/1366)*sWidth,(0.4/768)*sHeight,"bankgothic","left","top",false,false,false,false) end end addEventHandler("onClientRender", getRootElement(), showStaffMembers) Server : function ShowStaffMembers() 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 ( "Console" ) ) then if (admins == "") then admins = getPlayerName(v) else admins = admins .. ", " .. getPlayerName(v) end end end end triggerClientEvent("showOnlineStaff", getResourceRootElement(), admins) end addEventHandler( "onPlayerChat", getRootElement(), showStaffMembers ) My nick in MTA is Spider
Castillo Posted October 31, 2014 Posted October 31, 2014 I don't get it, why are you triggering the event to show the staff using the onPlayerChat event? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted November 1, 2014 Posted November 1, 2014 I don't get it, why are you triggering the event to show the staff using the onPlayerChat event? It's from Grafuroam client side scripts, and he didn't manage to make the server side so he just copied the server side from random codes in a random topic. Remove the clientside. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now