Jump to content

عندي مشكلة في مود ده


Recommended Posts

اوف ظهرت مشكله

GUIEditor = { 
    progressbar = {}, 
    edit = {}, 
    button = {}, 
    window = {}, 
    label = {}, 
    gridlist = {} 
} 
     
        local screenW, screenH = guiGetScreenSize() 
        Window2 = guiCreateWindow(189, 144, 446, 336, "لوحة معلومات مانجرس", false) 
        guiWindowSetSizable(Window2, false) 
        guiSetAlpha(Window2, 1.00) 
        guiSetVisible(Window2,false) 
         
  
        GUIEditor.progressbar[1] = guiCreateProgressBar(9, 19, 428, 308, false, Window2) 
  
        GUIEditor.label[1] = guiCreateLabel(7, 8, 417, 33, "mangres server by momar", false, GUIEditor.progressbar[1]) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
        guiLabelSetColor(GUIEditor.label[1], 25, 245, 9) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.label[2] = guiCreateLabel(6, 55, 416, 32, "قبل عمل اي شيء يجب اولاتحديد لاعب", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[2], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center") 
        GUIEditor.label[3] = guiCreateLabel(6, 103, 416, 32, "عند سحب مخالفة تاكد ان لاعب ليس عنده مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[3], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[3], "center") 
        GUIEditor.label[4] = guiCreateLabel(6, 159, 416, 32, "عندما تريد ان تضع للاعب مخالفة يجب عليك تجديد لاعب ثم دوس علي اعطاء مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[4], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[4], "center") 
        GUIEditor.label[5] = guiCreateLabel(5, 205, 416, 32, "قوانين: عدم اعطاء الاعبين اكثر من عشر مخالفات باليوم", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[5], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[5], "center") 
        GUIEditor.button[4] = guiCreateButton(242, 253, 181, 39, "عوده لي لوحة مخالفات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFA019F") 
        BTN3_close2 = guiCreateButton(18, 255, 170, 39, "اغلاق الوحة تعليمات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(BTN3_close2, "NormalTextColour", "FFFA0000")     
  
  
  
  
        GppWindow = guiCreateWindow(191, 156, 427, 290, "=[ لوحة مانجرس لاعطاء مخالفات وسحبها ]=", false) 
        guiWindowSetSizable(GppWindow, false) 
        guiSetVisible(GppWindow,false) 
        guiSetProperty(GppWindow, "CaptionColour", "FFFF00CC") 
        GUIEditor.edit[2] = guiCreateEdit(9, 22, 195, 31, "بــحــث ....", false, GppWindow) 
        GUIEditor.button[1] = guiCreateButton(225, 64, 176, 51, "=[اعطاء مخالفة]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[1], "default-bold-small") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") 
        GUIEditor.button[2] = guiCreateButton(212, 236, 203, 44, "✖ اغلاق لوحة", false, GppWindow)     
        guiSetFont(GUIEditor.button[2], "default-bold-small") 
        guiSetProperty(GUIEditor.button[2], "HoverTextColour", "FF990909")   
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF2929") 
        GUIEditor.button[3] = guiCreateButton(225, 120, 176, 51, "=[سحب مخالفة]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[3], "default-bold-small") 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF01FD60") 
        GUIEditor.button[5] = guiCreateButton(209, 179, 209, 45, "=[ تعليمات ]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[5], "default-bold-small") 
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF01FD60")  
        GUIEditor.label[1] = guiCreateLabel(390, 24, 31, 28, "رتبه:", false, GppWindow) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.progressbar[2] = guiCreateProgressBar(221, 20, 169, 38, false, GppWindow)  
        GUIEditor.label[2] = guiCreateLabel(11, 4, 147, 28, "Admin-EX", false, GUIEditor.progressbar[2]) 
        guiLabelSetColor(GUIEditor.label[2], 254, 0, 0) 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center")       
     
-------------------------- 
---Grid list 
------------------------- 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
GUIEditor.gridlist[1] = guiCreateGridList(9, 55, 197, 226, false, GppWindow) 
guiGridListSetSelectionMode(GUIEditor.gridlist[1],2) 
local column = guiGridListAddColumn( GUIEditor.gridlist[1], "Player Name", 0.5 ) 
if ( column ) then 
for id, player in ipairs(getElementsByType("player")) do 
    local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
        guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, getPlayerName(player), false, false ) 
        guiGridListSetItemColor ( GUIEditor.gridlist[1], row, column, 0, 250, 154, 255 ) 
        end 
        addEventHandler ( "onClientGUIClick", GUIEditor.gridlist[1], click ) 
    end 
end) 
  
function click () 
       local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) 
       guiSetText ( GUIEditor.edit[2], playerName ) 
end 
     
  
  
---------------------------- 
--Show panel from command 
-------------------------- 
  
function showPanel () 
guiSetVisible (GppWindow, true) 
showCursor (true) 
playSound("open.mp3",false) 
end 
addEvent( "showPanel", true ) 
addEventHandler ( "showPanel", getRootElement(), showPanel) 
  
  
------------------------ 
--Event to bindKey 
------------------------ 
  
function show() 
    if guiGetVisible(GppWindow) == true then 
        guiSetVisible(GppWindow,false) 
        showCursor(false) 
    else 
        guiSetVisible(GppWindow,true) 
        showCursor(true) 
    end 
end 
addEvent("show",true) 
addEventHandler("show",root,show) 
  
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  
----------------------- 
--GetPermission 
--------------------- 
  
function GetPermission() 
triggerServerEvent ("OpenPanel", getLocalPlayer(), OpenPanel) 
end 
  
  
  
  
addEventHandler("onClientGUIClick",root, 
function() 
if source == GUIEditor.button[2] then -- هنا يتحققق بأن الشيء اللي نبيه يشتغل عليه الحدث هو الزر حق الاغلاق  
guiSetVisible(GppWindow,false) showCursor(false) -- هنا يغلق اللوحة ويشيل المؤشر بعد مايتحقق من الشرط 
end -- نهاية  
end -- .. 
) -- اقفال الحدث 
  
addEventHandler('onClientGUIClick',root, 
function() 
if source == GUIEditor.button[5] then -- هنا يتحقق بأن الشيء اللي نبي الحدث يتطبق عليه هو الزر حق فتح لوحة رقم 2 
guiSetVisible(Window2,true) showCursor(true) -- هنا يفتح لنا اللوحة  
guiSetVisible(GppWindow,false) -- إغلاق نافذة 1 
end -- نهاية 
end -- .. 
) -- إقفال 
  
addEventHandler('onClientGUIClick',root, 
function() 
if source == GUIEditor.button[4] then -- هنا يتحقق بأن الشيء اللي نبي الحدث يتطبق عليه هو الزر حق فتح لوحة رقم 2 
guiSetVisible(GppWindow,true) showCursor(true) -- هنا يفتح لنا اللوحة  
guiSetVisible(Window2,false) -- إغلاق نافذة 1 
end -- نهاية 
end -- .. 
) -- إقفال 
  
function onGuiClick (button, state, absoluteX, absoluteY) 
    if (source == BTN3_close2) then 
    guiSetVisible (Window2, false) 
    showCursor (false) 
    elseif (source == GUIEditor.button[3]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent ("remove", getLocalPlayer(), target) 
    elseif (source == GUIEditor.button[1]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("Moderator", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
end 
end 
  
function nopsound () 
playSound("np.mp3",false) 
end 
addEvent( "nopsound", true ) 
addEventHandler ( "nopsound", getRootElement(), nopsound) 
  
function removedsound () 
playSound("removed.wav",false) 
end 
addEvent( "removedsound", true ) 
addEventHandler ( "removedsound", getRootElement(), removedsound) 
  
function list() 
    guiGridListClear(GUIEditor.gridlist[1]) 
    for id, players in ipairs (getElementsByType("player")) do 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, getPlayerName(players), false, false) 
        guiGridListSetItemColor ( GUIEditor.gridlist[1], row, 1, 0, 250, 154, 255 ) 
    end 
end 
addEventHandler("onClientPlayerJoin", getRootElement(), list) 
addEventHandler("onClientPlayerQuit", getRootElement(), list) 
addEventHandler("onClientPlayerChangeNick", getRootElement(), list) 

سيرفر

-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
-- * thanks to MR.S3D for helping me 
local rootElement = getRootElement() 
  
-------------------- 
---bindKey i to open panel --only who in Console group  can open this panel 
------------------- 
  
addEventHandler("onPlayerJoin",root, 
function () 
    bindKey(source,"i","down",show) ----- Change "i" to the key you want 
end) 
  
addEventHandler("onResourceStart",resourceRoot, 
function () 
    for index, player in ipairs(getElementsByType("player")) do 
        bindKey(player,"i","down",show) ----Change "i" to the key you want 
    end 
end) 
  
function show(thePlayer) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Console")) then 
  
        triggerClientEvent(thePlayer,"showPanel",thePlayer) 
    else 
       outputChatBox ("* GPP: You Don't Have Permission For This Command", source, 255, 0, 0, true) 
       triggerClientEvent ( thePlayer,"nopsound", thePlayer ) 
    end 
end 
  
------------------------ 
--Give Admin.Sup,Mod,Remove 
----------------------- 
  
addEvent("Moderator",true) 
function Moderator(target) 
    local account = getPlayerAccount ( target ) 
    local group = aclGetGroup ( "Moderator" ) 
    if ( group ) then 
        aclGroupAddObject ( group, "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: '"..getAccountName(getPlayerAccount(target)).."' have been given moderator permissions", source, 0, 255 ,0 ) 
    else 
        outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("Moderator", getRootElement(), Moderator) 
  
addEvent("SuperModerator",true) 
function SuperModerator(target) 
    local account = getPlayerAccount ( target ) 
    local group = aclGetGroup ( "SuperModerator" ) 
    if ( group ) then 
        aclGroupAddObject ( group, "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: '"..getAccountName(getPlayerAccount(target)).."' have been given supermoderator permissions", source, 0, 255 ,0 ) 
    else 
        outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("SuperModerator", getRootElement(), SuperModerator) 
  
addEvent("Admin",true) 
function Admin(target) 
    local account = getPlayerAccount ( target ) 
    local group = aclGetGroup ( "Admin" ) 
    if ( group ) then 
        aclGroupAddObject ( group, "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: '"..getAccountName(getPlayerAccount(target)).."' have been given admin permissions", source, 0, 255 ,0 ) 
    else 
        outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("Admin", getRootElement(), Admin) 
  
addEvent("remove",true) 
function removee(target) 
    local account = getPlayerAccount ( target ) 
    if ( account ) then 
        aclGroupRemoveObject (aclGetGroup("Moderator"), "user."..getAccountName ( account ) ) 
        aclGroupRemoveObject (aclGetGroup("SuperModerator"), "user."..getAccountName ( account ) ) 
        aclGroupRemoveObject (aclGetGroup("Admin"), "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: all permissons of '"..getAccountName(getPlayerAccount(target)).."' has been removed !", source, 255, 0 ,0 ) 
         triggerClientEvent ( source,"removedsound", source ) 
    else 
    outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("remove", getRootElement(), removee) 
  
---------------------- 
--Command 
---------------------- 
function OpenPanel ( player ) 
    local player = player or source 
    local accountname = getAccountName( getPlayerAccount( player ) ) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ))  then 
       triggerClientEvent ( player,"showPanel", player ) 
    else 
       outputChatBox ("* GPP: You Don't Have Permission For This Command", player, 255, 0, 0, true) 
       triggerClientEvent ( player,"nopsound", player ) 
    end 
end 
addEvent( "OpenPanel", true ) 
addEventHandler ( "OpenPanel", getRootElement(), OpenPanel) 
addCommandHandler ( "gpp", OpenPanel ) 
  
function check() 
local accountname = getAccountName(getPlayerAccount(source)) 
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ))  then 
outputChatBox ("Type /gpp or press i to open give permissions panel", source, 255, 0, 0, true) 
end 
end 
addEventHandler("onPlayerLogin",getRootElement(),check ) 
-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
  

