Jump to content

Help me at aclGroupRemoveObject


ahmedfef

Recommended Posts

Posted
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

Posted

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

Posted

You think we will get your code? Haha

Post the code or we can't help. What is accountname?

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted
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

Posted
  
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 :)

My Projects!

No one.

Posted
  
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

Posted

What?

You think I will get your fucking code? Better you start learning. I don't need your code, I'm trying to help you.

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted

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.

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