#Mr.alkmasha Posted December 20, 2014 Share Posted December 20, 2014 اسلام عليكم انا مسوي لوحه و قريد ليست فيها اسماء الاعبين ابي اختار الاعب الي ب القريد ليست و اضغط addAcl و يحط الاعب الي محدده ب قروب اسل معين و ابي اسوي زر بوتون اطرده من القروب ياريت تساعدوني Link to comment
justboy Posted December 20, 2014 Share Posted December 20, 2014 Client * GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(456, 245, 496, 453, "Name", false) guiWindowSetSizable(GUIEditor.window[1], false) gridlist = guiCreateGridList(11, 30, 475, 374, false, GUIEditor.window[1]) Column = guiGridListAddColumn(gridlist, "Player", 0.9) GUIEditor.button[1] = guiCreateButton(277, 408, 170, 35, "طرد", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(51, 409, 170, 34, "اضافة", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") showCursor(true) end ) function tNames() for _,v in ipairs(getElementsByType("player")) do names = getPlayerName(v) row = guiGridListAddRow(gridlist) guiGridListSetItemText ( gridlist, row, Column, names, false, false ) end end addEventHandler("onClientResourceStart", resourceRoot,tNames) addEventHandler("onClientPlayerChangeNick", resourceRoot,tNames) addEventHandler("onClientPlayerJoin", resourceRoot,tNames) addEventHandler("onClientPlayerQuit", resourceRoot,tNames) addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.button[2] and gridlist then rRow, col = guiGridListGetSelectedItem (gridlist) Item = guiGridListGetItemText(gridlist, rRow, col) local plrName = getPlayerFromName (Item) triggerServerEvent ("AddObject", localPlayer, plrName) elseif source == GUIEditor.button[1] and gridlist then triggerServerEvent ("RemoveObject", localPlayer, plrName) end end) addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.button[1] and gridlist then rRow, col = guiGridListGetSelectedItem (gridlist) Item = guiGridListGetItemText(gridlist, rRow, col) local plrName = getPlayerFromName (Item) triggerServerEvent ("RemoveObject", localPlayer, plrName) end end) Server * addEvent("AddObject",true) addEventHandler("AddObject",root, function(plrName) aclGroupAddObject(aclGetGroup("Admin"),"user."..getAccountName((getPlayerAccount(plrName))) ) end) addEvent("RemoveObject",true) addEventHandler("RemoveObject",root, function(plrName) local acc = getAccountName((getPlayerAccount(plrName))) if isObjectInACLGroup ("user."..acc, aclGetGroup ( "Admin" ) ) then aclGroupRemoveObject (aclGetGroup("Admin"), "user."..acc) else outputChatBox("Admin هذا اللاعب ليس بقروب ",source) end end) 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