saef Posted November 27, 2015 Share Posted November 27, 2015 السلام عليكمءء كيفكم ي شباب عسسآك بخيرر اليوم انا اخذت اف7 و عدلت عليه و صار يشتغل بس م يرقي و ضفته بي روب الادمن و سويت له رستارت و م زبط ^__________________________^ كلنت ---------------------- -- Setting ---------------------- local Key = "F7" local Admin = { {"King.Drift","20"}, {"V.I.P","40"}, {"Police","70"}, {"ADMIN","200"}, {"Head.Admin","300"}, {"Professional.Admin","400"}, {"Admin.MFA","500"}, {"Super.Admin","600"}, {"BesT.Admin","650"}, {"V.I.P-Admi","700"}, {"Leader.Admin","750"}, {"Admin.BOOS","800"}, {"Admin.Black","900"}, {"Admin.TOP","1100"}, {"KinG.Admin","1300"}, {"Prince.Server","1600"}, {"Prince.admin","2000"}, {"Prince.V.I.P","2200"}, {"Admin.Plus","2500"}, {"Big.Admin","2800"}, {"Admin.FeatUreD","3000"}, {"Prote.Admin","3500"}, {"KinG.SeRvEr","4000"}, } ---------------------- -- Setting ---------------------- GiveAdmin = { Window = {}, gridlist = {}, button = {}, label = {}, } function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false); local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false); end GiveAdmin.Window[1] = guiCreateWindow(445, 132, 390, 339, "=[نــظًًـأم الرتبـً بأًلسـًًـاعأت ]=", false); centerWindow(GiveAdmin.Window[1]); guiSetVisible(GiveAdmin.Window[1],false); guiWindowSetSizable(GiveAdmin.Window[1], false); guiSetAlpha(GiveAdmin.Window[1], 1.00); guiSetProperty(GiveAdmin.Window[1], "CaptionColour", "FFF70000"); guiSetFont(GiveAdmin.label[1], "default-bold-small") guiLabelSetColor(GiveAdmin.label[1], 255, 0, 0) GiveAdmin.gridlist[1] = guiCreateGridList(9, 51, 267, 397, false, GiveAdmin.Window[1]); guiGridListAddColumn(GiveAdmin.gridlist[1], "#", 0.2) guiGridListAddColumn(GiveAdmin.gridlist[1], "الرتبة #", 0.4); guiGridListAddColumn(GiveAdmin.gridlist[1], "الساعات #", 0.5); guiSetFont(GiveAdmin.label[2], "default-bold-small"); guiLabelSetColor(GiveAdmin.label[2], 41, 255, 0); GiveAdmin.button[1] = guiCreateButton(281, 268, 105, 26, ":;|اترقـًـية ", false, GiveAdmin.Window[1]); guiSetFont(GiveAdmin.button[1], "default-bold-small"); guiSetProperty(GiveAdmin.button[1], "NormalTextColour", "FFF70000"); 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,2,0,255,0); guiGridListSetItemColor(GiveAdmin.gridlist[1],row,1,255,0,0) guiGridListSetItemColor(GiveAdmin.gridlist[1],row,1,255,0,0); guiGridListSetItemColor(GiveAdmin.gridlist[1],row,1,255,0,0); 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_); سيرفر xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,255,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا ! ",source,255,0,255,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,255,true); else outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) + ابيكمء تحطون اذا احد رتبه م تتكرر + اذا اخذ مخالف م يترقى ي ليت تساعدون #_# ب آنتظآر حل الشمكله_(: Link to comment
ALw7sH Posted November 27, 2015 Share Posted November 27, 2015 debugstring 3 واكتب الأخطاء الي تجيك Link to comment
saef Posted November 28, 2015 Author Share Posted November 28, 2015 debugstring 3واكتب الأخطاء الي تجيك يعني اكتب بدل 3 اسم المود ؟ Link to comment
a7zan Posted November 28, 2015 Share Posted November 28, 2015 (edited) لا اكتب باف8 debugscript 3 وسوي ريستارت للمود ~ وتجي لك اخطاء تحت او كلام صوره وحط رابط صورة هنا Edited November 28, 2015 by Guest Link to comment
saef Posted November 28, 2015 Author Share Posted November 28, 2015 لااكتب باف8 debugstring 3 وسوي ريستارت للمود ~ وتجي لك اخطاء تحت او كلام صوره وحط رابط صورة هنا سويته م جانيي لا شيء Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 debugstring 3 xx debugscript 3 Link to comment
momar5700 Posted November 28, 2015 Share Posted November 28, 2015 تمت اضافة ادمن مخالف ومنع تكرر رتب ---------------------- -- ** Buy Admin's Script -- BY:Momar5600 -- server ---------------------- xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)) if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("انت لم تسجل بالسيرفر",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("لا يمكنك اختيار الرتبه لانه فعلا معك",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin-EX")) then return outputChatBox("انت مخآلف لايمكنك الحصول على رتبه",source,238,158,73,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 removeGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("مبروك لقد حصلت على الرتبه "..Name,source,238,158,73,true); else outputChatBox("عدد ساعاتك غير كافيه",source,238,158,73,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 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 ~= "Managers-ACl" and 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 Link to comment
ALw7sH Posted November 28, 2015 Share Posted November 28, 2015 debugstring 3 xx debugscript 3 ههههههه تسلم على التعديل مانتبهت اني كتبتها سترنق Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 ههههههه تسلم على التعديل مانتبهت اني كتبتها سترنق العفو , كل واحد يخطأ Link to comment
saef Posted November 28, 2015 Author Share Posted November 28, 2015 تمت اضافة ادمن مخالف ومنع تكرر رتب ---------------------- -- ** Buy Admin's Script -- BY:Momar5600 -- server ---------------------- xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)) if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("انت لم تسجل بالسيرفر",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("لا يمكنك اختيار الرتبه لانه فعلا معك",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin-EX")) then return outputChatBox("انت مخآلف لايمكنك الحصول على رتبه",source,238,158,73,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 removeGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("مبروك لقد حصلت على الرتبه "..Name,source,238,158,73,true); else outputChatBox("عدد ساعاتك غير كافيه",source,238,158,73,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 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 ~= "Managers-ACl" and 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 انت ضفت بس ذا الكود؟ 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 ~= "Managers-ACl" and 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 Link to comment
saef Posted November 28, 2015 Author Share Posted November 28, 2015 تمت اضافة ادمن مخالف ومنع تكرر رتب ---------------------- -- ** Buy Admin's Script -- BY:Momar5600 -- server ---------------------- xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)) if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("انت لم تسجل بالسيرفر",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("لا يمكنك اختيار الرتبه لانه فعلا معك",source,238,158,73,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin-EX")) then return outputChatBox("انت مخآلف لايمكنك الحصول على رتبه",source,238,158,73,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 removeGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("مبروك لقد حصلت على الرتبه "..Name,source,238,158,73,true); else outputChatBox("عدد ساعاتك غير كافيه",source,238,158,73,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 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 ~= "Managers-ACl" and 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 انت ضفت بس ذا الكود؟ 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 ~= "Managers-ACl" and 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 Link to comment
momar5700 Posted November 28, 2015 Share Posted November 28, 2015 لا انا كمان ضفت شيء ثاني والي هو لما تكون مخالف ماتقدر ترقي نفسك 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