Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/07/19 in Posts

  1. طبيعي جداً يا غالي , انت حاط 2 قريد ليست في كود مبرمج على دي اكس واحده يعني طبيعة الكود كذا هو مصمم على هذا الشيء , كله متغيرات والمتغير ياخذ آخر قيمه في ذا الكود هي القريد لست الأخيره اللي انت مسويها dxGrid وآخر قيمه لمتغيرات جرب تغير اسم القريد لست Lua سوي سكربت جديد , بعدين حط الكود ذا بملف بعدين جرب تسوي GridList1 = { items = {} }; function GridList1:Create(...... ...يعني عدل ع الفنكشنز اللي تسوي القريد لست واللي تجيب الاختيار من القريد لست واللي تحط عمود ووو الخ عدل إسم الفنكشنز مثل فوق في كل الملف بإسم المتغير اللي تبغاه للقريد لست الثانيه dxGrid أو انسخ الكود حق الدي اكس و انقله بملف ثاني و عن طريق النوت باد استبدل كلمة بالتوفيق
    2 points
  2. بسم الله الرحمن الرحيم Useful Arab functions - وظآيف مفيده :: فكرة الموضوع :: الموضوع فكرته عن مشاركه وظايف مفيده مع المبرمجين العرب ، زي ماتعرف ام تي آي غير كاملة بكل الإكوآد ، الكمال لله سبحانه لذالك هناك قصور ببعض الوظايف ، الي تجبرك انك تروح تبرمج وظيفة جديده علشان تفيدك بالبرمجه ومن خلال هالموضوع نود انك تشآركنا بالوظيفه الي برمجتها ، علشان تفيد نفسك وتفيد غيرك بالاستفادة من الوظيفه :: طموحنا :: نطمح أن تكون هناك مكتبه عآمه مبرمجه باأيدي عربيه تجمع اكواد مبرمجه لاختصار الوقت وتقديم وظايف مفيده لـ استخدامك ولاستخدام آي مبرمج عربي :: شروط آضافتك للوظيفه :: مافيه شروط محدده لكن هو شرط واحد ان الوظيفه تكون من برمجتك يعني ماهو تروح تأخذ نسخ لـ اي كود وتقول انا مبرمجه ، هي فالاخير ذمه و آمانه :: طريقة أضافة الوظيفة :: تحط هنا اسم الوظيفة صيغة الوظيفه تكتب هنا صيغة الوظيفه كود الوظيفه تكتب هنا كود الوظيفه مثال الوظيفه تكتب هنا مثال للوظيفه * ولابد تضع كودك هنا بالرابط ، وتحط الرابط مع مشآركتك https://wiki.multitheftauto.com/wiki/Useful_Functions https://wiki.multitheftauto.com/wiki/Te ... _Functions * فـهـرس الوظـائف المفيدة * [ Useful Arab's Functions ] | فهرس الوظائف المفيدة
    1 point
  3. السلام عليكم , بعد عمل جاد لمده شهر تم الأنتهاء من اصدار 0 . 0 . 3 لسيرفر الأتحاد العربي لحرب العصابات الأصدار به حصريات كتير و لما اقول حصريات اقصد حصريات و افكار جديده لسيرفرات الحرب لمحه عن المودات و الباقي تقدر تستكشفه بنفسك USERPANEL FF F3 / PLAYER VEHICLES تم تركيب خواص جديده لاف 3 تستطيع الان اعطاء سياراتك لأصدقائك او المزايده علي سياره في متجر السيرفر SUPPORTCHAT GROUPS SYSTEM نظام الجروبات تم تطويره باشياء كتير و اضافه افكار حصريه اكتر تغير نظام الأعضاء تغير نظام البنك و استبداله بنظام المخزن مخزن الجروب يكون مكان الجروب يقدر يخزن فيه كل الي يباه من اسلحه فلوس اشياء اخري نظام المقرات الجديد بعد شراءك مقر تستطيع تجديد مقرك و تغير بيته من جوا + اضافه سيارات جديده للمقر + فتح خواص اخري للمقر شراء سيارات للمقر محل الأسلحه يستطيع اصحاب الجروبات ان يدخلو في مزاد اسبوعي لشراء محلات الأسلحه عند شراءك لمحل الأسلحه يجيك نصف المكسب الي يجي للمحل نظام الصناعه نظام تحديات اللاعبين نظام تحديات الجروبات طبعا تقدر تتحدي لاعب او جروب اخر مو فقط حرب تقدر تتحداه في شوتر ديبربي سباق سيتم اضافه انواع تحديات اخري + يوجد نظام لفلات الأسلحه حاليا النظام يعمل علي سلاحين فقط الأم فور و الاي كي 47 وش هو النظام ذا ؟ لما تقتل احمد بالسلاح , عند وصولك لعدد محدد من القتل يترقي السلاح للفل اعلي اللفلات جولد - برونز - الماسي كل لفل شكل سلاحه يتغير + يبان شكل السلاح الجديد عند الكل مو عندك فقط يوجد مهمات جديده ايضا مثل مهمه سباق الموت حروب الهيدرا حرب الأعلام ( حرب بين تيمين ) كل تيم له مقر و انت تحاول تسرق علم المقر الاخر و توصله لمقرك و الوظائف ايضا يوجد فيها تجديد
    1 point
  4. كالعادة يا عصام مبدع
    1 point
  5. هههههههههه انا عدلت الموضوع سبع مرات مش عارف انسقة خلى كدة وخلاص
    1 point
  6. م قصَرتم في سيَرفر من ناحيَة شغلكم يفك النفسَ ، لكن لو ركزت على انَه تخلي البَوست بطريقة افضل بحيَث انك تطلع السكربَتات وغيرها بشكلَ منظم بيطلع النظَام حلو.. عمَوما موفق.
    1 point
  7. Hello, just wanted to give a simple gift to many people who keep having a problem with the LS CityHall flag to either replace it, or delete it from the Map and make a new LS CityHall for MTA. or change the flag texture as the Map Editor doesn't detect it. the same as many other objects. so i am giving you a way to fix this problem. i can make a tutorial if you guys want on how to remove other undetected objects. Object name : LAcityhallTrans_LAn Object model : 4003 HOW TO : 1- go to the map file that has the CityHall Map usually at : C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources\<MapName>\ 2- Enter the <MapName>.map file there with an editor like notepad ( there is only one file has an extension of *.map) 3- in the end of the file add this line : <removeWorldObject id="removeWorldObject (LAcityhallTrans_LAn) (1)" radius="96.110512" interior="0" model="4003" lodModel="4024" posX="1484.36389" posY="-1749.83789" posZ="30.61433" rotX="0" rotY="0" rotZ="0"></removeWorldObject> 4- if the map is already open in your local server, then please reopen the map <MapName> Enjoy
    1 point
  8. Or لاحظت بالكود ان متغير اختيار الجدول محطوط في اللوب يعني دايما يكنسل الاختيار و يخليه لواحد فقط فممكن مع شويه تحققات و استعمل للجداول نظبط وضعنا dxGrid = { items = {} }; CursorOn = { } local NATIVE_RESOLUTION = { nil } -- put your screen resolution here to fit the gridlists to all resolutions (ex: { 1366, 768 } ) if ( table.maxn ( NATIVE_RESOLUTION ) == 2 ) then FIT_MODE = true RES = { guiGetScreenSize() }; X,Y = RES[1] / NATIVE_RESOLUTION[1], RES[2] / NATIVE_RESOLUTION[2]; SCALE = ( 1 / NATIVE_RESOLUTION[1] ) * RES[1]; end --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Core - functions function dxGrid:Create ( x, y, width, height, postGUI ) -- table dxGrid:Create ( int x, int y, int width, int height[, bool postGUI ] ) if __checkParams ( "Create", "nnnn", x, y, width, height ) then local data = { x = FIT_MODE and ( x * X ) or x; -- X position y = FIT_MODE and ( y * Y ) or y; -- Y position w = FIT_MODE and ( width * X ) or width; -- Width h = FIT_MODE and ( height * Y ) or height; -- Height pg = postGUI or false; -- PostGUI i = {}; -- Items mi = __calcMaxItems ( FIT_MODE and ( height * Y ) or height ); -- Max items s = 1; -- Scroll Level r = -1; -- Row count se = -1; -- Selected item mo = nil; -- Mouse-on item vis = true -- Visible }; setmetatable ( data, { __index = dxGrid } ); table.insert ( dxGrid.items, data ); return data; end end function dxGrid:Destroy () -- bool dxGrid:Destroy () for k, v in pairs ( dxGrid.items ) do if v == self then dxGrid.items[k] = nil; return true; end end return false; end function dxGrid:SetVisible ( visible ) -- bool Gridlist:SetVisible ( bool state ) if __checkParams ( "SetVisible", "b", visible ) then self.vis = visible return true else return false end end function dxGrid:IsVisible ( ) -- bool Gridlist:IsVisible() return self.vis end function dxGrid:AddColumn ( title, width ) -- int Gridlist:AddColumn ( string title, int width ) if __checkParams ( "AddColumn", "sn", title, width ) then local data = { info = { title = title, width = FIT_MODE and ( width * X ) or width } }; table.insert ( self.i, data ); return #self.i; end end function dxGrid:RemoveColumn ( columnIndex ) -- bool Gridlist:RemoveColumn ( int columnIndex ) if __checkParams ( "RemoveColumn", "n", columnIndex ) then self.i[columnIndex] = nil; -- Recalculate the highest item count local highest = -1; for _, v in ipairs ( self.i ) do if #v > highest then highest = ( #v - 1 ); end end self.r = highest; -- Recalculate the scroll level (if necessary) if ( ( ( self.s + self.mi ) - 2 ) == self.r ) then self.s = ( self.r - self.mi ) + 1; end return true end return false end function dxGrid:GetColumnCount () -- int Gridlist:GetColumnCount() return #self.i end function dxGrid:AddItem ( columnIndex, text, data, r, g, b ) -- int Gridlist:AddItem ( int columnIndex, string title[, mixed data, int r, int g, int b ] ) if __checkParams ( "AddItem", "ns", columnIndex, text ) then if self.i[columnIndex] then local tColor = __checkRGB ( r, g, b ) and { r, g, b } or { 255, 255, 255 }; table.insert ( self.i[columnIndex], { id = #self.i[columnIndex] + 1, text = tostring( text ), data = data, color = tColor } ); if #self.i[columnIndex] > self.r then self.r = #self.i[columnIndex]; end return #self.i[columnIndex]; end return false; end end function dxGrid:RemoveItem ( column, itemID ) -- bool Gridlist:RemoveItem ( int columnIndex, int itemIndex ) if __checkParams ( "RemoveItem", "nn", column, itemID ) then if self.i[column] and self.i[column][itemID] then -- Recalculate the highest item count if self.r == #self.i[column] then local highest = -1; for _, v in ipairs ( self.i ) do if #v > highest then highest = ( #v - 1 ); end end self.r = highest; end -- Recalculate the scroll level (if necessary) if ( ( ( self.s + self.mi ) - 2 ) == self.r ) then self.s = ( self.r - self.mi ) + 1; end -- Reset the selected item if necessary² if itemID == self.se then local newItem = self.se - 1 if newItem <= self.r then self.se = math.max ( 0, newItem ); else self.se = -1 end end table.remove ( self.i[column], itemID ); return true; end return false end end function dxGrid:GetItemCount ( columnID ) -- int Gridlist:GetItemCount ( int columnIndex ) if __checkParams ( "GetItemCount", "n", columnID ) then if self.i[columnID] then return #self.i[columnID] end return false end end function dxGrid:Clear () -- bool Gridlist:Clear() for k, v in ipairs ( self.i ) do self.i[k] = { info = v.info } end self.r = -1 self.se = nil -- Recalculate the scroll level self.s = 1; return true end function dxGrid:GetSelectedItem ( ) -- int Gridlist:GetSelectedItem () return self.se; end function dxGrid:SetSelectedItem ( itemID ) -- bool Gridlist:SetSelectedItem ( int itemIndex ) if __checkParams ( "SetSelectedItem", "n", itemID ) then if itemID <= self.r then self.se = itemID; return self.se == itemID; end return false; end end function dxGrid:GetItemDetails ( column, itemID ) -- string, mixed Gridlist:GetItemDetails ( int columnIndex, int itemIndex ) if __checkParams ( "GetItemDetails", "nn", columnID, itemID ) then if self.i[column] then if self.i[column][itemID] then return self.i[column][itemID].text, self.i[column][itemID].data end end return false end end --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Core - render/move addEventHandler ( "onClientRender", root, function ( ) -- Is there any gridlist to render? if #dxGrid.items > 0 then -- Loop through all grid lists for index, data in ipairs ( dxGrid.items ) do -- Is the gridlist visible? if data.vis then -- Draw the 'gridlist' itself dxDrawRectangle ( data.x, data.y, data.w, data.h, tocolor ( 0, 0, 0, 200 ), data.pg ); -- Draw the column bar dxDrawRectangle ( data.x, data.y, data.w, 30 % data.h, tocolor ( 0, 0, 0, 220 ), data.pg ); -- Set cursorOn variable to the current gridlist, if it's selected if __isMouseInPosition ( data.x, data.y, data.w, data.h ) then CursorOn = { true , index } else if CursorOn[1] and CursorOn[2] == gridlist then CursorOn = {} end end -- Check if there's any selected item local seeFrom = data.s; local seeTo = ( data.s + data.mi ) - 1; if data.se and data.se <= data.r and data.se >= seeFrom and data.se <= seeTo then local index = data.se - ( data.s - 1 ); local y2 = data.y + ( ( index - 1 ) * 25 ); -- Draw a rectangle to make it looks like selected dxDrawRectangle ( data.x, ( 30 % data.h ) + y2, data.w, 20, tocolor ( 100, 100, 100, 100 ), data.pg ); end -- Is there any column? if #data.i > 0 then local cWidth = 0 -- Loop through all columns for cIndex, cData in ipairs ( data.i ) do -- we'll go beyond the gridlist width with this column ? if ( ( cWidth + cData.info.width ) <= data.w ) then local x = data.x + cWidth; -- Draw the column title dxDrawText ( cData.info.title, x, data.y, cData.info.width + x, ( 30 % data.h ) + data.y, tocolor ( 255, 255, 255 ), FIT_MODE and ( 1 * SCALE ) or 1, "default-bold", "center", "center", true, true, data.pg, false, true ); -- Reset the selected item cData.info.selected = -1; -- Is there any item ? if #cData > 0 then local seeFrom = data.s; local seeTo = ( data.s + data.mi ) - 1; -- Loop the items for iIndex = seeFrom, seeTo do -- There's a row with this index in the current column? if cData[iIndex] then local index = iIndex - ( data.s - 1 ); local y = data.y + ( index * 25 ); local y2 = data.y + ( ( index - 1 ) * 25 ); -- Check if cursor is on item position if __isMouseInPosition ( data.x, ( 30 % data.h ) + y2, data.w, 20 ) then -- Define the mouse-on variable data.mo = iIndex; end -- Draw the item text dxDrawText ( cData[iIndex]["text"], x, y, cData.info.width + x, ( 30 % data.h ) + y, tocolor ( unpack ( cData[iIndex]["color"] ) ), FIT_MODE and ( 1 * SCALE ) or 1, "default-bold", "center", "center", true, true, data.pg, false, true ); end end end -- Increase cWidth variable (to draw the columns correctly) cWidth = cWidth + cData.info.width; end end end end end end end , true, "low-5") -- addEventHandler ( "onClientKey", root, function ( button, press ) -- Is cursor showing? if isCursorShowing () then -- Is there any gridlist? if #dxGrid.items > 0 then -- Is there any selected gridlist? if CursorOn and CursorOn [ 1 ] then -- We pressed the scroll? local cursorOn = CursorOn [ 2 ] if press and #button > 6 then -- Does the gridlist requires scroll? if dxGrid.items[cursorOn].r > dxGrid.items[cursorOn].mi then -- Define some variables local index = cursorOn; local currentValue = dxGrid.items[index].s; local newValue = math.max ( 1, button == "mouse_wheel_down" and currentValue + 2 or currentValue -1 ); -- Check if we have spent the row's limit with the new value if ( ( newValue + dxGrid.items[index].mi ) > dxGrid.items[index].r ) then newValue = ( dxGrid.items[index].r - dxGrid.items[index].mi ) + 1; end -- Set the new scroll level dxGrid.items[index].s = newValue; end elseif press and button == "mouse1" and dxGrid.items[cursorOn].mo then dxGrid.items[cursorOn].se = dxGrid.items[cursorOn].mo; end end end end end ) --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Useful function __calcMaxItems ( height ) for i = 0, 9999 do if ( ( ( i + 1 ) * 25 ) >= math.floor ( height ) ) then return ( ( ( i + 1 ) * 25 ) > math.floor ( height ) and ( i - 1 ) or i ); end end return false; end function __checkParams ( methodName, pattern, ... ) local cTable = { ["string"] = "s"; ["number"] = "n"; ["boolean"] = "b"; ["s"] = "string"; ["n"] = "number"; ["b"] = "boolean" }; if #pattern > table.maxn ( { ... } ) then local index = table.maxn ( { ... } ) == 0 and 1 or table.maxn ( { ... } ) + 1 return false, error ( "Bad Argument @ '"..methodName.."' [Expected "..cTable[ pattern:sub ( index, index ) ].." at argument "..index..", got none]" ) end for k, v in pairs ( { ... } ) do if cTable[ type ( v ) ] ~= pattern:sub ( k, k ) then return false, error ( "Bad Argument @ '"..methodName.."' [Expected "..cTable[ pattern:sub ( k, k ) ].." at argument "..k..", got "..( type ( v ) or "none" ).."]" ) end end return true; end function __checkRGB ( r, g, b ) -- Check if all parameters were passed if ( not r ) or ( not g ) or ( not b ) then return false; end for _, v in ipairs ( { r, g, b } ) do if ( type ( v ) ~= "number" ) or ( v < 0 ) or ( v > 255 ) then return false; end end return true; end function __isMouseInPosition ( x, y, w, h ) if not isCursorShowing() then return false end local res = { guiGetScreenSize() }; local cpos = { getCursorPosition() }; local fpos = { res[1] * cpos[1], res[2] * cpos[2] }; return ( fpos[1] >= x and fpos[1] <= x + w ) and ( fpos[2] >= y and fpos[2] <= y + h ) end  جرب و قلي
    1 point
  9. Isso só pode ser resolvido por meio de funções criadas por você mesmo pra detectar as teclas que o jogador pressionar, tanto para uma combinação especifica ou se ele bindar uma tecla com um conteúdo que você não deseja. Pra isso você pode tentar usar: IsKeyBound OnClientKey Neste exemplo abaixo se o jogador pressionar uma combinação de tecla ele sera kickado do servidor, você pode apenas congelar ele por alguns segundos se preferir. Exemplo: Client: function keyCombination (button, state) if button == "w" then if state then -- Se o jogador aperta o botão W, então: setElementData (localPlayer, "button.w", true) -- Seta essa data nele. else -- Se o jogador solta o botão W, então: setElementData (localPlayer, "button.w", false) -- Remove essa data dele. end elseif button == "space" then -- Mesma coisa com os demais botões da combinação. if state then setElementData (localPlayer, "button.space", true) else setElementData (localPlayer, "button.space", false) end elseif button == "mouse1" then if state then setElementData (localPlayer, "button.mouse1", true) else setElementData (localPlayer, "button.mouse1", false) end elseif button == "mouse2" then if state then setElementData (localPlayer, "button.mouse2", true) else setElementData (localPlayer, "button.mouse2", false) end end if getElementData (localPlayer, "button.w") and getElementData (localPlayer, "button.space") and getElementData (localPlayer, "button.mouse1") and getElementData (localPlayer, "button.mouse2") then -- Se todos os 3 botões estiverem apertados, então: triggerServerEvent ("keyComboKick", localPlayer) -- Executa a função do server.Lua que irá kickar o localPlayer. end end addEventHandler ("onClientKey", getRootElement(), keyCombination) Server: addEventHandler ("onPlayerLogout", getRootElement(), function (prev, curr) setElementData (source, "bindPermission", false) end) function comboKick () outputChatBox (getPlayerName (client):gsub("#%x%x%x%x%x%x","").." foi kikado por combinação proibida de teclas: (W + Space + Mouse1 + Mouse2)", root, 255, 0, 0, true) kickPlayer (client, "Uso de combinação proibida de teclas: W + Space + Mouse1 + Mouse2") end addEvent ("keyComboKick", true) addEventHandler ("keyComboKick", getRootElement(), comboKick) Author: @Lord Henry
    1 point
  10. وعليكم السلام ورحمة الله وبركاتة بحكم انه المود معه وعلى ما يبدو ان مستر كريم ناشره ايضاً open source وهو فما اظن انو في حاجه لطلب الاذن من المالك تقبل مروري أخـوك #مستر_بق
    1 point
  11. I'll help you add me to Skype or Discord sir.
    1 point
  12. ---------------------- يرجى غلق الموضوع
    1 point
  13. Você pode desativar o uso de macro pelo mtaserver.conf, em: <enablesd></enablesd> SD #31 e SD #32 E a detecção pode ser feita com este evento: onPlayerACInfo
    1 point
  14. O MTA tem um anti-cheat nativo. Não precisa de funções. Você pode configurar quais modificações ele vai detectar pelo seu mtaserver.conf
    1 point
  15. وعليكم السلام ورحمة الله print ( tostring ( getResourceName ( sourceResource ) ) )
    1 point
  16. Conversions like this does take a good bit of time to finish, and so I would maybe consider including a reward of sorts. Anyway, please shoot me a PM with some screenshots and description of what you're dealing with. I might be interested.
    1 point
  17. Nvm, thisdp gave me an easier solution
    1 point
×
×
  • Create New...