Jump to content

ACL lock please


xXMADEXx

Recommended Posts

Posted

Hey guys, i tried putting an ACL lock for admins on here, but it made the script not work. Can anyone help me?

function CheatMode(commandName,command,turn) 
local account = getPlayerAccount(thePlayer) 
if (not account or isGuestAccount(account)) then return end 
local accountName = getAccountName(account) 
if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "lvl 5" ) ) ) then 
    local turned={ 
    ['on']=true, 
    ['off']=false, 
    } 
    if (command) and (turn) then 
        if (command=='air') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('aircars',turned[turn]) 
        elseif (command=='water') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('hovercars',turned[turn]) 
        elseif (command=='bike') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('extrabunny',turned[turn]) 
        elseif (command=='jump') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('extrajump',turned[turn]) 
        elseif (command=='help') or (command==nil) then 
            outputChatBox('First available parameter: water, bike, jump, help, air') 
            outputChatBox('Second available parameter: on, off') 
        end 
    else 
        outputChatBox('Not enough parameters') 
        outputChatBox('First available parameter: water, bike, jump, help, air') 
        outputChatBox('Second available parameter: on, off') 
    end 
end 
addCommandHandler('cheat', CheatMode,false) 

Please help me.

Posted

I'm sorry,but i love colors

function CheatMode(commandName,command,turn) 
local account = getPlayerAccount(thePlayer) 
if (not account or isGuestAccount(account)) then return end 
local accountName = getAccountName(account) 
if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "lvl 5" ) ) ) then 
    local turned={ 
    ['on']=true, 
    ['off']=false, 
    } 
    if (command) and (turn) then 
        if (command=='air') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('aircars',turned[turn]) 
        elseif (command=='water') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('hovercars',turned[turn]) 
        elseif (command=='bike') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('extrabunny',turned[turn]) 
        elseif (command=='jump') and (turned[turn]~=nil) then 
            setWorldSpecialPropertyEnabled('extrajump',turned[turn]) 
        elseif (command=='help') or (command==nil) then 
            outputChatBox('First available parameter: water, bike, jump, help, air') 
            outputChatBox('Second available parameter: on, off') 
        end 
    else 
        outputChatBox('Not enough parameters') 
        outputChatBox('First available parameter: water, bike, jump, help, air') 
        outputChatBox('Second available parameter: on, off') 
    end 
end 
addCommandHandler('cheat', CheatMode,false) 

Posted

That because you're using Server side and Client side functions in Client side script, you need to make trigger.

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