Jump to content

add acl command


Recommended Posts

Posted

I can not add anyone with this command! is something wrong?

  
function givevip (playerSource, commandName, accountName) 
    local accName = getAccountName ( getPlayerAccount ( playerSource ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
        if accountName then 
            aclGroupAddObject (aclGetGroup("Vip"), "user."..accountName) 
            outputChatBox ("Conta '"..accountName.."' add aos Vips com sucesso!", playerSource) 
        else 
            outputChatBox ("Nome incorreto", playerSource) 
            outputChatBox ("Correto: /darvip [accountName]", playerSource) 
        end 
    end 
end 
addCommandHandler ("darvip", givevip) 
  

Posted

The script seems to be fine, did you set it as server side on the meta.xml? is the resource added to "Admin" group on the acl.xml?

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

meta.xml

  
<meta> 
    <info author="aafaahafae" version="1.0" name="vip" type="misc" /> 
    <script src="vip.lua" type="server" /> 
</meta> 
  

acl.xml

  
    <group name="Admin"> 
        <acl name="Moderator"></acl> 
        <acl name="SuperModerator"></acl> 
        <acl name="Admin"></acl> 
        <acl name="RPC"></acl> 
        <object name="resource.admin"></object> 
        <object name="resource.webadmin"></object> 
        <object name="resource.DayZ"></object> 
        <object name="resource.login"></object> 
        <object name="resource.slothbot"></object> 
        <object name="user.Devil_Dead"></object> -- My account name 
        <object name="user.Angel_Dead"></object> 
        <object name="user.ADHOCNEW"></object> 
    </group> 
    <group name="Vip"> 
        <object name="resource.vip"></object> 
        <object name="user.Devil_Dead"></object> 
        <object name="user.Angel_Dead"></object> -- I add these 2 names in the file, not by command 
    </group> 
  

Posted

Change the type to 'gamemode' and try .

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

That won't fix anything, Pain.

@devildead: Your acl is wrong, use this:

    "Admin"> 
        "Moderator">
        "SuperModerator">
        "Admin">
        "RPC">
        "resource.admin"> 
        "resource.webadmin"> 
        "resource.DayZ"> 
        "resource.login"> 
        "resource.slothbot"> 
        "user.Devil_Dead"> -- My account name 
        "user.Angel_Dead"> 
        "user.ADHOCNEW"> 
        "resource.vip"> 
    
    "Vip"> 
        "user.Devil_Dead"> 
        "user.Angel_Dead"> -- I add these 2 names in the file, not by command 
    

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

enable function once the player enters the game?

  
function vipentered( player ) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Vip" ) ) then 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0)        
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0)        
        outputChatBox ( "#4200FF Voce e um VIP!", player, 255,0,0) 
        outputChatBox ( "#4200FF Para ver seus comandos, use #ff0000 /ajudavip", player, 255,0,0) 
    end 
end 
  

Posted
'onPlayerJoin' 

??

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted
  
addEventHandler("onPlayerLogin", root, 
function ( player ) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Vip" ) ) then 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0)        
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0)        
        outputChatBox ( "#4200FF Voce e um VIP!", player, 255,0,0) 
        outputChatBox ( "#4200FF Para ver seus comandos, use #ff0000 /ajudavip", player, 255,0,0) 
        outputChatBox ( "#4200FF E para ver os comandos do servidor: #ff0000 /ajuda", player, 255,0,0) 
    else 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0)        
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0) 
        outputChatBox ( " ", player, 255,0,0)        
        outputChatBox ( "#4200FF Compre sua base+vip por apenas RS5.00", player, 255,0,0) 
        outputChatBox ( "#4200FF Add skype: devildead622   e confira!", player, 255,0,0) 
        outputChatBox ( "#4200FF Para ver os comandos do servidor: #ff0000 /ajuda", player, 255,0,0) 
    end 
end 
) 
  

so? ^^

Posted
  
addEventHandler("onPlayerLogin", root, 
function ( _, account ) 
    local accName = getAccountName ( account ) 
        outputChatBox ( " ", source, 255,0,0) 
        outputChatBox ( " ", source, 255,0,0) 
        outputChatBox ( " ", source, 255,0,0)       
        outputChatBox ( " ", source, 255,0,0) 
        outputChatBox ( " ", source, 255,0,0) 
        outputChatBox ( " ", source, 255,0,0) 
        outputChatBox ( " ", source, 255,0,0)      
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Vip" ) ) then  
        outputChatBox ( "#4200FF Voce e um VIP!", source, 255,0,0) 
        outputChatBox ( "#4200FF Para ver seus comandos, use #ff0000 /ajudavip", source, 255,0,0) 
        outputChatBox ( "#4200FF E para ver os comandos do servidor: #ff0000 /ajuda", source, 255,0,0) 
    else 
        outputChatBox ( "#4200FF Compre sua base+vip por apenas RS5.00", source, 255,0,0) 
        outputChatBox ( "#4200FF Add skype: devildead622   e confira!", source, 255,0,0) 
        outputChatBox ( "#4200FF Para ver os comandos do servidor: #ff0000 /ajuda", source, 255,0,0) 
    end 
end 
) 

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

You're welcome.

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