Jump to content

Government


MannPro

Recommended Posts

Use this:
if isObjectInACLGroup(player, aclGetGroup("Government")) then 

Whenever you want to restrict something.. player being the player checked.

Can you give me full code?

Like this?

function aclGetGroup ("Government",player) 
if isObjectInACLGroup(player, aclGetGroup("Government")) then 

Link to comment

it's Really Simple . . . ,

local Object = createObject ( X ,Y ,Z ,0 ,0 ,0 ) --- your object 
local Marker = createMarker (  X ,Y ,Z  ,"cylinder",5 , 170 ) --- your Marker 
function OpenObject ( player ) 
    if isElementWithinMarker ( player, Marker ) then --- if player in the marker then 
    local accName = getAccountName ( getPlayerAccount ( player ) ) --- get his account 
    if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Government" ) ) then --- if he is on ACL Government then 
    moveObject ( Object,140.19999694824 ,198.4000244141 ,15.10000038147 ) --- open 
            else  
            moveObject ( Object,136.19999694824 ,1942.4000244141 ,21.10000038147 ) --- close 
                end 
        else 
        outputChatBox ( "* You must be  Government to do this ", player, 200, 0, 0, true ) --- Msg  
    end 
end 
addCommandHandler('open', openObject ) --- Command in f8 open  

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