Jump to content

aclGetGroup


TuRisMo

Recommended Posts

Posted
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.

Posted

And what is the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Show us how you trigger it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
function joinTeam() 
     triggerServerEvent("setteam", player) 
     guiSetVisible(windowjob, false) 
     showCursor(false) 
     guiSetInputEnabled(false) 
end 
addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) 

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

ahmadsig1.png

Nobody is perfect , I'm nobody.

22771qw7.jpg

Skype : ahmad.nasser37

Posted

Since he's using a defined argument server side, he must trigger localPlayer twice.

triggerServerEvent ( "setteam", localPlayer, localPlayer ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...