Jump to content

Problem With removing user from acl


Recommended Posts

hey, im making a vip panel, and i have set subscription time for the user, so after the due date.. it supposed to remove the player from ACL group automatic, but its not removing..

setTimer(
function()
time = getRealTime()
years = time.year
month = time.month
day = time.monthday
TheDate = years+1900 .."-".. month .."-".. day
for index, VIP in ipairs ( getActivationCodes() ) do
local Date = gettok ( VIP [ "TimeToEnd" ], 1, string.byte('|') )
if Date == TheDate then
if VIP [ "Status" ] == 'true' then
setActivationCodeStatus ( VIP [ "ActivationCode" ], 'false' )
aclGroupRemoveObject(aclGetGroup("VIP"), "user."..getAccountName ( getPlayerAccount ( player ) ))
for i,player in ipairs (getElementsByType("player")) do
if VIP [ "PlayerName" ] == getPlayerName(player) then
setElementData(player,"VIP",false)
outButDxChat("#708090[VIP System] : #FF0000 Your VIP is end !!",player,0,255,255)
end
end
end
end
end
end,60000,0
)

after the due time ends.. player still can access /vip panel any help ? :/

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