سلام عليكم ورحمة الله وبركاتة
انا ابي مساعدة الحين هاد المود تعديل تاج
--][ -- ** Scripted By MR.S3D --][ local Key = "o" local render = false Tag = {} word = {} CurrentLange = {"English"} Col = { {255,0,0}, {0,0,255}, } Color1 = {} Color2 = {} local Rroot = getResourceRootElement(getThisResource()) local warning = { ["English"] = {[0] = "error", [1] = "warning", [2] = "question", [3] = "info",[4] = "Yes",[5] = "No",[6] ="ok"}, ["Arabic|العربية"] = {[0] = "خطأ", [1] = "تحذير", [2] = "سؤال", [3] = "معلومات",[4] = "نعم",[5] = "لا",[6] = "تم"} } local screenW, screenH = guiGetScreenSize() function CallServer(funcname, ...) local arg = { ... } triggerServerEvent("onClientCallsServerFunction", resourceRoot , funcname, unpack(arg)) end function callClientFunction(funcname, ...) local arg = { ... } loadstring("return TagWindow."..funcname)()(unpack(arg)) end addEvent("onServerCallsClientFunction", true) addEventHandler("onServerCallsClientFunction", resourceRoot, callClientFunction) TagWindow = { sendAccept = function ( arg ) if guiGetVisible ( errorgWnd ) then TagWindow.guiDestroyerror() end unbindKey ( "enter", "down", sendInput ) if arg == false then return end if type ( arg ) == "table" and #arg > 0 then local tab = table.remove ( arg, 1 ) if type ( tab ) == "function" then tab ( unpack ( arg ) ) end end end, errorWindow = function ( text, error, arg) if type(error) ~= "number" or type(text) ~= "string" then return false end if isElement ( errorWnd ) then TagWindow.guiDestroyerror ( ) end if guiGetVisible ( S3Dwindow.window[1] ) then guiSetEnabled ( S3Dwindow.window[1], false ) end errorgWnd = guiCreateWindow ( (screenW/2)-200, (screenH/2)-67, 400, 134, warning[CurrentLange[1]][error], false ) local label = guiCreateLabel ( 114, 30, 276, 70, text, false, errorgWnd ) guiLabelSetHorizontalAlign ( label, "left", true ) guiSetFont ( label, "default-small" ) if error == 3 then Yes = guiCreateButton ( 80, 100, 277, 25, warning[CurrentLange[1]][6], false, errorgWnd ) else Yes = guiCreateButton ( 30, 100, 136, 25, warning[CurrentLange[1]][4], false, errorgWnd ) No = guiCreateButton ( 250, 100, 136, 25, warning[CurrentLange[1]][5], false, errorgWnd ) end bindKey ( "enter", "down", TagWindow.sendAccept, arg ) addEventHandler ( "onClientGUIClick", Yes, function ( ) TagWindow.sendAccept (arg) end, false ) if isElement(No) then addEventHandler ( "onClientGUIClick", No, function ( )TagWindow.sendAccept( false ) end, false ) end guiBringToFront ( errorgWnd ) showCursor ( true, true ) end, guiDestroyerror = function ( ) showCursor ( false, false ) if isElement ( errorgWnd ) then guiSetEnabled ( S3Dwindow.window[1], true ) destroyElement ( errorgWnd ) end if guiGetVisible ( S3Dwindow.window[1] ) then guiBringToFront ( S3Dwindow.window[1] ) showCursor ( true, true ) end return true end, errorMsg = { ["Arabic|العربية"] = { "يجب أن يكون التاج 4 حروف أو أكثر", "يجب أن تكون الكلمة من حرفين أو أكثر", "هل أنت متأكد من حذف هذا التاج ؟", "تم حذف التاج", "تم اضافة تاج جديد", "لم يتم اختيار لون الرسالة أو لون التاج", "هل أنت متأكد من تعديل هذا التاج ؟", "تأكد من البيانات المدخلة", "لم يتم إختيار أي قروب", "هل أنت متأكد من اضافة تاج جديد ؟", "تم اضافة الكلمة", "هل أنت متأكد من حذف هذه الكلمة ؟", "تم حذف الكلمة", }, ["English"] = { "The Tag name must be 4 characters or more", "The word must be 2 characters or more", "Are you sure you want delete this tag?", "Tag was deleted", "New Tag was added", "Not choose the color of the Tag or color message", "Are you sure you want modify this tag?", "Make sure all data entered", "No Acl selected", "Are you sure you want add new tag?", "Word was added", "Are you sure you want delete this word?", "Word was deleted", } }, error = function(i,level, ...) local arg = { ... } TagWindow.errorWindow(TagWindow.errorMsg[CurrentLange[1]][i],level,arg) end, default = { x = 67, y = 117, width = 633, height = 303, }, onCreat = function() Language = { ["Arabic|العربية"] = { [S3Dwindow.window[1]] = ":: لوحة صنع التاجات ::", [S3Dwindow.label[1]] = "اسم القروب :", [S3Dwindow.label[2]] = "التاج :", [S3Dwindow.label[3]] = "اضافة كلمة :", [S3Dwindow.label[4]] = "التحكم بـ اللون :", [S3Dwindow.label[5]] = "اللغة :", [S3Dwindow.checkbox[1]] = "لون الرسالة", [S3Dwindow.checkbox[2]] = "لون التاج", [S3Dwindow.button[1]] = "اضافة كلمة", [S3Dwindow.button[2]] = "حذف الكلمة", [S3Dwindow.button[3]] = "حذف التاج", [S3Dwindow.button[4]] = "اضافة تاج", }, ["English"] = { [S3Dwindow.window[1]] = ":: Set Groups Tag ::", [S3Dwindow.label[1]] = "ACL :", [S3Dwindow.label[2]] = "Tag :", [S3Dwindow.label[3]] = "Add word :", [S3Dwindow.label[4]] = "Control color:", [S3Dwindow.label[5]] = "Langauge:", [S3Dwindow.checkbox[1]] = "Color message", [S3Dwindow.checkbox[2]] = "Color tag", [S3Dwindow.button[1]] = "Add Word", [S3Dwindow.button[2]] = "Remove Word", [S3Dwindow.button[3]] = "Remove Tag", [S3Dwindow.button[4]] = "Add Tag", }, } local lang = TagWindow.getAllLanguage( "English" ) for k, v in pairs ( lang ) do guiSetText( v.element, v.id) end end, isFoundInLangage = function ( val ) if Language[ val ] then return true; end return false; end, getAllLanguage = function ( val ) local lang = {} if TagWindow.isFoundInLangage( val ) then for k, v in pairs ( Language[ val ] ) do if not isElement(k) then outputDebugString ( "Error" ) return {}; end table.insert(lang, {element = k,id = v}); end; end return lang; end, setgrid = function( gridlist, row, col, text, r, g, b) guiGridListSetItemText( gridlist, row, col, text, false, false ) guiGridListSetItemData( gridlist, row, col, tostring(text)) if tonumber(r) and tonumber(g) and tonumber(b) then guiGridListSetItemColor ( gridlist, row, col, r, g, b ) end end, getgrid = function ( gridlist, row, col ) return tostring ( guiGridListGetItemText( gridlist, row, col ) ) end, RGBToHex = function(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("%.2X%.2X%.2X%.2X", alpha, red, green,blue) else return string.format("%.2X%.2X%.2X", red,green,blue) end end, hex2rgb = function(hex) hex = hex:gsub("#","") return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6)) end, MainWindow = function() S3Dwindow = { memo = {}, button = {}, edit = {}, window = {}, gridlist = {}, checkbox = {}, label = {}, combobox = {}, } lnagTextCombobox = {"Arabic|العربية","English"} griditem = {"Tag Name |اسم التاج","blocked words|الكلمات الممنوعة"} local x,y = (screenW-TagWindow.default.width)/2,(screenH-TagWindow.default.height)/2 S3Dwindow.window[1] = guiCreateWindow(x,y, TagWindow.default.width, TagWindow.default.height, "", false) guiSetVisible(S3Dwindow.window[1], false) guiWindowSetSizable(S3Dwindow.window[1], false) guiSetAlpha(S3Dwindow.window[1], 1.00) S3Dwindow.gridlist[1] = guiCreateGridList(9, 23, 127, 273, false, S3Dwindow.window[1]) guiGridListAddColumn(S3Dwindow.gridlist[1],griditem[1], 0.90) S3Dwindow.label[1] = guiCreateLabel(154, 25, 174, 24, "", false, S3Dwindow.window[1]) S3Dwindow.label[2] = guiCreateLabel(153, 91, 187, 22, "", false, S3Dwindow.window[1]) S3Dwindow.edit[1] = guiCreateEdit(151, 124, 178, 23, "", false, S3Dwindow.window[1]) S3Dwindow.checkbox[1] = guiCreateCheckBox(152, 263, 123, 18, "", false, false, S3Dwindow.window[1]) S3Dwindow.gridlist[2] = guiCreateGridList(391, 26, 113, 175, false, S3Dwindow.window[1]) guiGridListAddColumn(S3Dwindow.gridlist[2], griditem[2], 1.39) S3Dwindow.label[3] = guiCreateLabel(523, 26, 133, 21, "", false, S3Dwindow.window[1]) S3Dwindow.edit[2] = guiCreateEdit(514, 62, 109, 19, "", false, S3Dwindow.window[1]) S3Dwindow.button[1] = guiCreateButton(519, 97, 104, 22, "", false, S3Dwindow.window[1]) S3Dwindow.label[4] = guiCreateLabel(186, 213, 128, 21, "", false, S3Dwindow.window[1]) S3Dwindow.combobox[1] = guiCreateComboBox(153, 56, 180, 100, "", false, S3Dwindow.window[1]) S3Dwindow.memo[1] = guiCreateMemo(354, 23, 20, 273, "", false, S3Dwindow.window[1]) guiMemoSetReadOnly(S3Dwindow.memo[1], true) S3Dwindow.button[2] = guiCreateButton(522, 132, 102, 22, "", false, S3Dwindow.window[1]) S3Dwindow.checkbox[2] = guiCreateCheckBox(152, 238, 123, 18, "", false, false, S3Dwindow.window[1]) S3Dwindow.button[3] = guiCreateButton(247, 164, 97, 24, "", false, S3Dwindow.window[1]) S3Dwindow.button[4] = guiCreateButton(141, 164, 97, 24, "", false, S3Dwindow.window[1]) S3Dwindow.label[5] = guiCreateLabel(450, 203, 237, 15, "", false, S3Dwindow.window[1]) S3Dwindow.combobox[2] = guiCreateComboBox(400, 225, 180, 80, "", false, S3Dwindow.window[1]) for i = 1, #lnagTextCombobox do