|M.r|LooFe| Posted June 8, 2017 Share Posted June 8, 2017 (edited) السلام وعليكم شباب انا صممت مود شراء رتب لسيرفري لكن فيه مشكلة وهي انه يكرر الرتب انا ابيه بس مجرد ما اشترا رتبت بوليس تضل معاه وبالباقي يتبدلو ما يتكررو + ابيه لما اسحب رتبت لاعب تجي رتبت مخالف وما يقدر يشتري رتبة ممكن مساعده شباب كلينت : ---------------------- -- Setting ---------------------- local Key = "F7" local Admin = { {"","KinG aL HaJaWlaH","20"}, {"","LeGenD oF ServeR","30"}, {"","PoLiCe","50"}, {"","MoDeRaToR","70"}, {"","MoDeRaToR PLuS","100"}, {"","PRo MoDeRaToR","150"}, {"","GeNeRaL MoDeRaToR","200"}, {"","iDeL MoDeRaToR","215"}, {"","KinG MoDeRaToR","230"}, {"","BesT MoDeRaToR","250"}, {"","MaNaGeR MoDeRaToR","260"}, {"","BoSs MoDeRaToR","280"}, {"","SuPeR MoDeRaToR","300"}, {"","SuPeR MoDeRaToR PLuS","330"}, {"","PRo SuPeR MoDeRaToR PLuS","350"}, {"","GeNeRaL SuPeR MoDeRaToR","370"}, {"","iDeL SuPeR MoDeRaToR","400"}, {"","KinG SuPeR MoDeRaToR","420"}, {"","BesT SuPeR MoDeRaToR","450"}, {"","MaNaGeR SuPeR MoDeRaToR","470"}, {"","BoSs SuPeR MoDeRaToR","500"}, {"","AdmiN","550"}, {"","AdmiN PLuS","600"}, {"","PRo AdmiN","650"}, {"","GeNeRaL AdmiN","700"}, {"","KinG AdmiN","750"}, {"","LeDeL AdmiN","780"}, {"","BesT AdmiN","800"}, {"","MaNaGeR AdmiN","850"}, {"","BoSs AdmiN","900"}, {"","SuPeRviSoR","1000"}, {"","Supervisor PLuS","1020"}, {"","PRo SupeRVisoR PLuS","1080"}, {"","GeNeRaL SuPeRVisoR","2000"}, {"","iDeL SuPeRVisoR","2100"}, {"","KinG SuPeRVisoR","2200"}, {"","BesT SuPeRVisoR","2300"}, {"","MaNaGeR SuPeRVisoR","2400"}, {"","BoSs SuPeRVisoR","2500"}, } ---------------------- -- Setting ---------------------- GiveAdmin = { Window = {}, gridlist = {}, button = {}, label = {}, } FontLabel = guiCreateFont( "Font.ttf", 13 ) FontButton = guiCreateFont( "Font.ttf", 13 ) FontGridList = guiCreateFont( "Font.ttf", 10 ) function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Back.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 160, 0, 950, 950, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, newFont2 ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GiveAdmin.Window[1] = guiCreateWindow(16, 149, 338, 386, "", false); guiSetVisible(GiveAdmin.Window[1],false); guiWindowSetSizable(GiveAdmin.Window[1], false); guiSetAlpha(GiveAdmin.Window[1], 1.00); GiveAdmin.label[1] = guiCreateLabel(15, 5, 322, 46, "[ لوحة شراء رتب By |M.r|LooFe ]", false, GiveAdmin.Window[1]); guiSetFont(GiveAdmin.label[1], FontLabel) GiveAdmin.gridlist[1] = guiCreateGridList(11, 61, 316, 255, false, GiveAdmin.Window[1]); guiGridListAddColumn(GiveAdmin.gridlist[1], "#", 0.2) guiGridListAddColumn(GiveAdmin.gridlist[1], "الرتبة", 0.2); guiGridListAddColumn(GiveAdmin.gridlist[1], "القروب", 0.3); guiGridListAddColumn(GiveAdmin.gridlist[1], "الساعات", 0.2); GiveAdmin.button[1] = guiCreateButton(108, 332, 123, 39, "شراء رتبة", false, GiveAdmin.Window[1]); guiSetFont(GiveAdmin.button[1], FontButton) guiSetProperty(GiveAdmin.button[1], "NormalTextColour", "FFF5FF00"); for k,v in ipairs ( Admin ) do row = guiGridListAddRow(GiveAdmin.gridlist[1]); guiGridListSetItemText(GiveAdmin.gridlist[1],row,1,''..k..'-',false,false); guiGridListSetItemText(GiveAdmin.gridlist[1],row,2,v[1],false,false); guiGridListSetItemText(GiveAdmin.gridlist[1],row,3,v[2],false,false); guiGridListSetItemText(GiveAdmin.gridlist[1],row,4,v[3],false,false); guiGridListSetItemColor(GiveAdmin.gridlist[1],row,1,math.random(0,255),math.random(0,255),math.random(0,255)) guiGridListSetItemColor(GiveAdmin.gridlist[1],row,2,math.random(0,255),math.random(0,255),math.random(0,255)) guiGridListSetItemColor(GiveAdmin.gridlist[1],row,3,math.random(0,255),math.random(0,255),math.random(0,255)) guiGridListSetItemColor(GiveAdmin.gridlist[1],row,4,math.random(0,255),math.random(0,255),math.random(0,255)) guiSetFont(GiveAdmin.gridlist[1], FontGridList) end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GiveAdmin.gridlist[1] ) local Group = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,3 )); local Price = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,4 )); local Name = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,2 )); if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent("Accept:the:request",localPlayer,Group,Price,Name); else outputChatBox(" الرجاء اختيار رتبة ",255,0,0,true); end end addEventHandler("onClientGUIClick",GiveAdmin.button[1],xMainFunctions_,false); xBindFunction_ = function () guiSetVisible(GiveAdmin.Window[1],not guiGetVisible(GiveAdmin.Window[1])); showCursor(guiGetVisible(GiveAdmin.Window[1])); end bindKey(Key,"down",xBindFunction_); fileDelete("Admin_Client.lua") سيرفر : xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("يجب عليك التسجيل اولا !",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("لديك هذه الرتبة فعلا !",source,255,0,0,true); 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( tostring(Group)),"user."..account); outputChatBox("تم اضافة التربة بنجاح"..Name,source,0,255,0,true); else outputChatBox("ليس لديك ساعات كافية !",source,255,0,0,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) اسم رتبت ادمن مخالف عندي في الاسل Admin-X Edited June 8, 2017 by |M.r|LooFe| Link to comment
#BrosS Posted June 8, 2017 Share Posted June 8, 2017 الموضوع مطروح مليون مرة بالمنتدى دور تلقى الحل واستعمل التاج لوضع الاكواد تلقاه بموضوع نصور المثبت Link to comment
|M.r|LooFe| Posted June 10, 2017 Author Share Posted June 10, 2017 طيب عطني رابط موضوع 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