Jump to content

aclGetGroup


TuRisMo

Recommended Posts

team = createTeam ( "Team", 0, 50, 0 )  
  
function addtoteam(thePlayer) 
    local account = getPlayerAccount(thePlayer) 
    local accName = getAccountName ( account )  
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    setPlayerTeam(thePlayer, team) 
    setElementModel(thePlayer, 287) 
    setElementData( thePlayer, "Occupation", "Example", true ) 
    outputChatBox("You are now Team.", thePlayer, 0, 255, 0) 
    end 
end 
addEvent("setteam", true) 
addEventHandler("setteam", root, addtoteam) 

So the point is that if the accountname is in Admin ACL group then he will be Set in the team "Team", and the event setteam will be trigered from a GUI.

Link to comment
    function joinTeam() 
         triggerServerEvent("setteam", localPlayer) 
         guiSetVisible(windowjob, false) 
         showCursor(false) 
         guiSetInputEnabled(false) 
    end 
    addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...