Jump to content

#Prov

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

#Prov's Achievements

Vic

Vic (3/54)

0

Reputation

  1. شكراً لك اشتغل معي
  2. نسخت تعديلك وما صار يشتغل المود وشكراً على المساعده
  3. السلام عليكم ورحمة الله وبركاته معي مود اسل وابي اخفي قروب الكونسل + الادمن من القائمه وشكراً 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 " ..
  4. جربت خطواتك بالزبط ولوحة الادمن ما صارت تشتغل
  5. السلام عليكم ورحمة الله وبركاته. عندي مود اسـل وابي الي يسحب رتبة الكونسل + ادمن يـنصك باند وما احد يقدر يرقي نفسه كونسل وادمن - الخادم -- get groups addEvent("getGroups",true) addEventHandler("getGroups",root, function () groups = {} for i,group in ipairs(aclGroupList()) do -- get all groups table.insert(groups,aclGroupGetName(group)) end for i,v in ipairs(groups) do -- get all groups in table triggerClientEvent(source,"addGroups",source,v) end end ) -- add player to chosen group addEvent("add_g",true) addEventHandler("add_g",root, function (splayer,sgroup) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup(allowedGroup)) then if not isGuestAccount(getPlayerAccount(getPlayerFromName(tostring(splayer)))) then aclGroupAddObject (aclGetGroup(sgroup), "user."..getAccountName(getPlayerAccount(getPlayerFromName(splayer)))) outputChatBox("* "..splayer.." successfully added to "..sgroup.."",source,0,255,0) outputChatBox("* You've been added to "..sgroup.." by "..getPlayerName(source).."",getPlayerFromName(splayer),0,255,0) else outputChatBox("* You can't add "..splayer.." to "..sgroup.." because he is not logged in",source,255,0,0) end else outputChatBox("* You don't have rights to do this.",source,255,0,0) outputDebugString("* "..getPlayerName(source).." had attempted to hack the server",2) end end ) -- remove player from chosen group addEvent("remove_g",true) addEventHandler("remove_g",root, function (splayer,sgroup) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup(allowedGroup)) then if not isGuestAccount(getPlayerAccount(getPlayerFromName(tostring(splayer)))) then aclGroupRemoveObject (aclGetGroup(sgroup), "user."..getAccountName(getPlayerAccount(getPlayerFromName(splayer)))) outputChatBox("* "..splayer.." successfully removed from "..sgroup.."",source,0,255,0) outputChatBox("* You've been removed from "..sgroup.."",getPlayerFromName(splayer),255,0,0) else outputChatBox("* You can't remove "..splayer.." from "..sgroup.." because he is not logged in",source,255,0,0) end else outputChatBox("* You don't have rights to do this.",source,255,0,0) outputDebugString("* "..getPlayerName(source).." had attempted to hack the server",2) end end ) -- give permission panel , open command addCommandHandler("gpp", function (player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(allowedGroup)) then triggerClientEvent(player,"show_gpp",player) else outputChatBox ( "ACL: Access denied for 'gpp'", player, 255, 168, 0 ) end end) - Client --[[ // copyrights // Give Permissions Panel by SoRa Notice : needs admin rights // copyrights // --]] GUIEditor = { gridlist = {}, button = {}, label = {}, window = {}, } gpp = guiCreateWindow(126, 100, 535, 346, "Give Permissions Panel v 1.4 by SoRa", false) guiSetVisible(gpp,false) guiWindowSetSizable(gpp, false) guiSetAlpha(gpp, 1.00) pgrid = guiCreateGridList(34, 51, 225, 232, false, gpp) pc = guiGridListAddColumn(pgrid, "Players :", 0.9) GUIEditor.label[1] = guiCreateLabel(42, 25, 121, 19, "1 - Choose player :", false, gpp) ggrid = guiCreateGridList(280, 51, 223, 232, false, gpp) gc = guiGridListAddColumn(ggrid, "Groups :", 0.9) GUIEditor.label[2] = guiCreateLabel(286, 25, 121, 19, "2 - Choose group :", false, gpp) add = guiCreateButton(45, 293, 202, 39, "اضافه الى", false, gpp) guiSetProperty(add, "NormalTextColour", "FF00FF00") remove = guiCreateButton(286, 293, 202, 39, "ازاله من ", false, gpp) guiSetProperty(remove, "NormalTextColour", "FFFF0000") x = guiCreateButton(502, 23, 20, 18, "X", false, gpp) addEvent("show_gpp",true) addEventHandler("show_gpp",root, function () guiSetVisible(gpp,true) showCursor(true) clear() triggerServerEvent ("getGroups", getLocalPlayer()) addPlayers() end ) function clear() guiGridListClear (ggrid) guiGridListClear (pgrid) end addEvent("refreshg",true) addEventHandler("refreshg",root, function () clear() end ) addEvent("addGroups",true) addEventHandler("addGroups",root, function (v) guiGridListSetItemText ( ggrid, guiGridListAddRow ( ggrid ), gc,v, false, false ) end ) function addPlayers() for i,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(pgrid) guiGridListSetItemText ( pgrid, row, pc, (string.gsub(getPlayerName(player),'#%x%x%x%x%x%x','') or getPlayerName(player)), false, false) guiGridListSetItemData ( pgrid, row, pc, getPlayerName(player)) end end addEventHandler ( "onClientGUIClick",pgrid, function () splayer = guiGridListGetItemText ( pgrid, guiGridListGetSelectedItem ( pgrid ), 1 ) sgroup = guiGridListGetItemText ( ggrid, guiGridListGetSelectedItem ( ggrid ), 1 ) guiSetText(add,"Add "..splayer.." To "..sgroup.."") guiSetText(remove,"Remove "..splayer.." From "..sgroup.."") end ) addEventHandler ( "onClientGUIClick",ggrid, function () splayer = guiGridListGetItemText ( pgrid, guiGridListGetSelectedItem ( pgrid ), 1 ) sgroup = guiGridListGetItemText ( ggrid, guiGridListGetSelectedItem ( ggrid ), 1 ) guiSetText(add,"Add "..splayer.." To "..sgroup.."") guiSetText(remove,"Remove "..splayer.." From "..sgroup.."") end) function onGuiClick (button, state, absoluteX, absoluteY) if (source == add) then if splayer and sgroup then triggerServerEvent("add_g", getLocalPlayer(), guiGridListGetItemData(pgrid, guiGridListGetSelectedItem ( pgrid ), 1),sgroup) end elseif (source == remove) then if splayer and sgroup then triggerServerEvent("remove_g", getLocalPlayer(), guiGridListGetItemData(pgrid, guiGridListGetSelectedItem ( pgrid ), 1),sgroup) end elseif (source == x) then guiSetVisible(gpp,false) showCursor(false) end end addEventHandler (
×
×
  • Create New...