momar5700 Posted November 4, 2015 Share Posted November 4, 2015 (edited) سلام عليكم ورحمة الله وبركاته عندي مشكله انا الحين توني لاقي مود الي هو اعطاء وسحب رتب انا ابي احط فيه رتب انا محده ممكن تساعدوني هادا هو كلنت --[[ // 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 |S.s|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, "Add To ", false, gpp) guiSetProperty(add, "NormalTextColour", "FF00FF00") remove = guiCreateButton(286, 293, 202, 39, "Remove From ", 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 ("onClientGUIClick", getRootElement(), onGuiClick) Edited November 4, 2015 by Guest Link to comment
Rockyz Posted November 4, 2015 Share Posted November 4, 2015 هذا مو اعطاء رتب هذا اعطاء خاصية Link to comment
momar5700 Posted November 4, 2015 Author Share Posted November 4, 2015 لا ياخي والله يعطي رتبه ويسحبها وانا توني مجربها خدها حمله https://community.multitheftauto.com/ind ... s&id=12276 وكمان في حد ناشررة وشو http://www.gta-arabs.com/gt/-mta-/117368-a.html Link to comment
a7zan Posted November 4, 2015 Share Posted November 4, 2015 تبي الجني يقول لنا وش المشكلة؟ Link to comment
momar5700 Posted November 4, 2015 Author Share Posted November 4, 2015 ? اي مشكله ياخي الحين هو يعطني اسماء العبين ويعطني اسل قروبات اسل كلها ياخي كل الي ابي انه يكون في قريد الاول اسماء العبين والقريت الثاني قروبات انا محدده بس كدا صعبه ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ظظ Link to comment
momar5700 Posted November 4, 2015 Author Share Posted November 4, 2015 يعني تبون سيرفر وكلينت ياخونا ابي بجريد رتبه انا محددها مو الاسل كامل سيرفر --[[ // copyrights // Give Permissions Panel by SoRa Notice : needs admin rights // copyrights // --]] -- // Settings // allowedGroup = get("allowedGroup") -- // Settings // -- 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) كلنت --[[ // 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 |S.s|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, "Add To ", false, gpp) guiSetProperty(add, "NormalTextColour", "FF00FF00") remove = guiCreateButton(286, 293, 202, 39, "Remove From ", 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 ("onClientGUIClick", getRootElement(), onGuiClick) Link to comment
I_Mr.[T]he[P]rInCe Posted November 4, 2015 Share Posted November 4, 2015 لو سمحت، ممكن توضيح صغير لطلبك عشان اقدر اساعدك؟ Link to comment
TAPL Posted November 5, 2015 Share Posted November 5, 2015 aclGroups حط اسماء قروب الأسل في الجدول --[[ // copyrights // Give Permissions Panel by SoRa Notice : needs admin rights // copyrights // --]] -- // Settings // allowedGroup = get("allowedGroup") -- // Settings // aclGroups = { "group1", "group2", "group3" } -- get groups addEvent("getGroups",true) addEventHandler("getGroups",root, function () groups = {} for i,group in ipairs(aclGroups) do -- get all groups if aclGetGroup(group) then table.insert(groups, group) end 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) Link to comment
momar5700 Posted November 5, 2015 Author Share Posted November 5, 2015 طيب شكرا بس ابي اعرف كيف اخلي مثل تقدر ترقي لي رتبه انا محدده ورتب تاني علشان ترقي واحد رتب لازم يكون معك رتبت انا محددها كيف اسويها بس كدا ماتبي تقول خلاص بكيفك Link to comment
LoOs Posted November 5, 2015 Share Posted November 5, 2015 طيب شكرابس ابي اعرف كيف اخلي مثل تقدر ترقي لي رتبه انا محدده ورتب تاني علشان ترقي واحد رتب لازم يكون معك رتبت انا محددها كيف اسويها بس كدا ماتبي تقول خلاص بكيفك isObjectInACLGroup aclGroupAddObject 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