Lalalu Posted August 30, 2019 Share Posted August 30, 2019 Hola, quisiera saber como puedo dibujar un grupo ACL con Dx Link to comment
TRtam Posted August 30, 2019 Share Posted August 30, 2019 Este ejemplo dibuja cada acl con sus objetos, espero que te sirva: -- -- server -- function get(player) local result = {}; for i, acl in pairs(aclGroupList()) do result[i] = {name = aclGroupGetName(acl), objects = {}}; for object, name in pairs(aclGroupListObjects(acl)) do table.insert(result[i].objects, name); end end triggerClientEvent(player, "receive", resourceRoot, result); end addEvent("get", true); addEventHandler("get", resourceRoot, get); -- -- client -- local data = nil; function start() triggerServerEvent("get", resourceRoot, localPlayer); end addEventHandler("onClientResourceStart", resourceRoot, start); function receive(acls) data = acls; end addEvent("receive", true); addEventHandler("receive", resourceRoot, receive); function render() if not data then return; end local offset_y = 0; for i, value in pairs(data) do dxDrawText(value.name, 200, offset_y); offset_y = offset_y + 20; for i, object in pairs(value.objects) do dxDrawText(object, 220, offset_y); offset_y = offset_y + 20; end end end addEventHandler("onClientRender", root, render); 1 Link to comment
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