Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 17 minutes ago, MR_Mahmoud said: يالغالي وش صار معاك لي يومين استنا ما ارسلتلي الاكواد عشان اعدلها لك يقلبي Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 Just now, Master_MTA said: ما ارسلتلي الاكواد عشان اعدلها لك يقلبي بس انت قلت تبي المود كامل يابعدي Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 (edited) Just now, MR_Mahmoud said: بس انت قلت تبي المود كامل يابعدي يب عشان اعرف وين الغلط +_+ وش المشكله في المود اصلا Edited March 14, 2017 by Master_MTA Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 1 minute ago, Master_MTA said: يب عشان اعرف وين الغلط +_+ وش المشكله في المود اصلا شوف انا وش طلبت طلبت تعديله بس عشان الادمن مخالف +لو اشترا رتبة تمسح القبلها ^____ Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 (edited) 14 minutes ago, MR_Mahmoud said: شوف انا وش طلبت طلبت تعديله بس عشان الادمن مخالف +لو اشترا رتبة تمسح القبلها ^____ هههههههههههه الله يهديك يا عبد الكريم كنت ناسي not انت سويت للعالم كله مشكله سطر 60 @Abdul KariM local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) جرب ورد خبر @MR_Mahmoud Edited March 14, 2017 by Master_MTA Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 7 minutes ago, Master_MTA said: عطني كود كلنت اللي يرسل التراقر عشان افهم ---------------------- -- Setting ---------------------- local Key = "F7" local Admin = { {"ملك الدرفت","Admin.Mo7tref","5"}, {" شرطة ","Police","10"}, {"مـشـرف1","Moderator1","15"}, {"مـشـرف2","Moderator2","20"}, {"مـشـرف3","Moderator3","25"}, {"ادمن1","Admin1","30"}, {"ادمن2","Admin2","35"}, {"ادمن3","Admin3","40"}, {"مسؤل السيرفر","msaol.server","75"}, {"مساعد صاحب السيرفر","msad.neap","150"}, {"نائب صاحب السيرفر","neap.sahp","200"}, } ---------------------- -- Setting ---------------------- GUIEditor = { label = {}, button = {}, window = {}, gridlist = {}, combobox = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(10, (screenH - 481) / 2, 393, 475, "[ Rank System ]", false) guiSetVisible(GUIEditor.window[1],false); guiWindowSetSizable(GUIEditor.window[1], false); guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0090FF") GUIEditor.label[1] = guiCreateLabel(10, 450, 360, 25, "#By BoyKa", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.button[1] = guiCreateButton(10, 370, 373, 44, "[ Buy Rank ،/ ششرآءْ الرتبهةء ]", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.label[4] = guiCreateLabel(129, 424, 254, 16, "ملاحظة : يمكنك رؤية ساعاتك عن طريق >Tab<", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4],0, 144, 255) guiLabelSetHorizontalAlign(GUIEditor.label[4], "right", false) GUIEditor.combobox[1] = guiCreateComboBox(12, 27, 371, 438, "--------------------------[ مساعدهه ]---------------------------", false, GUIEditor.window[1]) guiSetFont(GUIEditor.combobox[1], "default-bold-small") guiSetProperty(GUIEditor.combobox[1], "NormalEditTextColour", "FF0000FF") guiComboBoxAddItem(GUIEditor.combobox[1], "--------------------------[ مساعدهه ]---------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤأل : لم استلم رتبتي ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجوأب : تـأكد من ساعاتك عن طريق Tab") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : كيف اجمع ساعات ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : عن طريق التواجد بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : لا تحفظ ساعاتي بالسيرفر لماذا ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : تأكد من تسجيلك حساب والدخول اليه بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") GUIEditor.gridlist[1] = guiCreateGridList(10, 60, 373, 295, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) guiSetFont(GUIEditor.gridlist[1],FontGrid) row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الرتبه", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "القروب", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "ساعات", 0.1) for k,v in ipairs ( Admin ) do 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) guiGridListSetItemText(GUIEditor.gridlist[1],row,4,v[3],false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,2,255,255,255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,3,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,4,255,255,255) guiSetFont (GUIEditor.gridlist[1],"default-bold-small") end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,3 )); local Price = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,4 )); local Name = tostring ( guiGridListGetItemText(GUIEditor.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("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffffألرجاء اختيار الرتبة", 255, 255, 255, true ) end end addEventHandler("onClientGUIClick",GUIEditor.button[1],xMainFunctions_,false); xBindFunction_ = function () guiSetVisible(GUIEditor.window[1],not guiGetVisible(GUIEditor.window[1])); showCursor(guiGetVisible(GUIEditor.window[1])); end bindKey(Key,"down",xBindFunction_); fileDelete("Admin_Client.lua") Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 Just now, MR_Mahmoud said: ---------------------- -- Setting ---------------------- local Key = "F7" local Admin = { {"ملك الدرفت","Admin.Mo7tref","5"}, {" شرطة ","Police","10"}, {"مـشـرف1","Moderator1","15"}, {"مـشـرف2","Moderator2","20"}, {"مـشـرف3","Moderator3","25"}, {"ادمن1","Admin1","30"}, {"ادمن2","Admin2","35"}, {"ادمن3","Admin3","40"}, {"مسؤل السيرفر","msaol.server","75"}, {"مساعد صاحب السيرفر","msad.neap","150"}, {"نائب صاحب السيرفر","neap.sahp","200"}, } ---------------------- -- Setting ---------------------- GUIEditor = { label = {}, button = {}, window = {}, gridlist = {}, combobox = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(10, (screenH - 481) / 2, 393, 475, "[ Rank System ]", false) guiSetVisible(GUIEditor.window[1],false); guiWindowSetSizable(GUIEditor.window[1], false); guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0090FF") GUIEditor.label[1] = guiCreateLabel(10, 450, 360, 25, "#By BoyKa", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.button[1] = guiCreateButton(10, 370, 373, 44, "[ Buy Rank ،/ ششرآءْ الرتبهةء ]", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.label[4] = guiCreateLabel(129, 424, 254, 16, "ملاحظة : يمكنك رؤية ساعاتك عن طريق >Tab<", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4],0, 144, 255) guiLabelSetHorizontalAlign(GUIEditor.label[4], "right", false) GUIEditor.combobox[1] = guiCreateComboBox(12, 27, 371, 438, "--------------------------[ مساعدهه ]---------------------------", false, GUIEditor.window[1]) guiSetFont(GUIEditor.combobox[1], "default-bold-small") guiSetProperty(GUIEditor.combobox[1], "NormalEditTextColour", "FF0000FF") guiComboBoxAddItem(GUIEditor.combobox[1], "--------------------------[ مساعدهه ]---------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤأل : لم استلم رتبتي ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجوأب : تـأكد من ساعاتك عن طريق Tab") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : كيف اجمع ساعات ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : عن طريق التواجد بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : لا تحفظ ساعاتي بالسيرفر لماذا ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : تأكد من تسجيلك حساب والدخول اليه بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") GUIEditor.gridlist[1] = guiCreateGridList(10, 60, 373, 295, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) guiSetFont(GUIEditor.gridlist[1],FontGrid) row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الرتبه", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "القروب", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "ساعات", 0.1) for k,v in ipairs ( Admin ) do 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) guiGridListSetItemText(GUIEditor.gridlist[1],row,4,v[3],false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,2,255,255,255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,3,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,4,255,255,255) guiSetFont (GUIEditor.gridlist[1],"default-bold-small") end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,3 )); local Price = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,4 )); local Name = tostring ( guiGridListGetItemText(GUIEditor.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("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffffألرجاء اختيار الرتبة", 255, 255, 255, true ) end end addEventHandler("onClientGUIClick",GUIEditor.button[1],xMainFunctions_,false); xBindFunction_ = function () guiSetVisible(GUIEditor.window[1],not guiGetVisible(GUIEditor.window[1])); showCursor(guiGetVisible(GUIEditor.window[1])); end bindKey(Key,"down",xBindFunction_); fileDelete("Admin_Client.lua") عدلت ردي جربه Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 1 minute ago, Master_MTA said: عدلت ردي جربه مافتحت الوحة اصلا Link to comment
N3xT Posted March 14, 2017 Share Posted March 14, 2017 عطني اكواد السيرفر + الكلنت كاملة بعد التعديل , ووش تبي تسوي بالظبط؟ Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 Just now, MR_Mahmoud said: مافتحت الوحة اصلا وش دخل اللوحه بالموضوع انا اتكلم عن سيرفر سايد مب كلنت الكود اللي فوق Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 1 minute ago, Master_MTA said: وش دخل اللوحه بالموضوع انا اتكلم عن سيرفر سايد مب كلنت الكود اللي فوق يب هاد كود الكلنت ^__ Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 +هات الدي بق حبيبي شفت هذا حطه بالسيرفر سايد بدال اللي عندك local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 2 minutes ago, N3xT said: عطني اكواد السيرفر + الكلنت كاملة بعد التعديل , ووش تبي تسوي بالظبط؟ يالغالي ابيه فيه ادمن مخالف +لو اشترا رتبة جديدة تروح القديمة الا رتب انا احددهم ---------------------- -- الكلنت ---------------------- local Key = "F7" local Admin = { {"ملك الدرفت","Admin.Mo7tref","5"}, {" شرطة ","Police","10"}, {"مـشـرف1","Moderator1","15"}, {"مـشـرف2","Moderator2","20"}, {"مـشـرف3","Moderator3","25"}, {"ادمن1","Admin1","30"}, {"ادمن2","Admin2","35"}, {"ادمن3","Admin3","40"}, {"مسؤل السيرفر","msaol.server","75"}, {"مساعد صاحب السيرفر","msad.neap","150"}, {"نائب صاحب السيرفر","neap.sahp","200"}, } ---------------------- -- Setting ---------------------- GUIEditor = { label = {}, button = {}, window = {}, gridlist = {}, combobox = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(10, (screenH - 481) / 2, 393, 475, "[ Rank System ]", false) guiSetVisible(GUIEditor.window[1],false); guiWindowSetSizable(GUIEditor.window[1], false); guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0090FF") GUIEditor.label[1] = guiCreateLabel(10, 450, 360, 25, "#By BoyKa", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.button[1] = guiCreateButton(10, 370, 373, 44, "[ Buy Rank ،/ ششرآءْ الرتبهةء ]", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.label[4] = guiCreateLabel(129, 424, 254, 16, "ملاحظة : يمكنك رؤية ساعاتك عن طريق >Tab<", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4],0, 144, 255) guiLabelSetHorizontalAlign(GUIEditor.label[4], "right", false) GUIEditor.combobox[1] = guiCreateComboBox(12, 27, 371, 438, "--------------------------[ مساعدهه ]---------------------------", false, GUIEditor.window[1]) guiSetFont(GUIEditor.combobox[1], "default-bold-small") guiSetProperty(GUIEditor.combobox[1], "NormalEditTextColour", "FF0000FF") guiComboBoxAddItem(GUIEditor.combobox[1], "--------------------------[ مساعدهه ]---------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤأل : لم استلم رتبتي ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجوأب : تـأكد من ساعاتك عن طريق Tab") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : كيف اجمع ساعات ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : عن طريق التواجد بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : لا تحفظ ساعاتي بالسيرفر لماذا ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : تأكد من تسجيلك حساب والدخول اليه بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") GUIEditor.gridlist[1] = guiCreateGridList(10, 60, 373, 295, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) guiSetFont(GUIEditor.gridlist[1],FontGrid) row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الرتبه", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "القروب", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "ساعات", 0.1) for k,v in ipairs ( Admin ) do 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) guiGridListSetItemText(GUIEditor.gridlist[1],row,4,v[3],false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,2,255,255,255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,3,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,4,255,255,255) guiSetFont (GUIEditor.gridlist[1],"default-bold-small") end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,3 )); local Price = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,4 )); local Name = tostring ( guiGridListGetItemText(GUIEditor.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("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffffألرجاء اختيار الرتبة", 255, 255, 255, true ) end end addEventHandler("onClientGUIClick",GUIEditor.button[1],xMainFunctions_,false); xBindFunction_ = function () guiSetVisible(GUIEditor.window[1],not guiGetVisible(GUIEditor.window[1])); showCursor(guiGetVisible(GUIEditor.window[1])); end bindKey(Key,"down",xBindFunction_); fileDelete("Admin_Client.lua") السيرفر local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 Just now, MR_Mahmoud said: يالغالي ابيه فيه ادمن مخالف +لو اشترا رتبة جديدة تروح القديمة الا رتب انا احددهم ---------------------- -- الكلنت ---------------------- local Key = "F7" local Admin = { {"ملك الدرفت","Admin.Mo7tref","5"}, {" شرطة ","Police","10"}, {"مـشـرف1","Moderator1","15"}, {"مـشـرف2","Moderator2","20"}, {"مـشـرف3","Moderator3","25"}, {"ادمن1","Admin1","30"}, {"ادمن2","Admin2","35"}, {"ادمن3","Admin3","40"}, {"مسؤل السيرفر","msaol.server","75"}, {"مساعد صاحب السيرفر","msad.neap","150"}, {"نائب صاحب السيرفر","neap.sahp","200"}, } ---------------------- -- Setting ---------------------- GUIEditor = { label = {}, button = {}, window = {}, gridlist = {}, combobox = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(10, (screenH - 481) / 2, 393, 475, "[ Rank System ]", false) guiSetVisible(GUIEditor.window[1],false); guiWindowSetSizable(GUIEditor.window[1], false); guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0090FF") GUIEditor.label[1] = guiCreateLabel(10, 450, 360, 25, "#By BoyKa", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.button[1] = guiCreateButton(10, 370, 373, 44, "[ Buy Rank ،/ ششرآءْ الرتبهةء ]", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.label[4] = guiCreateLabel(129, 424, 254, 16, "ملاحظة : يمكنك رؤية ساعاتك عن طريق >Tab<", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4],0, 144, 255) guiLabelSetHorizontalAlign(GUIEditor.label[4], "right", false) GUIEditor.combobox[1] = guiCreateComboBox(12, 27, 371, 438, "--------------------------[ مساعدهه ]---------------------------", false, GUIEditor.window[1]) guiSetFont(GUIEditor.combobox[1], "default-bold-small") guiSetProperty(GUIEditor.combobox[1], "NormalEditTextColour", "FF0000FF") guiComboBoxAddItem(GUIEditor.combobox[1], "--------------------------[ مساعدهه ]---------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤأل : لم استلم رتبتي ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجوأب : تـأكد من ساعاتك عن طريق Tab") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : كيف اجمع ساعات ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : عن طريق التواجد بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") guiComboBoxAddItem(GUIEditor.combobox[1], "سؤال : لا تحفظ ساعاتي بالسيرفر لماذا ؟") guiComboBoxAddItem(GUIEditor.combobox[1], "الجواب : تأكد من تسجيلك حساب والدخول اليه بالسيرفر") guiComboBoxAddItem(GUIEditor.combobox[1], "----------------------------------------------------------------") GUIEditor.gridlist[1] = guiCreateGridList(10, 60, 373, 295, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) guiSetFont(GUIEditor.gridlist[1],FontGrid) row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الرتبه", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "القروب", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "ساعات", 0.1) for k,v in ipairs ( Admin ) do 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) guiGridListSetItemText(GUIEditor.gridlist[1],row,4,v[3],false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,2,255,255,255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,3,0, 144, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],row,4,255,255,255) guiSetFont (GUIEditor.gridlist[1],"default-bold-small") end xMainFunctions_ = function ( ) local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,3 )); local Price = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,4 )); local Name = tostring ( guiGridListGetItemText(GUIEditor.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("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffffألرجاء اختيار الرتبة", 255, 255, 255, true ) end end addEventHandler("onClientGUIClick",GUIEditor.button[1],xMainFunctions_,false); xBindFunction_ = function () guiSetVisible(GUIEditor.window[1],not guiGetVisible(GUIEditor.window[1])); showCursor(guiGetVisible(GUIEditor.window[1])); end bindKey(Key,"down",xBindFunction_); fileDelete("Admin_Client.lua") السيرفر local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) سطر 64 بدله بذا if isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then هو كذا عندك بدله بذا if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 2 minutes ago, Master_MTA said: سطر 64 بدله بذا if isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then هو كذا عندك بدله بذا if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then في الكلنت ولا سيرفر ؟ Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 Just now, MR_Mahmoud said: في الكلنت ولا سيرفر ؟ سيرفر اكيد Link to comment
N3xT Posted March 14, 2017 Share Posted March 14, 2017 ماني شايف أخطاء عالعموم بدل السيرفر بذا, واذا ماشتغل عطني الديبق local exAdmin = "Admin-Ex" -- أسم الادمن اكس local aGroups = { -- جدول الرتب اللي ما تبيها تروح ["3GL"] = true, ["FFO"] = true, ["Adminmsg"] = true, }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(exAdmin)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 Just now, N3xT said: ماني شايف أخطاء عالعموم بدل السيرفر بذا, واذا ماشتغل عطني الديبق local exAdmin = "Admin-Ex" -- أسم الادمن اكسlocal aGroups = { -- جدول الرتب اللي ما تبيها تروح ["3GL"] = true, ["FFO"] = true, ["Adminmsg"] = true,}; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end endend xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(exAdmin)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); endendaddEvent("Accept:the:request",true) نفس الاخ عبد الكريم بس شلت التحقق ومافيه مشاكل لو شلته او لا انا ضفت للتحقق not افضل ولا انا غلطان Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 2 minutes ago, Master_MTA said: سيرفر اكيد 64 مب نفس كوادك سطر 64 هاد هوة outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 Just now, MR_Mahmoud said: 64 مب نفس كوادك سطر 64 هاد هوة outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); يبن الحلال اطرح ملف السيرفر كامل Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 1 minute ago, Master_MTA said: يبن الحلال اطرح ملف السيرفر كامل ولله هاد هوة كامل local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) بدله بذا كله Just now, MR_Mahmoud said: ولله هاد هوة كامل local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); endendaddEvent("Accept:the:request",true) هذا الصحيح ها local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); end end addEvent("Accept:the:request",true) Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 5 minutes ago, Master_MTA said: local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); endendaddEvent("Accept:the:request",true) بدله بذا كله هذا الصحيح ها local aGroups = { ["3GL"] = true , ["FFO"] = true , ["Adminmsg"] = true , }; function removeGroups ( player ) if ( player ) and ( getElementType ( player ) == "player" ) then if isGuestAccount ( getPlayerAccount ( player ) ) then return end local Acc = getAccountName ( getPlayerAccount ( player ) ) if ( #aclGroupList ( ) == 0 ) then return end for _,Groups_ in ipairs( aclGroupList ( ) ) do if not ( aGroups [ aclGroupGetName ( Groups_ ) ] ) then if ( isObjectInACLGroup ( "user." ..Acc, Groups_ ) ) then aclGroupRemoveObject ( Groups_ ,"user."..Acc ) end end end end end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup("Admin_x")) then return outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** الحساب الخاص بك محظور | "..Name,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 removeGroups ( source ) if not isObjectInACLGroup ("user."..account, aclGetGroup( tostring(Group)) ) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); end else outputChatBox("#ff4f00* ( #ffffffBuy Admin #ff4f00) : #ffffff**ليس لديك ساعات كافية",source,255,0,0,true); endendaddEvent("Accept:the:request",true) ماستر ياخي جربه عندك في المحلي وشف كيف مايصير Link to comment
Master_MTA Posted March 14, 2017 Share Posted March 14, 2017 3 minutes ago, MR_Mahmoud said: ماستر ياخي جربه عندك في المحلي وشف كيف مايصير غباء مني عذرا ضيف هذا السطر باخر ملف السيرفر اخر ملف السيرفر addEventHandler('Accept:the:request',root,xAddToGroupFunction_) حط ذا ومتاكد 100%بيشتغل بدون ما اجرب 11 minutes ago, MR_Mahmoud said: ماستر ياخي جربه عندك في المحلي وشف كيف مايصير زبط صح؟ تمت الافاده ولا لا؟ Link to comment
MR_Mahmoud Posted March 14, 2017 Author Share Posted March 14, 2017 (edited) شكرااااا كثير تعلمت كثير اشياء في هاد الموضوع شكر كبير ل N3xT وشكر اكبر ل Master_MTA وكل من ساعدني تمت الأفادة Edited March 14, 2017 by MR_Mahmoud 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