Jump to content
  • 0

How to set /staff only for admins.


Batista

Question

7 answers to this question

Recommended Posts

  • 0
function joinStaffTeam ( source ) 
    local staffteam = getTeamFromName ( "Staff" ) 
    local acc = getPlayerAccount ( source ) --Let's get the account of this guy 
    if staffteam and not isGuestAccount ( acc ) and hasObjectPermissionTo ( "user."..getAccountName ( acc ), "command.ban" ) then --If the guy is logged in and can ban players (admin or higher) 
        setPlayerTeam ( source, staffteam ) 
    end 
end 
 addCommandHandler ( "staff", joinStaffTeam ) 

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