#Prov Posted February 12, 2019 Share Posted February 12, 2019 (edited) السلام عليكم ورحمة الله وبركاته معي مود اسل وابي اخفي قروب الكونسل + الادمن من القائمه وشكراً Client local me = getLocalPlayer() addEventHandler("onClientResourceStart",resourceRoot,function() Main = guiCreateWindow(0.2,0.2,0.6,0.6,"ACL by ^oldYoRk | الاسل من صنع اولد يوركـ ",true) guiSetVisible(Main,false) ComboBox = guiCreateComboBox(0.05,0.05,0.9,0.6,"Admin",true,Main) Grid = guiCreateGridList(0.05, 0.2, 0.9, 0.65, true,Main) C_O = guiGridListAddColumn(Grid, "Object Name", 0.5) C_N = guiGridListAddColumn(Grid, "Name", 0.6) C_T = guiGridListAddColumn(Grid, "Last Login", 0.6) addObj = guiCreateButton(0.05,0.9,0.45,0.07,"Add Object",true,Main) removeObj = guiCreateButton(0.5,0.9,0.45,0.07,"Delete Object",true,Main) ---------------------------------- myFont = guiCreateFont( "1.ttf", 10 ) guiSetFont ( Main, myFont ) myFont = guiCreateFont( "2.ttf", 10 ) guiSetFont ( C_N, myFont ) myFont = guiCreateFont( "2.ttf", 10 ) guiSetFont ( C_O, myFont ) myFont = guiCreateFont( "2.ttf", 10 ) guiSetFont ( C_T, myFont ) myFont = guiCreateFont( "2.ttf", 20 ) guiSetFont ( addObj, myFont ) myFont = guiCreateFont( "2.ttf", 20 ) guiSetFont ( removeObj, myFont ) myFont = guiCreateFont( "1.ttf", 15 ) guiSetFont ( ComboBox, myFont ) end) addEvent("onOpenACLWindow",true) addEventHandler("onOpenACLWindow",getRootElement(),function() if guiGetVisible(Main) == true then guiSetVisible(Main,false) showCursor(false) else guiGridListClear(Grid) guiComboBoxClear(ComboBox) guiSetProperty(removeObj, "Disabled", "True") guiSetVisible(Main,true) showCursor(true) end end) addEvent("returnGROUPSNAMES",true) addEventHandler("returnGROUPSNAMES",getRootElement(),function(Table) for i,name in pairs(Table)do guiComboBoxAddItem(ComboBox,name) end end) addEventHandler ( "onClientGUIComboBoxAccepted", getRootElement(),function(box ) if box == ComboBox then item = guiComboBoxGetSelected(box) group = guiComboBoxGetItemText(box, item) guiGridListClear(Grid) triggerServerEvent("getGroupObjects",me,group) end end) addEvent("returnObjects",true) addEventHandler("returnObjects",getRootElement(),function(name,nick,last,check) row = guiGridListAddRow ( Grid ) guiGridListSetItemText ( Grid, row, C_O,tostring(name), false, false ) if tostring(nick) ~= "NONE" then guiGridListSetItemText ( Grid, row, C_N,tostring(nick), false, false ) end if tostring(last) ~= "NONE" then guiGridListSetItemText ( Grid, row, C_T,tostring(last), false, false ) end if tostring(check) == "yes" then guiGridListSetItemColor ( Grid, row, C_T, 0,255,0 ) guiGridListSetItemColor ( Grid, row, C_N, 0,255,0 ) guiGridListSetItemColor ( Grid, row, C_O, 0,255,0 ) end end) addEventHandler ( "onClientGUIClick", getRootElement(),function() if source == Grid then guiSetProperty(removeObj, "Disabled", "False") elseif source == removeObj then selectedRow, selectedCol = guiGridListGetSelectedItem( Grid ) theObj = guiGridListGetItemText( Grid, selectedRow, C_O ) guiGridListRemoveRow ( Grid, selectedRow ) item = guiComboBoxGetSelected(ComboBox) group = guiComboBoxGetItemText(ComboBox, item) action = "remove" triggerServerEvent("onManageACL",me,action,theObj,group) elseif source == addObj then win = guiCreateWindow(250,200,400,90,"Object name",false) objedit = guiCreateEdit(0.03,0.1,0.97,0.3,"",true,win) btnAdd = guiCreateButton(0.03,0.5,0.97,0.5,"Add object",true,win) guiSetInputEnabled(true) elseif source == btnAdd then guiSetInputEnabled(false) obj = guiGetText(objedit) if tostring(obj) ~= "" then item = guiComboBoxGetSelected(ComboBox) group = guiComboBoxGetItemText(ComboBox, item) action = "add" row = guiGridListAddRow ( Grid ) guiGridListSetItemText ( Grid, row, C_O,tostring(obj), false, false ) guiSetVisible(win,false) triggerServerEvent("onManageACL",me,action,obj,group) end elseif source == btnCLSLOG then showCursor(false) destroyElement(winLOG) guiSetInputEnabled(false) end end) addEvent("returnACLLog",true) addEventHandler("returnACLLog",getRootElement(),function() winLOG = guiCreateWindow(170,130,600,360,"ACL Log",false) memo = guiCreateMemo(5,5,590,325,"",false,winLOG) btnCLSLOG = guiCreateButton(5,333,590,26,"Close",false,winLOG) showCursor(true) guiSetText(memo,getElementData(resourceRoot,"log")) guiMemoSetReadOnly(memo,true) end) Server command = "ok" ---- هنا الكلمة الي تفتح بيها اللوحة حقة الاسل command2 = "formate" --- هذه الكلمة تكتبها بأف8 مسافة اسم الرتبة ( تفرمت كل الي فيها (( تسحب كل االحسابات الي فيها )) ) group = "Manager" ---- هنا الرتبة الي تفتح لها اللوحة حقة الاسل group2 = "Console" ---- ( الجروب الذي يمكنه الفرمتة (( formate )) ) Table = {} setElementData(resourceRoot,"log","")---- الكلمة الي تفتح اللوحة حقة مراقبة الاسل يظهر فيها من رقى من وهاكذا الكلمة ( log ))) Days = { [1] = "الأحد", [2] = "الاثنين", [3] = "الثلاثاء", [4] = "الأربعاء", [5] = "الخميس", [6] = "الجمعة", [7] = "السبت" } Months = { [1] = "يناير", [2] = "فبراير", [3] = "مارس", [4] = "أبريل", [5] = "ماي", [6] = "يونيو", [7] = "يوليوز", [8] = "غشت", [9] = "شتنبر", [10] = "أكتوبر", [11] = "نونبر", [12] = "دجنبر" } addCommandHandler(command2,function(thePlayer,cmd,name) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group2) ) then if aclGetGroup(name) then for i,object in pairs(aclGroupListObjects(aclGetGroup(name)))do aclGroupRemoveObject(aclGetGroup(name),object) end outputChatBox("Action executed!",thePlayer,255,255,0,true) else outputChatBox("Group not exists!",thePlayer) end end end) addCommandHandler("log",function(thePlayer) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group2) ) then triggerClientEvent(thePlayer,"returnACLLog",thePlayer) end end) addCommandHandler(command,function(thePlayer) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group) ) then triggerClientEvent(thePlayer,"onOpenACLWindow",thePlayer) groups = {} for i,g in ipairs(aclGroupList()) do table.insert(groups,aclGroupGetName(g)) end triggerClientEvent(thePlayer,"returnGROUPSNAMES",thePlayer,groups) end end) addEvent("getGroupObjects",true) addEventHandler("getGroupObjects",getRootElement(),function(name) for i,obj in pairs(aclGroupListObjects(aclGetGroup(name)))do exists = "no" if string.find(obj,"user.",1) then nick,last = getAccountPlayerData(string.gsub(obj,"user.","")) if getPlayerFromAccount(string.gsub(obj,"user.","")) then exists = "yes" end else nick,last = "NONE","NONE" end triggerClientEvent(source,"returnObjects",source,obj,nick,last,exists) end end) function getAccountPlayerData(name) if Table[name] then nick,last = Table[name]["nick"],Table[name]["lastTime"] else nick,last = "NONE","NONE" end return nick,last end addEventHandler("onPlayerLogin",getRootElement(),function() name = getAccountName(getPlayerAccount(source)) nick = getPlayerName(source) time = getRealTime() num = tonumber(time.weekday)+1 day = Days[num] num = tonumber(time.month)+1 month = Months[num] if string.len(time.minute) == 1 then minute = tostring("0" .. time.minute .. "") else minute = time.minute end theTime = tostring("" .. day .. " " .. time.monthday .. "-" .. month .. "-" .. tonumber(time.year)+1900 .. "[" .. time.hour .. ":" .. minute .. "]") if Table[name] then Table[name]["nick"] = nick Table[name]["lastTime"] = theTime else Table[name] = { ["nick"] = nick, ["lastTime"] = theTime } end end) function getPlayerFromAccount(acc) for i,p in pairs(getElementsByType("player"))do if tostring(getAccountName(getPlayerAccount(p))) == tostring(acc) then return true end end end addEvent("onManageACL",true) addEventHandler("onManageACL",getRootElement(),function(action,obj,group) if action == "remove" then aclGroupRemoveObject(aclGetGroup(group),obj) setElementData(resourceRoot,"log",tostring("" .. getElementData(resourceRoot,"log") .. "\n-" .. getPlayerName(source) .. "(" .. getAccountName(getPlayerAccount(source)) .. ") removed object " .. obj .. " from group:" .. group .. "")) elseif action == "add" then aclGroupAddObject(aclGetGroup(group),obj) setElementData(resourceRoot,"log",tostring("" .. getElementData(resourceRoot,"log") .. "\n-" .. getPlayerName(source) .. "(" .. getAccountName(getPlayerAccount(source)) .. ") added object " .. Edited February 12, 2019 by #Prov Link to comment
Rakan# Posted February 14, 2019 Share Posted February 14, 2019 command = "ok" ---- هنا الكلمة الي تفتح بيها اللوحة حقة الاسل command2 = "formate" --- هذه الكلمة تكتبها بأف8 مسافة اسم الرتبة ( تفرمت كل الي فيها (( تسحب كل االحسابات الي فيها )) ) group = "Manager" ---- هنا الرتبة الي تفتح لها اللوحة حقة الاسل group2 = "Console" ---- ( الجروب الذي يمكنه الفرمتة (( formate )) ) Table = {} setElementData(resourceRoot,"log","")---- الكلمة الي تفتح اللوحة حقة مراقبة الاسل يظهر فيها من رقى من وهاكذا الكلمة ( log ))) Days = { [1] = "الأحد", [2] = "الاثنين", [3] = "الثلاثاء", [4] = "الأربعاء", [5] = "الخميس", [6] = "الجمعة", [7] = "السبت" } Months = { [1] = "يناير", [2] = "فبراير", [3] = "مارس", [4] = "أبريل", [5] = "ماي", [6] = "يونيو", [7] = "يوليوز", [8] = "غشت", [9] = "شتنبر", [10] = "أكتوبر", [11] = "نونبر", [12] = "دجنبر" } addCommandHandler(command2,function(thePlayer,cmd,name) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group2) ) then if aclGetGroup(name) then for i,object in pairs(aclGroupListObjects(aclGetGroup(name)))do aclGroupRemoveObject(aclGetGroup(name),object) end outputChatBox("Action executed!",thePlayer,255,255,0,true) else outputChatBox("Group not exists!",thePlayer) end end end) addCommandHandler("log",function(thePlayer) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group2) ) then triggerClientEvent(thePlayer,"returnACLLog",thePlayer) end end) addCommandHandler(command,function(thePlayer) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group) ) then triggerClientEvent(thePlayer,"onOpenACLWindow",thePlayer) groups = {} for i,g in ipairs(aclGroupList()) do if aclGroupGetName(g) ~= "Console" and aclGroupGetName(g) ~= "Admin" then table.insert(groups,aclGroupGetName(g)) end end triggerClientEvent(thePlayer,"returnGROUPSNAMES",thePlayer,groups) end end) addEvent("getGroupObjects",true) addEventHandler("getGroupObjects",getRootElement(),function(name) for i,obj in pairs(aclGroupListObjects(aclGetGroup(name)))do exists = "no" if string.find(obj,"user.",1) then nick,last = getAccountPlayerData(string.gsub(obj,"user.","")) if getPlayerFromAccount(string.gsub(obj,"user.","")) then exists = "yes" end else nick,last = "NONE","NONE" end triggerClientEvent(source,"returnObjects",source,obj,nick,last,exists) end end) function getAccountPlayerData(name) if Table[name] then nick,last = Table[name]["nick"],Table[name]["lastTime"] else nick,last = "NONE","NONE" end return nick,last end addEventHandler("onPlayerLogin",getRootElement(),function() name = getAccountName(getPlayerAccount(source)) nick = getPlayerName(source) time = getRealTime() num = tonumber(time.weekday)+1 day = Days[num] num = tonumber(time.month)+1 month = Months[num] if string.len(time.minute) == 1 then minute = tostring("0" .. time.minute .. "") else minute = time.minute end theTime = tostring("" .. day .. " " .. time.monthday .. "-" .. month .. "-" .. tonumber(time.year)+1900 .. "[" .. time.hour .. ":" .. minute .. "]") if Table[name] then Table[name]["nick"] = nick Table[name]["lastTime"] = theTime else Table[name] = { ["nick"] = nick, ["lastTime"] = theTime } end end) function getPlayerFromAccount(acc) for i,p in pairs(getElementsByType("player"))do if tostring(getAccountName(getPlayerAccount(p))) == tostring(acc) then return true end end end addEvent("onManageACL",true) addEventHandler("onManageACL",getRootElement(),function(action,obj,group) if action == "remove" then aclGroupRemoveObject(aclGetGroup(group),obj) setElementData(resourceRoot,"log",tostring("" .. getElementData(resourceRoot,"log") .. "\n-" .. getPlayerName(source) .. "(" .. getAccountName(getPlayerAccount(source)) .. ") removed object " .. obj .. " from group:" .. group .. "")) elseif action == "add" then aclGroupAddObject(aclGetGroup(group),obj) setElementData(resourceRoot,"log",tostring("" .. getElementData(resourceRoot,"log") .. "\n-" .. getPlayerName(source) .. "(" .. getAccountName(getPlayerAccount(source)) .. ") added object " .. 1 Link to comment
#Prov Posted February 14, 2019 Author Share Posted February 14, 2019 35 minutes ago, Rakan# said: command = "ok" ---- هنا الكلمة الي تفتح بيها اللوحة حقة الاسل command2 = "formate" --- هذه الكلمة تكتبها بأف8 مسافة اسم الرتبة ( تفرمت كل الي فيها (( تسحب كل االحسابات الي فيها )) ) group = "Manager" ---- هنا الرتبة الي تفتح لها اللوحة حقة الاسل group2 = "Console" ---- ( الجروب الذي يمكنه الفرمتة (( formate )) ) Table = {} setElementData(resourceRoot,"log","")---- الكلمة الي تفتح اللوحة حقة مراقبة الاسل يظهر فيها من رقى من وهاكذا الكلمة ( log ))) Days = { addCommandHandler("log",function(thePlayer) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group2) ) then triggerClientEvent(thePlayer,"returnACLLog",thePlayer) end end) addCommandHandler(command,function(thePlayer) if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (group) ) then triggerClientEvent(thePlayer,"onOpenACLWindow",thePlayer) groups = {} for i,g in ipairs(aclGroupList()) do if aclGroupGetName(g) ~= "Console" and aclGroupGetName(g) ~= "Admin" then table.insert(groups,aclGroupGetName(g)) end end triggerClientEvent(thePlayer,"returnGROUPSNAMES",thePlayer,groups) end end) addEvent("getGroupObjects",true) addEventHandler("getGroupObjects",getRootElement(),function(name) for i,obj in pairs(aclGroupListObjects(aclGetGroup(name)))do exists = "no" if string.find(obj,"user.",1) then nick,last = getAccountPlayerData(string.gsub(obj,"user.","")) if getPlayerFromAccount(string.gsub(obj,"user.","")) then exists = "yes" end else nick,last = "NONE","NONE" end triggerClientEvent(source,"returnObjects",source,obj,nick,last,exists) end end) function getAccountPlayerData(name) if Table[name] then nick,last = Table[name]["nick"],Table[name]["lastTime"] else nick,last = "NONE","NONE" end return nick,last end addEventHandler("onPlayerLogin",getRootElement(),function() name = getAccountName(getPlayerAccount(source)) nick = getPlayerName(source) time = getRealTime() num = tonumber(time.weekday)+1 day = Days[num] num = tonumber(time.month)+1 month = Months[num] if string.len(time.minute) == 1 then minute = tostring("0" .. time.minute .. "") else minute = time.minute end theTime = tostring("" .. day .. " " .. time.monthday .. "-" .. month .. "-" .. tonumber(time.year)+1900 .. "[" .. time.hour .. ":" .. minute .. "]") if Table[name] then Table[name]["nick"] = nick Table[name]["lastTime"] = theTime else Table[name] = { ["nick"] = nick, ["lastTime"] = theTime } end end) function getPlayerFromAccount(acc) for i,p in pairs(getElementsByType("player"))do if tostring(getAccountName(getPlayerAccount(p))) == tostring(acc) then return true end end end addEvent("onManageACL",true) addEventHandler("onManageACL",getRootElement(),function(action,obj,group) if action == "remove" then aclGroupRemoveObject(aclGetGroup(group),obj) setElementData(resourceRoot,"log",tostring("" .. getElementData(resourceRoot,"log") .. "\n-" .. getPlayerName(source) .. "(" .. getAccountName(getPlayerAccount(source)) .. ") removed object " .. obj .. " from group:" .. group .. "")) elseif action == "add" then aclGroupAddObject(aclGetGroup(group),obj) نسخت تعديلك وما صار يشتغل المود وشكراً على المساعده Link to comment
Rakan# Posted February 14, 2019 Share Posted February 14, 2019 9 hours ago, #Prov said: نسخت تعديلك وما صار يشتغل المود وشكراً على المساعده لانك حاط نص كود السيرفر م عطيتنا كودك بالكامل ركز على اللي حطيته انت انا اخذته وعدلته بس . 1 Link to comment
#Prov Posted February 14, 2019 Author Share Posted February 14, 2019 6 hours ago, Rakan# said: لانك حاط نص كود السيرفر م عطيتنا كودك بالكامل ركز على اللي حطيته انت انا اخذته وعدلته بس . شكراً لك اشتغل معي Link to comment
Rakan# Posted February 14, 2019 Share Posted February 14, 2019 5 hours ago, #Prov said: شكراً لك اشتغل معي العفو Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now