Manticore Posted June 29, 2018 Share Posted June 29, 2018 Client side: GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(491, 202, 257, 327, "Rank panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(68, 291, 113, 26, "Close", false, GUIEditor.window[1]) Grid = guiCreateGridList(9, 23, 238, 258, false, GUIEditor.window[1]) guiGridListAddColumn(Grid, "Player", 0.5) guiGridListAddColumn(Grid, "Rank", 0.5) addEvent("showThePanel", true ) addEventHandler("showThePanel", root, function (players) if not guiGetVisible( GUIEditor.window[1] ) then guiGridListClear(Grid) for k,v in pairs(players) do local row = guiGridListAddRow(Grid, index,1) local nick = guiGridListGetItemText(Grid,index,1) guiGridListSetItemText(Grid,row,1 ,v[1],false,false) guiGridListSetItemText(Grid,row,1 ,v[2],false,false) end end guiSetVisible( ( GUIEditor.window[1] ),true ) showCursor(true) end) function onGuiClick() if (source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, onGuiClick) server side: local acls = { "Owner", "Manager", "Developer", "Admin", "SuperModerator", "Moderator", "Warden", "VIP", } function toggleImportantPeople( presser ) local tempTable = {} local plrs = getElementsByType( "player" ) for _,p in pairs(plrs) do local rank = getRank(p) if rank then table.insert(acls, {getPlayerName( p ),rank}) end end triggerClientEvent( presser, "showThePanel", presser, tempTable ) end function getRank( plr ) for _,r in pairs(acls) do if hasRights(plr, r) then return r end end end local plrs = getElementsByType( "player" ) for _,p in pairs(plrs) do bindKey ( p, "F5", "down", toggleImportantPeople) end addEventHandler( "onPlayerLogin", root, function( ) bindKey ( source, "F5", "down", toggleImportantPeople) end ) function hasRights(plr,group) if ACLGroup.get(group):doesContainObject("user."..plr.account.name) then return true else -- plr:outputChatBox("You're not allowed to use this command",plr,100,0,0,true) return false end end يعني بدي قريد ليست تضهر كل اسماء اللاعبين اللي معهم رتب زيما نتا شايف في acls و تضيف اسماء لاعبين لحالها حتى ولو غير إسمو بترجاكم سعدوني و مافي اي مشكلة في سكربت Link to comment
Manticore Posted June 30, 2018 Author Share Posted June 30, 2018 بس ساعدوني ليش ساكتين طلبت شيء واحد فقط Link to comment
بويكا Posted June 30, 2018 Share Posted June 30, 2018 (edited) index ?? سطر 20 - 21 Edited June 30, 2018 by بويكا Link to comment
بويكا Posted July 1, 2018 Share Posted July 1, 2018 On ٣٠/٦/٢٠١٨ at 19:27, Mohamed Nightmare said: مسحتهم بس مو شغال مو تمسحهم الله يهديك عدل index وحطه v Link to comment
Manticore Posted July 1, 2018 Author Share Posted July 1, 2018 local row = guiGridListAddRow(Grid, v,1) local nick = guiGridListGetItemText(Grid, v,1) جربته بس ما اشتغل معاي Link to comment
MR.Mosa Posted July 1, 2018 Share Posted July 1, 2018 (edited) GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(491, 202, 257, 327, "Rank panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(68, 291, 113, 26, "Close", false, GUIEditor.window[1]) Grid = guiCreateGridList(9, 23, 238, 258, false, GUIEditor.window[1]) guiGridListAddColumn(Grid, "Player", 0.5) guiGridListAddColumn(Grid, "Rank", 0.5) addEvent("showThePanel", true ) addEventHandler("showThePanel", root, function (players) if not guiGetVisible( GUIEditor.window[1] ) then guiGridListClear(Grid) for k,v in pairs(players) do local row = guiGridListAddRow(Grid, index,1) local nick = guiGridListGetItemText(Grid,index,1) guiGridListSetItemText(Grid,row,1 ,v[1],false,false) guiGridListSetItemText(Grid,row,1 ,v[2],false,false) end end guiSetVisible( GUIEditor.window[1] ,true ) showCursor(true) end) function onGuiClick() if (source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, onGuiClick) جرب المشكلة كانت عندك في سطر 26 Edited July 1, 2018 by MR.Mosa Link to comment
Manticore Posted July 1, 2018 Author Share Posted July 1, 2018 ما اشتغلت كنت بدها تضهر الي إسم لاعب مع رتبة تبعه و اكبر رتبة راح تكون في القمة في احد؟ بلييز 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