مشكله هي لما اطغط اعطاء مخالفة مايعضي ولايسجب ليشذ

ملاحظه انا طايفة في قروب ادمن والكونسل

Edited by Guest
Link to comment

تم اصلاحها

تمت الافادة

GUIEditor = { 
    progressbar = {}, 
    edit = {}, 
    button = {}, 
    window = {}, 
    label = {}, 
    gridlist = {} 
} 
     
        local screenW, screenH = guiGetScreenSize() 
        Window2 = guiCreateWindow(189, 144, 446, 336, "لوحة معلومات مانجرس", false) 
        guiWindowSetSizable(Window2, false) 
        guiSetAlpha(Window2, 1.00) 
        guiSetVisible(Window2,false) 
         
  
        GUIEditor.progressbar[1] = guiCreateProgressBar(9, 19, 428, 308, false, Window2) 
  
        GUIEditor.label[1] = guiCreateLabel(7, 8, 417, 33, "mangres server by momar", false, GUIEditor.progressbar[1]) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
        guiLabelSetColor(GUIEditor.label[1], 25, 245, 9) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.label[2] = guiCreateLabel(6, 55, 416, 32, "قبل عمل اي شيء يجب اولاتحديد لاعب", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[2], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center") 
        GUIEditor.label[3] = guiCreateLabel(6, 103, 416, 32, "عند سحب مخالفة تاكد ان لاعب ليس عنده مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[3], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[3], "center") 
        GUIEditor.label[4] = guiCreateLabel(6, 159, 416, 32, "عندما تريد ان تضع للاعب مخالفة يجب عليك تجديد لاعب ثم دوس علي اعطاء مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[4], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[4], "center") 
        GUIEditor.label[5] = guiCreateLabel(5, 205, 416, 32, "قوانين: عدم اعطاء الاعبين اكثر من عشر مخالفات باليوم", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[5], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[5], "center") 
        GUIEditor.button[4] = guiCreateButton(242, 253, 181, 39, "عوده لي لوحة مخالفات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFA019F") 
        BTN3_close2 = guiCreateButton(18, 255, 170, 39, "اغلاق الوحة تعليمات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(BTN3_close2, "NormalTextColour", "FFFA0000")     
  
  
  
  
        GppWindow = guiCreateWindow(191, 156, 427, 290, "=[ لوحة مانجرس لاعطاء مخالفات وسحبها ]=", false) 
        guiWindowSetSizable(GppWindow, false) 
        guiSetVisible(GppWindow,false) 
        guiSetProperty(GppWindow, "CaptionColour", "FFFF00CC") 
        GUIEditor.edit[2] = guiCreateEdit(9, 22, 195, 31, "بــحــث ....", false, GppWindow) 
        GUIEditor.button[1] = guiCreateButton(225, 64, 176, 51, "=[اعطاء مخالفة]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[1], "default-bold-small") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") 
        GUIEditor.button[2] = guiCreateButton(212, 236, 203, 44, "✖ اغلاق لوحة", false, GppWindow)     
        guiSetFont(GUIEditor.button[2], "default-bold-small") 
        guiSetProperty(GUIEditor.button[2], "HoverTextColour", "FF990909")   
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF2929") 
        GUIEditor.button[3] = guiCreateButton(225, 120, 176, 51, "=[سحب مخالفة]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[3], "default-bold-small") 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF01FD60") 
        GUIEditor.button[5] = guiCreateButton(209, 179, 209, 45, "=[ تعليمات ]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[5], "default-bold-small") 
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF01FD60")  
        GUIEditor.label[1] = guiCreateLabel(390, 24, 31, 28, "رتبه:", false, GppWindow) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.progressbar[2] = guiCreateProgressBar(221, 20, 169, 38, false, GppWindow)  
        GUIEditor.label[2] = guiCreateLabel(11, 4, 147, 28, "Admin-EX", false, GUIEditor.progressbar[2]) 
        guiLabelSetColor(GUIEditor.label[2], 254, 0, 0) 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center")       
     
-------------------------- 
---Grid list 
------------------------- 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
GUIEditor.gridlist[1] = guiCreateGridList(9, 55, 197, 226, false, GppWindow) 
guiGridListSetSelectionMode(GUIEditor.gridlist[1],2) 
local column = guiGridListAddColumn( GUIEditor.gridlist[1], "Player Name", 0.5 ) 
if ( column ) then 
for id, player in ipairs(getElementsByType("player")) do 
    local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
        guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, getPlayerName(player), false, false ) 
        guiGridListSetItemColor ( GUIEditor.gridlist[1], row, column, 0, 250, 154, 255 ) 
        end 
        addEventHandler ( "onClientGUIClick", GUIEditor.gridlist[1], click ) 
    end 
end) 
  
function click () 
       local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) 
       guiSetText ( GUIEditor.edit[2], playerName ) 
end 
     
  
  
---------------------------- 
--Show panel from command 
-------------------------- 
  
function showPanel () 
guiSetVisible (GppWindow, true) 
showCursor (true) 
playSound("open.mp3",false) 
end 
addEvent( "showPanel", true ) 
addEventHandler ( "showPanel", getRootElement(), showPanel) 
  
  
------------------------ 
--Event to bindKey 
------------------------ 
  
function show() 
    if guiGetVisible(GppWindow) == true then 
        guiSetVisible(GppWindow,false) 
        showCursor(false) 
    else 
        guiSetVisible(GppWindow,true) 
        showCursor(true) 
    end 
end 
addEvent("show",true) 
addEventHandler("show",root,show) 
  
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  
----------------------- 
--GetPermission 
--------------------- 
  
function GetPermission() 
triggerServerEvent ("OpenPanel", getLocalPlayer(), OpenPanel) 
end 
  
  
  
  
addEventHandler("onClientGUIClick",root, 
function() 
if source == GUIEditor.button[2] then -- هنا يتحققق بأن الشيء اللي نبيه يشتغل عليه الحدث هو الزر حق الاغلاق  
guiSetVisible(GppWindow,false) showCursor(false) -- هنا يغلق اللوحة ويشيل المؤشر بعد مايتحقق من الشرط 
end -- نهاية  
end -- .. 
) -- اقفال الحدث 
  
addEventHandler('onClientGUIClick',root, 
function() 
if source == GUIEditor.button[5] then -- هنا يتحقق بأن الشيء اللي نبي الحدث يتطبق عليه هو الزر حق فتح لوحة رقم 2 
guiSetVisible(Window2,true) showCursor(true) -- هنا يفتح لنا اللوحة  
guiSetVisible(GppWindow,false) -- إغلاق نافذة 1 
end -- نهاية 
end -- .. 
) -- إقفال 
  
addEventHandler('onClientGUIClick',root, 
function() 
if source == GUIEditor.button[4] then -- هنا يتحقق بأن الشيء اللي نبي الحدث يتطبق عليه هو الزر حق فتح لوحة رقم 2 
guiSetVisible(GppWindow,true) showCursor(true) -- هنا يفتح لنا اللوحة  
guiSetVisible(Window2,false) -- إغلاق نافذة 1 
end -- نهاية 
end -- .. 
) -- إقفال 
  
function onGuiClick (button, state, absoluteX, absoluteY) 
    if (source == BTN3_close2) then 
    guiSetVisible (Window2, false) 
    showCursor (false) 
    elseif (source == GUIEditor.button[3]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent ("remove", getLocalPlayer(), target) 
    elseif (source == GUIEditor.button[1]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("Admin-EX", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
end 
end 
  
function nopsound () 
playSound("np.mp3",false) 
end 
addEvent( "nopsound", true ) 
addEventHandler ( "nopsound", getRootElement(), nopsound) 
  
function removedsound () 
playSound("removed.wav",false) 
end 
addEvent( "removedsound", true ) 
addEventHandler ( "removedsound", getRootElement(), removedsound) 
  
function list() 
    guiGridListClear(GUIEditor.gridlist[1]) 
    for id, players in ipairs (getElementsByType("player")) do 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, getPlayerName(players), false, false) 
        guiGridListSetItemColor ( GUIEditor.gridlist[1], row, 1, 0, 250, 154, 255 ) 
    end 
end 
addEventHandler("onClientPlayerJoin", getRootElement(), list) 
addEventHandler("onClientPlayerQuit", getRootElement(), list) 
addEventHandler("onClientPlayerChangeNick", getRootElement(), list) 

Link to comment

اوف ظهرت مشكله

GUIEditor = { 
    progressbar = {}, 
    edit = {}, 
    button = {}, 
    window = {}, 
    label = {}, 
    gridlist = {} 
} 
     
        local screenW, screenH = guiGetScreenSize() 
        Window2 = guiCreateWindow(189, 144, 446, 336, "لوحة معلومات مانجرس", false) 
        guiWindowSetSizable(Window2, false) 
        guiSetAlpha(Window2, 1.00) 
        guiSetVisible(Window2,false) 
         
  
        GUIEditor.progressbar[1] = guiCreateProgressBar(9, 19, 428, 308, false, Window2) 
  
        GUIEditor.label[1] = guiCreateLabel(7, 8, 417, 33, "mangres server by momar", false, GUIEditor.progressbar[1]) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
        guiLabelSetColor(GUIEditor.label[1], 25, 245, 9) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.label[2] = guiCreateLabel(6, 55, 416, 32, "قبل عمل اي شيء يجب اولاتحديد لاعب", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[2], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center") 
        GUIEditor.label[3] = guiCreateLabel(6, 103, 416, 32, "عند سحب مخالفة تاكد ان لاعب ليس عنده مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[3], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[3], "center") 
        GUIEditor.label[4] = guiCreateLabel(6, 159, 416, 32, "عندما تريد ان تضع للاعب مخالفة يجب عليك تجديد لاعب ثم دوس علي اعطاء مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[4], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[4], "center") 
        GUIEditor.label[5] = guiCreateLabel(5, 205, 416, 32, "قوانين: عدم اعطاء الاعبين اكثر من عشر مخالفات باليوم", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[5], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[5], "center") 
        GUIEditor.button[4] = guiCreateButton(242, 253, 181, 39, "عوده لي لوحة مخالفات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFA019F") 
        BTN3_close2 = guiCreateButton(18, 255, 170, 39, "اغلاق الوحة تعليمات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(BTN3_close2, "NormalTextColour", "FFFA0000")     
  
  
  
  
        GppWindow = guiCreateWindow(191, 156, 427, 290, "=[ لوحة مانجرس لاعطاء مخالفات وسحبها ]=", false) 
        guiWindowSetSizable(GppWindow, false) 
        guiSetVisible(GppWindow,false) 
        guiSetProperty(GppWindow, "CaptionColour", "FFFF00CC") 
        GUIEditor.edit[2] = guiCreateEdit(9, 22, 195, 31, "بــحــث ....", false, GppWindow) 
        GUIEditor.button[1] = guiCreateButton(225, 64, 176, 51, "=[اعطاء مخالفة]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[1], "default-bold-small") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") 
        GUIEditor.button[2] = guiCreateButton(212, 236, 203, 44, "✖ اغلاق لوحة", false, GppWindow)     
        guiSetFont(GUIEditor.button[2], "default-bold-small") 
        guiSetProperty(GUIEditor.button[2], "HoverTextColour", "FF990909")   
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF2929") 
        GUIEditor.button[3] = guiCreateButton(225, 120, 176, 51, "=[سحب مخالفة]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[3], "default-bold-small") 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF01FD60") 
        GUIEditor.button[5] = guiCreateButton(209, 179, 209, 45, "=[ تعليمات ]=", false, GppWindow) 
        guiSetFont(GUIEditor.button[5], "default-bold-small") 
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF01FD60")  
        GUIEditor.label[1] = guiCreateLabel(390, 24, 31, 28, "رتبه:", false, GppWindow) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.progressbar[2] = guiCreateProgressBar(221, 20, 169, 38, false, GppWindow)  
        GUIEditor.label[2] = guiCreateLabel(11, 4, 147, 28, "Admin-EX", false, GUIEditor.progressbar[2]) 
        guiLabelSetColor(GUIEditor.label[2], 254, 0, 0) 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center")       
     
-------------------------- 
---Grid list 
------------------------- 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
GUIEditor.gridlist[1] = guiCreateGridList(9, 55, 197, 226, false, GppWindow) 
guiGridListSetSelectionMode(GUIEditor.gridlist[1],2) 
local column = guiGridListAddColumn( GUIEditor.gridlist[1], "Player Name", 0.5 ) 
if ( column ) then 
for id, player in ipairs(getElementsByType("player")) do 
    local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
        guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, getPlayerName(player), false, false ) 
        guiGridListSetItemColor ( GUIEditor.gridlist[1], row, column, 0, 250, 154, 255 ) 
        end 
        addEventHandler ( "onClientGUIClick", GUIEditor.gridlist[1], click ) 
    end 
end) 
  
function click () 
       local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) 
       guiSetText ( GUIEditor.edit[2], playerName ) 
end 
     
  
  
---------------------------- 
--Show panel from command 
-------------------------- 
  
function showPanel () 
guiSetVisible (GppWindow, true) 
showCursor (true) 
playSound("open.mp3",false) 
end 
addEvent( "showPanel", true ) 
addEventHandler ( "showPanel", getRootElement(), showPanel) 
  
  
------------------------ 
--Event to bindKey 
------------------------ 
  
function show() 
    if guiGetVisible(GppWindow) == true then 
        guiSetVisible(GppWindow,false) 
        showCursor(false) 
    else 
        guiSetVisible(GppWindow,true) 
        showCursor(true) 
    end 
end 
addEvent("show",true) 
addEventHandler("show",root,show) 
  
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  
----------------------- 
--GetPermission 
--------------------- 
  
function GetPermission() 
triggerServerEvent ("OpenPanel", getLocalPlayer(), OpenPanel) 
end 
  
  
  
  
addEventHandler("onClientGUIClick",root, 
function() 
if source == GUIEditor.button[2] then -- هنا يتحققق بأن الشيء اللي نبيه يشتغل عليه الحدث هو الزر حق الاغلاق  
guiSetVisible(GppWindow,false) showCursor(false) -- هنا يغلق اللوحة ويشيل المؤشر بعد مايتحقق من الشرط 
end -- نهاية  
end -- .. 
) -- اقفال الحدث 
  
addEventHandler('onClientGUIClick',root, 
function() 
if source == GUIEditor.button[5] then -- هنا يتحقق بأن الشيء اللي نبي الحدث يتطبق عليه هو الزر حق فتح لوحة رقم 2 
guiSetVisible(Window2,true) showCursor(true) -- هنا يفتح لنا اللوحة  
guiSetVisible(GppWindow,false) -- إغلاق نافذة 1 
end -- نهاية 
end -- .. 
) -- إقفال 
  
addEventHandler('onClientGUIClick',root, 
function() 
if source == GUIEditor.button[4] then -- هنا يتحقق بأن الشيء اللي نبي الحدث يتطبق عليه هو الزر حق فتح لوحة رقم 2 
guiSetVisible(GppWindow,true) showCursor(true) -- هنا يفتح لنا اللوحة  
guiSetVisible(Window2,false) -- إغلاق نافذة 1 
end -- نهاية 
end -- .. 
) -- إقفال 
  
function onGuiClick (button, state, absoluteX, absoluteY) 
    if (source == BTN3_close2) then 
    guiSetVisible (Window2, false) 
    showCursor (false) 
    elseif (source == GUIEditor.button[3]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent ("remove", getLocalPlayer(), target) 
    elseif (source == GUIEditor.button[1]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("Moderator", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
end 
end 
  
function nopsound () 
playSound("np.mp3",false) 
end 
addEvent( "nopsound", true ) 
addEventHandler ( "nopsound", getRootElement(), nopsound) 
  
function removedsound () 
playSound("removed.wav",false) 
end 
addEvent( "removedsound", true ) 
addEventHandler ( "removedsound", getRootElement(), removedsound) 
  
function list() 
    guiGridListClear(GUIEditor.gridlist[1]) 
    for id, players in ipairs (getElementsByType("player")) do 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, getPlayerName(players), false, false) 
        guiGridListSetItemColor ( GUIEditor.gridlist[1], row, 1, 0, 250, 154, 255 ) 
    end 
end 
addEventHandler("onClientPlayerJoin", getRootElement(), list) 
addEventHandler("onClientPlayerQuit", getRootElement(), list) 
addEventHandler("onClientPlayerChangeNick", getRootElement(), list) 

سيرفر

-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
-- * thanks to MR.S3D for helping me 
local rootElement = getRootElement() 
  
-------------------- 
---bindKey i to open panel --only who in Console group  can open this panel 
------------------- 
  
addEventHandler("onPlayerJoin",root, 
function () 
    bindKey(source,"i","down",show) ----- Change "i" to the key you want 
end) 
  
addEventHandler("onResourceStart",resourceRoot, 
function () 
    for index, player in ipairs(getElementsByType("player")) do 
        bindKey(player,"i","down",show) ----Change "i" to the key you want 
    end 
end) 
  
function show(thePlayer) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Console")) then 
  
        triggerClientEvent(thePlayer,"showPanel",thePlayer) 
    else 
       outputChatBox ("* GPP: You Don't Have Permission For This Command", source, 255, 0, 0, true) 
       triggerClientEvent ( thePlayer,"nopsound", thePlayer ) 
    end 
end 
  
------------------------ 
--Give Admin.Sup,Mod,Remove 
----------------------- 
  
addEvent("Moderator",true) 
function Moderator(target) 
    local account = getPlayerAccount ( target ) 
    local group = aclGetGroup ( "Moderator" ) 
    if ( group ) then 
        aclGroupAddObject ( group, "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: '"..getAccountName(getPlayerAccount(target)).."' have been given moderator permissions", source, 0, 255 ,0 ) 
    else 
        outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("Moderator", getRootElement(), Moderator) 
  
addEvent("SuperModerator",true) 
function SuperModerator(target) 
    local account = getPlayerAccount ( target ) 
    local group = aclGetGroup ( "SuperModerator" ) 
    if ( group ) then 
        aclGroupAddObject ( group, "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: '"..getAccountName(getPlayerAccount(target)).."' have been given supermoderator permissions", source, 0, 255 ,0 ) 
    else 
        outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("SuperModerator", getRootElement(), SuperModerator) 
  
addEvent("Admin",true) 
function Admin(target) 
    local account = getPlayerAccount ( target ) 
    local group = aclGetGroup ( "Admin" ) 
    if ( group ) then 
        aclGroupAddObject ( group, "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: '"..getAccountName(getPlayerAccount(target)).."' have been given admin permissions", source, 0, 255 ,0 ) 
    else 
        outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("Admin", getRootElement(), Admin) 
  
addEvent("remove",true) 
function removee(target) 
    local account = getPlayerAccount ( target ) 
    if ( account ) then 
        aclGroupRemoveObject (aclGetGroup("Moderator"), "user."..getAccountName ( account ) ) 
        aclGroupRemoveObject (aclGetGroup("SuperModerator"), "user."..getAccountName ( account ) ) 
        aclGroupRemoveObject (aclGetGroup("Admin"), "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: all permissons of '"..getAccountName(getPlayerAccount(target)).."' has been removed !", source, 255, 0 ,0 ) 
         triggerClientEvent ( source,"removedsound", source ) 
    else 
    outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("remove", getRootElement(), removee) 
  
---------------------- 
--Command 
---------------------- 
function OpenPanel ( player ) 
    local player = player or source 
    local accountname = getAccountName( getPlayerAccount( player ) ) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ))  then 
       triggerClientEvent ( player,"showPanel", player ) 
    else 
       outputChatBox ("* GPP: You Don't Have Permission For This Command", player, 255, 0, 0, true) 
       triggerClientEvent ( player,"nopsound", player ) 
    end 
end 
addEvent( "OpenPanel", true ) 
addEventHandler ( "OpenPanel", getRootElement(), OpenPanel) 
addCommandHandler ( "gpp", OpenPanel ) 
  
function check() 
local accountname = getAccountName(getPlayerAccount(source)) 
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ))  then 
outputChatBox ("Type /gpp or press i to open give permissions panel", source, 255, 0, 0, true) 
end 
end 
addEventHandler("onPlayerLogin",getRootElement(),check ) 
-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
  

مشكله هي لما اطغط اعطاء مخالفة مايعضي ولايسجب ليشذ

ملاحظه انا طايفة في قروب ادمن والكونسل

Link to comment
        GUIEditor.label[1] = guiCreateLabel(7, 8, 417, 33, "mangres server by momar", false, GUIEditor.progressbar[1]) 
  

ياخي تبي تساعدني ساعدني ماتبي خلاص

وانا مش فاهم عليك

يقصد انك تسرق الحقوق ، -ـ-

طيب بالنهاية انت اعط الي مسوي كل شيء على الاقل اسمه

او وخر الاسم بالاساس ،

function onGuiClick (button, state, absoluteX, absoluteY) 
    if (source == BTN3_close2) then 
    guiSetVisible (Window2, false) 
    showCursor (false) 
    elseif (source == GUIEditor.button[3]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent ("remove", getLocalPlayer(), target) 
    elseif (source == GUIEditor.button[1]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("Moderator", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
end 
end 

اول شيء انت بتعطيه مخالفة ؟ ، ولا بتعطيه مشرف ؟

+ انت حاط اشياء ماستختدمها بالاساس مثل : مكان الضغط او الحالة ، او الزو

وبالاخير ماستعملتها ، اعتقد انك ناسخ من الويكي ومدربي راسك ذذ ،

وش مشكلتك بالاساس ووضح لنا وش تبي انت بالضبط ، حاط المخالف يعطيه مشرف ثم يقول ليه مايشتغل -ـ-

الا اذا كنت حاط المخالف رتبته مشرف ،

+ المفترض تمسح رتبه الاخرى ان كنت تبي مشرف المخالف -ـ-

تصحيح :

function onGuiClick (button, state, absoluteX, absoluteY) 
    if (source == BTN3_close2) then 
    guiSetVisible (Window2, false) 
    showCursor (false) 
    elseif (source == GUIEditor.button[3]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent ("remove", getLocalPlayer(), target) 
    elseif (source == GUIEditor.button[1]) then 
    local name = guiGetText ( GUIEditor.edit[2] ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("Admin-EX", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
end 
end 

سيرفر :

addEvent("Admin-EX",true) 
addEventHandler("Admin-EX",root, 
 function (nAccount) 
    if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(nAccount)), aclGetGroup("Admin-EX") then 
              ---outputChatBox اذا صار مخالف من قبل 
         else 
              aclGroupAddObject(aclGetGroup("Admin-EX"), "user."..getAccountName(getPlayerAccount(nAccount))) 
              ---- outputChatBox اذا تم اعطاءه مخالف ، 
              --- كودك المتبقي لو تبي شيء زيادة ، 
         end 
    end 
) 

Link to comment
        GUIEditor.label[1] = guiCreateLabel(7, 8, 417, 33, "mangres server by momar", false, GUIEditor.progressbar[1]) 
  

:? :?

ياخي تبي تساعدني ساعدني ماتبي خلاص

وانا مش فاهم عليك

:) تعرف إنني ماقدر احاسبك ؟ لكن الله يحاسبك لا يوجد مفر :|

إتقي الله ولاتسرق حقوق الناس

لو انت معدل ع المود تقدر تكتب Edited By : Momar

بالتوفيق ـ_ـ

Link to comment

ياخي

والله انا الي سويت الوحة وكل شيء

بس الاكواد اخدتها من مود اعطاء رتبه بس

ولاكن مش مطتوب عليه اسمه

وثاني شي

انا حاطت مود تحت تجربه فخليت رتبه مشرف انا فاهم كل شيء

بس كل الي ابيه هو ليه مايعطي رتبت مشرف ومايجي كلام بشات

وحتي انت معضني كود غلط

addEvent("Admin-EX",true) 
addEventHandler("Admin-EX",root, 
 function (nAccount) 
    if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(nAccount)), aclGetGroup("Admin-EX") then 
              ---outputChatBox اذا صار مخالف من قبل 
         else 
              aclGroupAddObject(aclGetGroup("Admin-EX"), "user."..getAccountName(getPlayerAccount(nAccount))) 
              ---- outputChatBox اذا تم اعطاءه مخالف ، 
              --- كودك المتبقي لو تبي شيء زيادة ، 
         end 
    end 
) 

Link to comment

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

  
        GUIEditor.label[1] = guiCreateLabel(7, 8, 417, 33, "m/BY:SoRa momar", false, GUIEditor.progressbar[1]) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
        guiLabelSetColor(GUIEditor.label[1], 25, 245, 9) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.label[2] = guiCreateLabel(6, 55, 416, 32, "قبل عمل اي شيء يجب اولاتحديد لاعب", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[2], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center") 
        GUIEditor.label[3] = guiCreateLabel(6, 103, 416, 32, "عند سحب مخالفة تاكد ان لاعب ليس عنده مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[3], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[3], "center") 
        GUIEditor.label[4] = guiCreateLabel(6, 159, 416, 32, "عندما تريد ان تضع للاعب مخالفة يجب عليك تجديد لاعب ثم دوس علي اعطاء مخالفة", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[4], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[4], "center") 
        GUIEditor.label[5] = guiCreateLabel(5, 205, 416, 32, "قوانين: عدم اعطاء الاعبين اكثر من عشر مخالفات باليوم", false, GUIEditor.progressbar[1]) 
        guiLabelSetColor(GUIEditor.label[5], 243, 81, 10) 
        guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[5], "center") 
        GUIEditor.button[4] = guiCreateButton(242, 253, 181, 39, "عوده لي لوحة مخالفات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFA019F") 
        BTN3_close2 = guiCreateButton(18, 255, 170, 39, "اغلاق الوحة تعليمات", false, GUIEditor.progressbar[1]) 
        guiSetProperty(BTN3_close2, "NormalTextColour", "FFFA0000")     

Link to comment

ياخي يعني وش تبي اسوي

ياخي والله انا الي سويت الوحة شف هادي الوحة الاصليه

-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
-- * thanks to MR.S3D for helping me 
  
GppWindow = guiCreateWindow(0.1637,0.3017,0.5975,0.4134,"Give Permissions Panel By |S.s|SoRa",true) 
guiSetVisible(GppWindow,false) 
Gpedit = guiCreateEdit(251,54,203,33,"",false,GppWindow) 
GiveModeratorButton = guiCreateButton(250,91,215,40,"Give Moderator Permissions",false,GppWindow) 
GiveSuperModeratorButton = guiCreateButton(250,143,215,40,"Give SuperModerator Permissions",false,GppWindow) 
GiveAdminsButton = guiCreateButton(251,194,210,40,"Give Admin Permissions",false,GppWindow) 
label = guiCreateLabel(252,31,154,17,"Player :",false,GppWindow) 
CloseButton = guiCreateButton(445,25,18,16,"X",false,GppWindow) 
removebutton = guiCreateButton(369,26,65,21,"remove",false,GppWindow) 
  
-------------------------- 
---Grid list 
------------------------- 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
grid = guiCreateGridList(9,25,228,214,false,GppWindow) 
guiGridListSetSelectionMode(grid,2) 
local column = guiGridListAddColumn( grid, "Player Name", 0.89 ) 
if ( column ) then 
for id, player in ipairs(getElementsByType("player")) do 
    local row = guiGridListAddRow ( grid ) 
        guiGridListSetItemText ( grid, row, column, getPlayerName(player), false, false ) 
        guiGridListSetItemColor ( grid, row, column, 0, 250, 154, 255 ) 
        end 
        addEventHandler ( "onClientGUIClick", grid, click ) 
    end 
end) 
  
function click () 
       local playerName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) 
       guiSetText ( Gpedit, playerName ) 
end 
  
---------------------------- 
--Show panel from command 
-------------------------- 
  
function showPanel () 
guiSetVisible (GppWindow, true) 
showCursor (true) 
playSound("open.mp3",false) 
end 
addEvent( "showPanel", true ) 
addEventHandler ( "showPanel", getRootElement(), showPanel) 
  
  
------------------------ 
--Event to bindKey 
------------------------ 
  
function show() 
    if guiGetVisible(GppWindow) == true then 
        guiSetVisible(GppWindow,false) 
        showCursor(false) 
    else 
        guiSetVisible(GppWindow,true) 
        showCursor(true) 
    end 
end 
addEvent("show",true) 
addEventHandler("show",root,show) 
  
--------------------- 
--On Click 
-------------------- 
  
function onGuiClick (button, state, absoluteX, absoluteY) 
    if (source == CloseButton) then 
    guiSetVisible (GppWindow, false) 
    showCursor (false) 
    elseif (source == removebutton) then 
    local name = guiGetText ( Gpedit ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent ("remove", getLocalPlayer(), target) 
    elseif (source == GiveModeratorButton) then 
    local name = guiGetText ( Gpedit ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("Adminex", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
    elseif (source == GiveSuperModeratorButton) then 
    local name = guiGetText ( Gpedit ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("SuperModerator", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
    elseif (source == GiveAdminsButton) then 
    local name = guiGetText ( Gpedit ) 
    local target = getPlayerFromName(name) 
    triggerServerEvent("Admin", getLocalPlayer(), target) 
    playSound("sec.wav",false) 
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  
----------------------- 
--GetPermission 
--------------------- 
  
function GetPermission() 
triggerServerEvent ("OpenPanel", getLocalPlayer(), OpenPanel) 
end 
  
---------------------- 
--Sound 
--------------------- 
  
function nopsound () 
playSound("np.mp3",false) 
end 
addEvent( "nopsound", true ) 
addEventHandler ( "nopsound", getRootElement(), nopsound) 
  
function removedsound () 
playSound("removed.wav",false) 
end 
addEvent( "removedsound", true ) 
addEventHandler ( "removedsound", getRootElement(), removedsound) 
  
-------------------- 
--Refrsh player list 
-------------------- 
  
function list() 
    guiGridListClear(grid) 
    for id, players in ipairs (getElementsByType("player")) do 
        local row = guiGridListAddRow(grid) 
        guiGridListSetItemText(grid, row, 1, getPlayerName(players), false, false) 
        guiGridListSetItemColor ( grid, row, 1, 0, 250, 154, 255 ) 
    end 
end 
addEventHandler("onClientPlayerJoin", getRootElement(), list) 
addEventHandler("onClientPlayerQuit", getRootElement(), list) 
addEventHandler("onClientPlayerChangeNick", getRootElement(), list) 
  
-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
  

ياخي انا والله ملف ميتا ماغيرت الحقوق والله قسم لك اني ماغيرت الحقوق

وكمان انا اطفت شيء الي لما تغط علي زر اعطاء المخالفة يسحب كل رتبه ويعطي رتبت مخالفة

-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
-- * thanks to MR.S3D for helping me 
local rootElement = getRootElement() 
  
-------------------- 
---bindKey i to open panel --only who in Console group  can open this panel 
------------------- 
  
addEventHandler("onPlayerJoin",root, 
function () 
    bindKey(source,"i","down",show) ----- Change "i" to the key you want 
end) 
  
addEventHandler("onResourceStart",resourceRoot, 
function () 
    for index, player in ipairs(getElementsByType("player")) do 
        bindKey(player,"i","down",show) ----Change "i" to the key you want 
    end 
end) 
  
function show(thePlayer) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Console")) then 
  
        triggerClientEvent(thePlayer,"showPanel",thePlayer) 
    else 
       outputChatBox ("* GPP: You Don't Have Permission For This Command", source, 255, 0, 0, true) 
       triggerClientEvent ( thePlayer,"nopsound", thePlayer ) 
    end 
end 
  
------------------------ 
--Give Admin.Sup,Mod,Remove 
----------------------- 
  
  
addEvent("Adminex",true) 
function Adminex(target) 
    local account = getPlayerAccount ( target ) 
    local group = aclGetGroup ( "Admin-EX" ) 
    if ( group ) then 
        removeGroups ( source ) 
        aclGroupAddObject ( group, "user."..getAccountName ( account ) ) 
        outputChatBox ( "ASL: '"..getAccountName(getPlayerAccount(target)).."تم اعطاء مخالفة للحساب '", source, 0, 255 ,0 ) 
    else 
        outputChatBox ( "لم يتم كتابة او تحديد علي الاسم", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("Adminex", getRootElement(), Adminex) 
  
  
addEvent("remove",true) 
function removee(target) 
    local account = getPlayerAccount ( target ) 
    if ( account ) then 
        aclGroupRemoveObject (aclGetGroup("Admin-EX"), "user."..getAccountName ( account ) ) 
        outputChatBox ( "GPP: all permissons of '"..getAccountName(getPlayerAccount(target)).."' has been removed !", source, 255, 0 ,0 ) 
         triggerClientEvent ( source,"removedsound", source ) 
    else 
    outputChatBox ( "No account name specified", source, 255, 100 ,100 ) 
    end 
end 
addEventHandler("remove", getRootElement(), removee) 
  
function removeGroups (  element  ) 
    if ( element and isElement ( element ) ) then 
        if ( getPlayerAccount ( element ) and not isGuestAccount ( getPlayerAccount ( element ) ) ) then 
            for _, v in ipairs ( aclGroupList ( ) ) do 
                g = aclGroupGetName ( v ) 
                if g ~= "Console" and g ~= "Managers" and g ~= "Maps" then 
                    if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( element ) ), v ) ) then 
                        aclGroupRemoveObject ( v, "user." .. getAccountName ( getPlayerAccount ( element ) ) ) 
                    end 
                end 
            end 
        end 
    end 
end 
  
---------------------- 
--Command 
---------------------- 
function OpenPanel ( player ) 
    local player = player or source 
    local accountname = getAccountName( getPlayerAccount( player ) ) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Managers-ACl" ))  then 
       triggerClientEvent ( player,"showPanel", player ) 
    else 
       outputChatBox ("* انت الان مرشح مانجرس وليس لديك رتبت مانجرس :Momar", player, 255, 0, 0, true) 
       triggerClientEvent ( player,"nopsound", player ) 
    end 
end 
addEvent( "OpenPanel", true ) 
addEventHandler ( "OpenPanel", getRootElement(), OpenPanel) 
addCommandHandler ( "gpp", OpenPanel ) 
  
function check() 
local accountname = getAccountName(getPlayerAccount(source)) 
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Managers" ))  then 
else 
outputChatBox (" انت معك رتبت مانجرس تقدر تفتح لوحة بطغط عل زر i", player, 255, 0, 0, true) 
end 
end 
addEventHandler("onPlayerLogin",getRootElement(),check ) 
-- * scripted by |S.s|SoRa 
-- * please don't remove my Copyrights 
  

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

يعني الحين

Link to comment

انا اتكلم عن قبل مب الحين

انت قبل حاط

       GUIEditor.label[1] = guiCreateLabel(7, 8, 417, 33, "mangres server by momar", false, GUIEditor.progressbar[1]) 
  

المهم مابي اسوي مشاكل

الحقوق تبقآ لصاحبها مهما تغيرت اللوحة xD

بالتوفيق لك _

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