Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 23/03/19 in Posts

  1. A poor demonstration of custom face morphing
    3 points
  2. Olá queria saber,se tem alguma coisa que poderia que o player levantace a mao e o PERSONAGEM consegueria,andar com a mao levantada!
    1 point
  3. what letter do you need to send? It is possible that your Hosting is blocking outgoing fetchRemote, or you forgot to issue admin rights to the resource to call fetchRemote
    1 point
  4. 1 point
  5. function Verificar_Emprego_Atual ( ) for i, player in ipairs(getElementsByType("player")) do if not getElementData ( player, "Emprego" ) then setElementData ( player, "Emprego", "Mecanico" ) end end end setTimer ( Verificar_Emprego_Atual, 5000, 0 ) Não entendi a lógica do seu script. Mas removi as linhas e condições relacionadas com ACL e account do jogador.
    1 point
  6. Vc quer tirar a ACL pra funcionar pra todo mundo?
    1 point
  7. 1 point
  8. Tente: setPedAnimation( thePed, block, anim, 0, true, true, true ) setPedAnimation( thePed, block, anim, 0, true, true, false )
    1 point
  9. que grande con el ysy a y el neo pistea
    1 point
  10. Cara, isso é fácil resolver. Pelo menos da pra fazer igual aquela print que vc mandou como objetivo. Só fazer o retângulo roxo mais fino e mais em baixo. Se não é isso que vc quer, então ninguém sabe oq vc quer. local sx, sy = guiGetScreenSize() local x = sx/1366 local y = sy/768 function DNL_Hud() for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end dxDrawRectangle(x*835, y*40, x*521, y*34, tocolor(32, 32, 33), false) -- Background dxDrawRectangle(x*835, y*75, x*521, y*6, tocolor(150, 16, 148), false) -- linha roxa dxDrawLine(x*835, y*74, x*1356, y*74, tocolor(0, 0, 0), x*2, false) -- linha horizontal dxDrawLine(x*998, y*73, x*998, y*40, tocolor(0, 0, 0), x*1, false) -- linha vertical 1 dxDrawLine(x*1170, y*73, x*1170, y*40, tocolor(0, 0, 0), x*1, false) -- linha vertical 2 end addEventHandler ("onClientRender", root, DNL_Hud)
    1 point
  11. Este tópico deveria ter sido feito na seção de Programação em Lua. E poste o script para que possamos verificar os erros. Utilize o botão <> para colocar o código na formatação correta.
    1 point
  12. السلام عليكم شباب, كيف الحال؟ اليوم جايب لكم شرح جداول الميتا Note : ألشرح مختصر Note : جداول الميتا ليست للجداول فقط بل يمكن استعمالها مع متغيرات اخري نبدأ علي بركة الله ________________________ اولاً جداول الميتا هي جداول تحتوي علي احداث تتعرف مثل المفاتيح في الجدول Note : المفاتيح تعرف بأسم Meta Methods وكلها تبدأ ب __ وش تقدر تسوي بجداول الميتا؟ واحدة من خصائصها انك تقدر تخلي الشيء المطبق عليه الميتا تيبل عند استدعائه تستدعيه كأنه فنكشن و يسوي الشيء المربوط له لكنها تستعمل غالباً في عمل OOP يعني لو انت تبي تتعلم OOP انصحك بتعلم الميتا تيبل اولاً يعني الحين عندنا جدول بلمنظر ذا Table = {["Test"] = 4, ["Test2"] = 3} واجينا استدعينا قيمة مفتاح لكن المفتاح غير مووجود ونبي نسوي وظيفة اذا كان غير موجود نستعمل الحدث __newindex يعني مثل احداث الام تي اي العادية لكن الفرق انها للجداول مثل __index و __newindex ذي احداث للميتا تيبل الحين كيف نربط ميتا تيبل بتيبل عادي؟ نستعمل وظيفة setmetatable هذي الوظيفة تحط لجدول ميتا تيبل له مثال Syntax -- setmetatable(table TheTable, table metatable) TheTable : هو الجدول اللي تبي تربط له ميتا تيبل metatable : الميتا تيبل اللي تبي تربطها للجدول مثال : metatable = {} -- هذي الميتا تيبل حقتنا اللي ما تحتوي شيء حالياً local Table = setmetatable({}, metatable) وبكذا نكون ربطنا تيبل بميتا تيبل Note : setmetatable ترجع اول ارقمنت لها يعني مو لازم تسوي متغير للجدول مشان تركب له ميتا تيبل الحين الميتا تيبل وش نحط فيها؟ نحط فيها احداث وكيف نحط احداث؟ نحط المفاتيح ألمميزة مثال __index and __newindex هذول يتنفذو عند التعديل علي التيبل و كل واحد يتنفذ في لحظة معينة مثل __index Note : فيه احداث كثيرة بس هذول اسهلهم هذا يتنفذ يوم نروح نجيب مفتاح من جدول وما يلاقيه طيب كيف تربط فنكشن بحدث (مفتاح ) داخل الميتا تيبل؟ اول شيء نحط المفتاح و نحط قيمته الفنكشن المطلوب تنفيذه لما يتنفذ الحدث مثال : metatable = { __index = function () print("المفتاح غير موجود") end } MyTable = setmetatable({["DABL"] = 1}, metatable) -- كذا معنا جدول مربوط بلميتا تيبل print(tostring(MyTable["DABL"])) -- نستدعي قيمة المفتاح دابل print(tostring(MyTable["Marshmello"])) -- نستدعي قيمة المفتاح مارشميلو ( لو تبي تجرب امثلة جرب هنا http://www.lua.org/cgi-bin/demo مشان يكون الشرح اسهل) الحين اول استدعاء رح يطلع 1 لان قيمة المفتاح ["DABL"] في الجدول 1 لكن ثاني استدعاء راح يخلي الرسالة تطلع اللي هي print("المفتاح غير موجود") لاننا استدعينا مفتاح غير موجود اللي هو ["Marshmello"] مشان كذا الوظيفة المربوطة لايفينت __index اتنفذت طيب ندخل علي البارمترات كل ايفينت له بارمترات خاصة فيه مثل الام تي اي نفس الوضع مثلاً البارمتر حق __index عنده اثنين الاول هو الجدول والثاني هو المفتاح اللي حاولنا استدعاء و فشل , مثال metatable = { __index = function (TheTable, TheKey) print(tostring(TheTable).. " غير موجود في "..TheKey) end } MyTable = setmetatable({["DABL"] = 1}, metatable) -- كذا معنا جدول مربوط بلميتا تيبل print(tostring(MyTable["Marshmello"])) -- نستدعي قيمة المفتاح مارشميلو طبعاً قيمة المفتاح مارشميلو غير موجودة مشان كذا بينفذ الوظيفة اللي هي function (TheTable, TheKey) print(tostring(TheTable).. " غير موجود في "..TheKey) end المربوطة له لو لاحظت بتلاقي اني حاطت بارمترين في الفنكشن اللي هما TheTable, TheKey هذول اتعرفو من ال__index وفيه احداث ثانية لها بامترات خاصة بها وهذا كان كيفية استعمال الميتا تيبل مع شرح __index باقي الحداث تجدها هنا : http://lua-users.org/wiki/MetatableEvents ______________________ ونروح ل getmetatable هذا يجيب الميتا تيبل حقت جدول معين مثلاً Tab = setmetatable({}, {__index = function () print("Hello") end}) print(tostring(getmetatable(Tab))) --> table: 0x14bb510 مفتاح __tostring عند استعمال tostring علي الجدول تتنفذ الوظيفة المربوطة له مثال MyTable = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100} metatable = { __tostring = function (TheEditingTable) local Number = 0 for Key, Value in ipairs(MyTable) do Number = Number + Value end return Number end } setmetatable(MyTable, metatable) print(MyTable) --> 550 البارامترات المررة للفنكشن 1- التيبل اللي مربوط له الميتا تيبل . قبل ما تطبعه tostring تعمل للي بتطبعه print ملاحظة : الوظيفة مفتاح __eq يستعمل في التحقق من المساواة يعني اذا جدول يساوي جدول يرجع لك true طيب كيف تعمل؟ لازم الفنكشن المربوط بلمفتاح يكون يرجع نفس القيمة حقت المفتاح اللي بلجدول الاخر مثال : Table = {} -- ننشأ جدول فارغ Table2 = {} -- ننشأ جدول فارغ اخر MetaTable = { __eq = function () return "Lua Testing" end} -- جدول ميتا فيه المفتاح __eq MetaTable2 = { __eq = function () return "Lua Testing" end} -- ننشأ جدول ميتا اخر فيه نفس المفتاح setmetatable(Table, MetaTable) -- نحط لاول جدول اول ميتا تيبل setmetatable(Table2, MetaTable2) -- نحط لثاني جدول ثاني ميتا تيبل print(Table == Table2) -- نتحقق اذا كان الجدول الاول يساوي الجدول الثاني -- طبعا راج يرجع true --لان الفنكشن المربوط بلمفتاح رجع نفس القيمة -- اللي هي "Lua Testing" طيب وش يصير لو غيرنا القيم ألمرجعة و خلينها مختلفة عن بعض؟ بيرجع لك false لان الجدول لا يساوي الجدول الاخر مفتاح __len يتحكم في المعامل # بلنسبة للججدول يعني مثلاً لو سوينا كذا Table = {"Name", "Name2", "SomeGuy", "NoOne"} print(#Table) --> 4 هذا راح يرجع 4 لان اكبر اندكس في الجدول 4 Note : لو كنت حاط اندكس بالترتيب وحطيت اندكس اكبر من الاندكسات الأخرى بكثر ما يطلعها لك, كـ مثال لكلامي : t = { [1] = 1, [2] = 2, [3] = 3, [200] = 200 } print ( #t ) -- 3 شكرا خاص للاخ شاطح علي الاضافة ونكمل في شرحنا طيب لو نبيه يغير القيمة؟بدون ما نزيد عدد القيم نستعمل المفتاح __len والقيمة اللي ارجعها الفنكشن المربوط له بيطلعها مثال Table = {} -- ننشأ جدول فارغ MetaTable = { __len = function () return 90 end} -- جدول فيه المفتاح ويرجع رقم 90 setmetatable(Table, MetaTable) -- نربط الجدولين ببعض print(#Table) --> 90 هذا المفروض يرجع 0 لان الجدول فارغ لكنه ارجع 90 لان الفنكشن يرجع 90 مفتاح __metatable هذا يخبي الميتا تيبل حقت التيبل يوم نستعمل وظيفة getmetatable كيف يخبيها؟ يعني لما تجيب الميتا تيبل حقت تيبل يرجع لك قيمة ثانية من اختيارك القيمة ما راح تكون مرجعة من فنكشن يعني سوي متغير و حط القيمة لا تسوي فنكشن يرجع قيمة كذا يعني MetaTable = {__metatable = "Test"} كذا راح يرجع "Test' لكن لو سويت فنكشن بيرجع الفنكشن مثال : Table = {} -- جدول عادي MetaTable = {__metatable = "Haha you were tricked !"} setmetatable(Table, MetaTable) print(tostring(getmetatable(Table))) --> Haha you were tricked ! لو لاحظت اننا حاولنا نجيب الميتا تيبل بس ما جت لاننا مخلينه يرجع قيمة ثانية Mathematic Operators __unm __add __sub __mul __div __mod __pow __concat نبدأ ب __unm لو حولت الجدول لسالب بيرجع لك الرقم اللي انت مرجعه بلفنكشن المتصل به مثال : Tab = setmetatable({}, {__unm = function () return (5 * 5) end}) print(-Tab) --> 25 (5 × 5) __add يوم تجمع الجدول + كائن يحط الرقم المربوط للميتا تيبل بكل بساطة Note : لو الشيئين اللي بينجمعو جداول الجدول اللي علي اليسار بينفحص الاول ثم الايمن مثال : Tab = setmetatable({}, {__add = function () return 5 end}) print(100 + Tab) --> 5 __sub نفس الشيء حق __add لكن هذا يعمل للطرح " - " طبعا كل الوظائف التالية نفس الشيء ولكل واحدة علامة خاصة تعمل بها وهذول هما : __sub : - __mul : * __div : / __mod : % __pow : ^ __concat : .. ان شاء الله فهمتم الشرح اي استفسار ضع ردك
    1 point
  13. Hey guys, I used to be a mapper for a RolePlay server, but since I kinda quit MTA and started playing another game, I want to hand over my maps to the community. These maps were made for a RP server as I said, but they can actually be used for anything. I hope you enjoy them as much as we enjoyed them, back in the days. Click the name of the map to download it. CUSTOM INTERIORS San Andreas Correctional Facility - a huge prison island located south of LS, with an airstrip, several heli pads, docks, watchtowers, gym, basketball field, huge interior with a lot of cells, a cafeteria and a lot more! (pretty epic to RP in) Fire Department - a custom Fire Department Library - a custom library City Hall - a custom city hall Training Bureau - a custom training bureau made for the police department to train their cadets (classes, shooting range, ...) The building is located in LS and contains heli pads and a parking. Training Area - another Training Bureau kind of building, located in LV. Contains a heli pad and a parking. The interior is one big shooting range (mapped in RC interior, with buildings, wrecked cars, etc where you can take cover) where you can shoot at each other. SMALL ADJUSTMENTS Las Venturas Police Department - adds lockers, chairs, tables, security cameras etc. to the LVPD interior San Fierro Police Department - adds gates at the parking outside the building Roofs of Emergency Services - adds heli pads and fences on top of the hospital and Fire Department building in LS Doherty Gas Station - adds some things to make it look more realistic (located in SF) San Andreas International Airport - believe it or not, but you can actually go in the control tower at the airport in SF. So what I did is add some things so it actually looks like a control tower on the inside, and you can look outside and look at the airplanes leave the airport Yakuza - adds some things at Chinatown, LS Los Santos Police Department + Training Bureau + News Company - adds heli pads to the roofs of these three building and some other things I hope you guys enjoy the maps. Maybe I'll add screenshots in the future, but not right now, it's too much work. Follow me on Twitter and check me out on YouTube
    1 point
×
×
  • Create New...