Jump to content

>>>>> الموضوع العام <<<<<


Recommended Posts

xAddToGroupFunction_ = function ( Group,Price )

local account = getAccountName(getPlayerAccount(source));

if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#=[يجب عليك التسجيل اولا]=",source,255,0,0,true); end

if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#You have this rank, please choose another class",source,0,255,255,true); end

if isObjectInACLGroup("user."..account, aclGetGroup("Ex-Admin")) then return removeObjects(source) end

local sValue = getElementData( source,'PlayTime' )

if not sValue then sValue = '0:0:0' end

local data = split(sValue,':')

local hour = tonumber( data[1] )

if hour == nil or not tonumber(hour) then hour = 0 end

if ( hour >= tonumber(Price)) then

aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account);

outputChatBox("#=[مبروك حصولك على الرتبه]= "..Name,source,255,0,0,true);

else

outputChatBox("#=[ انت لا تملك الساعات الكافيه]=",source,0,255,255,true);

end

end

addEvent("Accept:the:request",true)

addEventHandler("Accept:the:request",root,xAddToGroupFunction_)

function removeObjects(plr)

if plr and isElement(plr) and not isGuestAccount (getPlayerAccount(element)) then

for k,v in ipairs(aclGroupList()) do

aclGroupRemoveObject (v, "user.".. getAccountName(getPlayerAccount(element)));

end

end

end

تشوفونه في قسم البرمجة ^^

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