Jump to content

Help me at aclGroupRemoveObject


ahmedfef

Recommended Posts

try this :
    local accountname = getAccountName (getPlayerAccount (thePlayer)) 
aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) 
  

    local accountname = getAccountName (getPlayerAccount (thePlayer)) 

local is Error

aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) 

I will Try This

Link to comment

i can't put my Code but i Can put This Only

aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname)      
         outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) 
     
    aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) 

so it's give player admin and remove admin after add

Link to comment
i can't put my Code but i Can put This Only
aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname)      
         outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) 
     
    aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) 

so it's give player admin and remove admin after add

we cant help u with that code

Link to comment
  
local time = 3000 -- Here put the time in miliseconds , in wich the admin will be removed : P 
local timesToExecute = 1 
local account = getPlayerAccount(source) 
local accountName = getAccountName(account) 
aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname)      
outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) 
setTimer( function () 
                aclGroupRemoveObject(group,"user."..accountName) 
               end , time , timesToExecute ) 

Just do like this :)

Link to comment
  
local time = 3000 -- Here put the time in miliseconds , in wich the admin will be removed : P 
local timesToExecute = 1 
local account = getPlayerAccount(source) 
local accountName = getAccountName(account) 
aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname)      
outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) 
setTimer( function () 
                aclGroupRemoveObject(group,"user."..accountName) 
               end , time , timesToExecute ) 

Just do like this :)

Ok I will try this

if do'nt work i do new Event To remove Object

Link to comment

As I posted in an example at the wiki just a moment ago:

function deladm (playerSource, commandName, accountName) 
    if accountName then --Make the script able to detect if a user is given. 
        aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName) --Removing the admin. 
        outputChatBox ("ACL: Account '"..accountName.."' succesfully removed as admin.", playerSource) -- Giving you a messsage. 
        outputChatBox ("ACL: Someone have removed you as admin.", accountName) -- giving the poor removed guy a message. 
    else --Make the Syntax display. 
        outputChatBox ("ACL: No account name specified.", playerSource) 
        outputChatBox ("ACL: Syntax: /deladmin [accountName]", playerSource) 
    end 
end 
addCommandHandler ("deladmin", deladm) 

I am using it, though at a ACL group with another name.

Server side.

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