Jump to content

شباب من ظهرة مشكلتي تكفون حل سريع الحين المغرب الوووووووووو


Recommended Posts

سلام عليكم ورحمة الله وبركاته

عندي مشكله انا الحين توني لاقي مود الي هو اعطاء وسحب رتب انا ابي احط فيه رتب انا محده

ممكن تساعدوني

هادا هو كلنت

--[[ 
// 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 by Guest
Link to comment

?

اي مشكله

ياخي الحين هو يعطني اسماء العبين ويعطني اسل قروبات اسل كلها

ياخي كل الي ابي انه يكون في قريد الاول اسماء العبين

والقريت الثاني قروبات انا محدده بس كدا صعبه

؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ظظ

Link to comment

يعني تبون سيرفر وكلينت ياخونا ابي بجريد رتبه انا محددها مو الاسل كامل

سيرفر

--[[ 
// 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

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

طيب شكرا

بس ابي اعرف كيف اخلي مثل

تقدر ترقي لي رتبه انا محدده ورتب تاني علشان ترقي واحد رتب لازم يكون معك رتبت انا محددها كيف اسويها

بس كدا ماتبي تقول خلاص بكيفك

Link to comment
طيب شكرا

بس ابي اعرف كيف اخلي مثل

تقدر ترقي لي رتبه انا محدده ورتب تاني علشان ترقي واحد رتب لازم يكون معك رتبت انا محددها كيف اسويها

بس كدا ماتبي تقول خلاص بكيفك

isObjectInACLGroup 
aclGroupAddObject 

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