--client
addEventHandler("onClientResourceStart", root,
function()
triggerServerEvent( "GroupsCkeck", localPlayer )
end
)
function checkGroups( GropaT )
guiGridListClear( groupsGrid )
local RowG = guiGridListAddRow( groupsGrid )
local gr = GropaT
guiGridListSetItemText( groupsGrid, RowG, 1, ( tostring ( gr ) ), false, false )
guiGridListSetItemColor( groupsGrid, RowG, 1, 255, 255, 0 )
end
addEvent( "addGroups", true )
addEventHandler( "addGroups", root, checkGroups )
--server
function showGroups( )
local groupsAcc = {}
groupsAcc = aclGroupList()
for i, v in ipairs( groupsAcc ) do
local Gname = aclGroupGetName( v )
GropaT = tostring( Gname )
triggerClientEvent( source, "addGroups", source, GropaT )
end
end
addEvent( "GroupsCkeck", true )
addEventHandler( "GroupsCkeck", root, showGroups )