Adham Posted March 21, 2016 Share Posted March 21, 2016 السلام عليكم انا صنعت مود الرتب مش بيفتح المود اصلن عاوز تعديل عليه او تعديل الخطاء كلينت local alzr = 'F7' GUIEditor = { gridlist = {}, window = {}, button = {} } -------alRtb ranks = { {'Assistant console',40}, {'adminstartion',40}, {'king of admins',40}, {'Manager server plus',40}, {'Manager server',40}, {'HED.ADMIN',40}, {'best admin',40}, {'super admin',40}, {'admin.Plus',40}, {'SuperModerator',40}, {'Moderator',40}, {'king of time',25} } ---------- local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(148, 156, 452, 341, "=[ لوحــة التــرقيـات ]=", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFC8F01") GUIEditor.gridlist[1] = guiCreateGridList(9, 24, 433, 264, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الرتب", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "عدد الساعات المطلوبه #", 0.5) for _,v in ipairs (ranks) do GUIEditor.button[1] = guiCreateButton(146, 294, 150, 31, "=[ تــرقيـة ]=", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(390, 303, 47, 28, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF9FB547") end ) -- bindKey (alzr,'down', function () guiSetVisible (GUIEditor.window[1],not guiGetVisible (GUIEditor.window[1])) showCursor (guiGetVisible (GUIEditor.window[1])) end) addEventHandler( "onClientMouseEnter", getRootElement(), function(aX, aY) if source == GUIEditor.button[1] then playSound ('sond.mp3') end end) addEventHandler ('onClientGUIClick',root, function () if source == GUIEditor.button[1] then local rank = guiGridListGetItemText (GUIEditor.gridlist[1],guiGridListGetSelectedItem (GUIEditor.gridlist[1]),1) local Price = guiGridListGetItemText (GUIEditor.gridlist[1],guiGridListGetSelectedItem (GUIEditor.gridlist[1]),2) local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent ('setRank',localPlayer,rank,Price) else triggerServerEvent ('error',localPlayer,rank,Price) end elseif source == GUIEditor.button[2] then guiSetVisible (GUIEditor.window[1],false) showCursor (false) end end ) سرفر addEvent ('setRank',true) addEventHandler ('setRank',root, function(rank,Price) accountName = getPlayerAccount (source) TheAcc = getAccountName (accountName) getAcl = aclGet ( rank ) if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup ("user."..TheAcc,aclGetGroup(rank)) then outputChatBox ('*[انت في هذه الرتبة بالفعل]',source,255,0,0) return end if isObjectInACLGroup ("user."..TheAcc,aclGetGroup('Console')) then outputChatBox ('*[انت في رتبة كونسول لا تستطيع شراء رتب]',source,255,0,0) return end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if ( hour >= tonumber(Price)) then aclGroupAddObject (aclGetGroup(rank), "user."..TheAcc) outputChatBox ('*[بنجاء '..rank..' تم شراء رتبة]',source,0,255,0) removeAcl = aclGroupList () for _,v in ipairs (removeAcl) do aclGroupRemoveObject ( v, 'user.'..TheAcc) end else outputChatBox ('*[ '..rank..' ليس لديك الساعات الكافيه لشراء رتبة]',source,255,0,0) end end ) addEvent ('error',true) addEventHandler ('error',root, function(rank,Price) outputChatBox (rank..' *[الرجاء اختيار الرتبه]',source,255,0,0) end) Link to comment
Adham Posted March 21, 2016 Author Share Posted March 21, 2016 طيب عملت كل ش انا عامل جدول للرتب عملت كل شي ظبت بس الرتب ما موجوده في القريد لست شوفو المشكله @@ صوره Link to comment
Ahmed Ly Posted March 21, 2016 Share Posted March 21, 2016 (edited) طيب عملت كل شانا عامل جدول للرتب عملت كل شي ظبت بس الرتب ما موجوده في القريد لست شوفو المشكله @@ صوره GUIEditor = { gridlist = {}, window = {}, button = {} } -------alRtb ranks = { {'Assistant console',40}, {'adminstartion',40}, {'king of admins',40}, {'Manager server plus',40}, {'Manager server',40}, {'HED.ADMIN',40}, {'best admin',40}, {'super admin',40}, {'admin.Plus',40}, {'SuperModerator',40}, {'Moderator',40}, {'king of time',25} } ---------- local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(148, 156, 452, 341, "=[ لوحــة التــرقيـات ]=", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFC8F01") GUIEditor.gridlist[1] = guiCreateGridList(9, 24, 433, 264, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الرتب", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "عدد الساعات المطلوبه #", 0.5) GUIEditor.button[7] = guiCreateButton(146, 294, 150, 31, "=[ تــرقيـة ]=", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA") GUIEditor.button[28] = guiCreateButton(390, 303, 47, 28, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[28], "NormalTextColour", "FF9FB547") -- guiSetVisible (GUIEditor.window[1], false) function open() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) end end bindKey("F7", "down", open) addEventHandler( "onClientMouseEnter", getRootElement(), function(aX, aY) if source == GUIEditor.button[1] then playSound ('sond.mp3') end end) addEventHandler ('onClientGUIClick',root, function () if source == GUIEditor.button[1] then local rank = guiGridListGetItemText (GUIEditor.gridlist[1],guiGridListGetSelectedItem (GUIEditor.gridlist[1]),1) local Price = guiGridListGetItemText (GUIEditor.gridlist[1],guiGridListGetSelectedItem (GUIEditor.gridlist[1]),2) local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent ('setRank',localPlayer,rank,Price) else triggerServerEvent ('error',localPlayer,rank,Price) end elseif source == GUIEditor.button[2] then guiSetVisible (GUIEditor.window[1],false) showCursor (false) end end ) for k,v in ipairs ( ranks ) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,''..k..'-',false,false); guiGridListSetItemText(GUIEditor.gridlist[1],row,2,v[1],false,false); guiGridListSetItemText(GUIEditor.gridlist[1],row,3,v[2],false,false); guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,255,255,0); guiGridListSetItemColor(GUIEditor.gridlist[1],row,2,0,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1],row,3,255,255,0); guiGridListSetItemColor(GUIEditor.gridlist[1],row,4,0,255,0); guiSetFont(GUIEditor.gridlist[1],"default-bold-small"); end Edited March 21, 2016 by Guest Link to comment
Jupi Posted March 21, 2016 Share Posted March 21, 2016 واو الحين انت حسستني ان الجدول سحري و بينزل بلجريد ليست تلقائي for _, v in ipairs (ranks) do local Row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 1, v[1], false, false) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 2, v[2], false, false) 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