Jump to content

Oque há de errado script


Recommended Posts

tipo coloquei só para um cargo na acl poder digitar o comando mais n funciona o comando

function giveAdminRights (playerSource, commandName, accountName) --add the function giveAdminRights and specify its arguments 
if accountName then --if there was an accountName entered then 
if isObjectInACLGroup ( 'user.'..getAccountName( getPlayerAccount( accountName ) ), aclGetGroup( 'Policia Militar' ) ) then 
aclGroupAddObject (aclGetGroup("VIP"), "user."..accountName) --add an ACL object using the form "user.[accountName]" to the ACL group "Admin" 
outputChatBox ("Account '"..accountName.."' succesfully added to the admin group", playerSource) --output a notification to the player who entered the command that the acocunt was successfully added 
else --else output an error message and the correct syntax of the command to the player who entered it 
outputChatBox ("No account name specified.", playerSource) 
outputChatBox ("Correct syntax: /giveAccountAdminRights [accountName]", playerSource) 
end 
end 
end 
addCommandHandler ("giveAccountAdminRights", giveAdminRights) --add a command "giveAccountAdminRights" and attch the function "giveAdminRights" to it 

Link to comment
function giveAdminRights (playerSource, commandName, accountName) --add the function giveAdminRights and specify its arguments 
    local accountName = getPlayerFromName(accountName) 
    if accountName then --if there was an accountName entered then 
        if isObjectInACLGroup ( 'user.'..getAccountName( getPlayerAccount( accountName ) ), aclGetGroup( 'Policia Militar' ) ) then 
            aclGroupAddObject (aclGetGroup("VIP"), "user."..accountName) --add an ACL object using the form "user.[accountName]" to the ACL group "Admin" 
            outputChatBox ("Account '"..accountName.."' succesfully added to the admin group", playerSource) --output a notification to the player who entered the command that the  was successfully added 
        else --else output an error message and the correct syntax of the command to the player who entered it 
            outputChatBox ("No account name specified.", playerSource) 
            outputChatBox ("Correct syntax: /giveAccountAdminRights [accountName]", playerSource) 
        end 
    end 
end 
addCommandHandler("giveAccountAdminRights", giveAdminRights) --add a command  

Obs:E lembre-se de colocar o resource na ACL de Admin

Link to comment
function giveAdminRights (playerSource, commandName, accountName) --add the function giveAdminRights and specify its arguments 
    local theAccount = getPlayerFromName(accountName) 
    if theAccount then --if there was an accountName entered then 
        if isObjectInACLGroup ( 'user.'..getAccountName( getPlayerAccount( theAccount ) ), aclGetGroup( 'Policia Militar' ) ) then 
            aclGroupAddObject (aclGetGroup("VIP"), "user."..theAccount) --add an ACL object using the form "user.[accountName]" to the ACL group "Admin" 
            outputChatBox ("Account '"..theAccount.."' succesfully added to the admin group", playerSource) --output a notification to the player who entered the command that the  was successfully added 
        else --else output an error message and the correct syntax of the command to the player who entered it 
            outputChatBox ("No account name specified.", playerSource) 
            outputChatBox ("Correct syntax: /giveAccountAdminRights [accountName]", playerSource) 
        end 
    end 
end 
addCommandHandler("giveAccountAdminRights", giveAdminRights) --add a command 

Tente agora, não se esqueça de verificar /debugscript 3 quando você inicia o recurso ou use o comando.

Link to comment
function giveAdminRights (playerSource, commandName, accountName) --add the function giveAdminRights and specify its arguments 
    local theAccount = getPlayerFromName(accountName) 
    if theAccount then --if there was an accountName entered then 
        if isObjectInACLGroup ( 'user.'..getAccountName( getPlayerAccount( playerSource ) ), aclGetGroup( 'Policia Militar' ) ) then 
            aclGroupAddObject (aclGetGroup("VIP"), "user."..theAccount) --add an ACL object using the form "user.[accountName]" to the ACL group "Admin" 
            outputChatBox ("Account '"..theAccount.."' succesfully added to the admin group", playerSource) --output a notification to the player who entered the command that the  was successfully added 
        else --else output an error message and the correct syntax of the command to the player who entered it 
            outputChatBox ("No account name specified.", playerSource) 
            outputChatBox ("Correct syntax: /giveAccountAdminRights [accountName]", playerSource) 
        end 
    end 
end 
addCommandHandler("giveAccountAdminRights", giveAdminRights) --add a command 

se for o script q você pediu no outro topico essa é a solução

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