"user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("لا يمكنك اختيار الرتبه لانه فعلا معك",source,238,158,73,true); end
if isObjectInACLGroup("user."..account, aclGetGroup("Admin-EX")) then return outputChatBox("انت مخآلف لايمكنك الحصول على رتبه",source,238,158,73,true); 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
for _,rn in ipairs(Ranks) do
if ( aclGetGroup(rn[1]) ) then
if ( isObjectInACLGroup("user."..account.."",aclGetGroup(rn[1])) ) then
if ( rn[1] ~= "Console" and rn[1] ~= "Managers" and rn[1] ~= "Maps" ) then
aclGroupRemoveObject(aclGetGroup(rn[1]),"user."..account)
end
end
end
end
aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account);
outputChatBox("مبروك لقد حصلت على الرتبه "..Name,source,238,158,73,true);
else
outputChatBox("عدد ساعاتك غير كافيه",source,238,158,73,true);
end
end
addEvent("Accept:the:request",true)
addEventHandler(
السلام عليكم ورحمة الله وبركاته ابي احد يحولي هالكود من داتا ساعات الى داتا لفل