Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 30/12/18 in Posts

  1. Dá pra deixar a arma invisível usando a função engineSetModelLODDistance. A AK-47 por exemplo: engineSetModelLODDistance ( 355, 0.001 ) Sobre esse script de usar armas personalizadas eu nunca fiz, então não tenho certeza se é assim que eles fazem.
    2 points
  2. Send message to Discord from MTA:SA STEP I. Make a new webhook on your Discord server STEP II. Change the variable to your webhook URL. STEP III. Start the resource, and test it with the /dcmessage <string> command, or use it with another script using the following export: exports.webhook:sendDiscordMessage("string") Download the script here.
    1 point
  3. MTA Lua Custom Data System What is this?: MTA's own functions create a high of cpu and high of usage ram. Therefore I keep the element data with the table system. How can I use?: sync_element.lua paste to the file script you want to use, Then add meta.xml: <script src='sync_element.lua' type='shared' /> Note: You can only return data from scripts where you use the library. Download Link: Download Here - GitHub
    1 point
  4. آخواتي وآحبابي وآصدقائي وكل من يحبني وآحبه هاذا الموضوع ارحب فيكم جميعا واتمنا لكم سنة مباركة عليكم وسنة الخير وطبعا لازم كل شخص يشيل الحزن والحقد لى في قلبه وينسه مع 2018 ونبدا 2019 بالحب والخير وكلام الجميل ويكون من قلب وآتمنا لكم الخير مثل ما تتمنونه لى وشكرا لكم ------------------------------------------------------------------------------------------------------------------------------------- - غدا ان شاءالله ما عندي شيء آسويه ف قمت حملت اللعبة اليوم ع شن بكرا جميعنا نخش لسيرفوري ونسوي حفلات - وان شاءالله لى حاب يخش لـ سيرفر ما رح يندم - طبعا لى كل ما لا يعرف سيرفوري فخامة الهجولة والحرب يوم الأثنين : ساعة 16:00 ، بتوقيت السعودية ------------------------------------------------------------------------------------------------------------------------------------- - وسسسسسسسسسسسسلام
    1 point
  5. Hello, is there a way to copy and drag and place multiple objects at a time? , i need to create aircraft carriers but it's hard to put interior in the perfect place, the annoying part is when you tilt the hull, and have to match the interior perfectly, sorry for my bad english.
    1 point
  6. Hello, so i am making a MTA Server on my own server box we have a working roleplay gamemode but we cant connect mysql with database [18-12-30 21:12:03] MODULE: Unable to load x64/modules/mta_mysql.dll (/home/gamecp_agent/OGP_User_Files/6/x64/modules/mta_mysql.dll: invalid ELF header) [18-12-30 21:12:03] loadmodule: Module failed to load [18-12-30 21:12:03] loadmodule: Couldn't find module file
    1 point
  7. Oi, você pode usar: EngineLoadTXD EngineLoadDFF EngineLoadCOL EngineReplaceModel
    1 point
  8. Sure i'll join, sent you a msg on discord
    1 point
  9. Simples assim? Então no caso do progressBar e só usar o guiProgressBarSetProgress dentro do onClientRender, certo? Nossa cara, valeu mesmo. Pelo jeito, das próximas vezes vou te que meter mais a cara na WIKI kkk
    1 point
  10. Também optei por trabalhar com GUI, só algumas coisas que faço em DX. Enfim, vamos ao tópico. Primeiro, jamais crie um evento de renderização em painéis GUI, eles realmente irão recriar até você desligar. Para atualizar as informações, você irá sim precisar de um evento de renderização, porém apenas para alterar os textos, usando guiSetText. Assim como o progressBar e outros elementos que precisam serem atualizados de acordo com a velocidade do carro, que no caso é o que seu script faz. Então, dentro do evento onClientRender, você deverá atualizar as informações. Exemplo: function updateInfo ( ) veh = getPedOccupiedVehicle ( getLocalPlayer ( ) ); speedx, speedy, speedz = getElementVelocity ( veh ); actualspeed = ( speedx ^ 2 + speedy ^ 2 + speedz ^ 2 ) ^ ( 0.5 ); mps = math.floor ( actualspeed * 50 ); kmh = math.floor ( actualspeed * 180 ); mph = math.floor ( actualspeed * 111.847 ); curGear = getVehicleCurrentGear ( veh ); guiSetText ( kmhlabel, kmh .. " Km/h" ); end addEventHandler ( "onClientRender", root, updateInfo ) Lembre-se de ativar o evento de renderização apenas quando o jogador entrar no veículo, igual você fez no código.
    1 point
  11. @Sorata_Kanda you can't pass any sort of functions or metatables unfortunately. However as IIYAMA said you can use loadstring to inject code into your scripts. I wrote this a while back: function load() return [[ function import(name) if type(name) ~= 'string' then error("bad arg #1 to 'import' (string expected)", 3) end local content = exports.import:getFileContents(name) if not content then error("can't import '"..name.."' (doesn't exist)", 2) end return loadstring('return function() '..content..' end')()() end ]] end function getFileContents(name) if not name then return end local path = 'exports/'..name..'.lua' if fileExists(path) then local f = fileOpen(path) local content = f:read(f.size) f:close() return content end return false end If you put this in a resource called "import" then you'd use it like this: loadstring(import.exports:load())() local utils = import('utils') iprint(utils) This loads files directly into a variable in your script. Ofcourse you can easily modify this to load files from different resources. Also in said files you will have to return the class or function or whatever you need to return just like real modules.
    1 point
  12. Sim, mas infelizmente não é possível setar o alpha das armas dos jogadores. O comentado pelo @asrzk realmente se faz necessário para esse caso.
    1 point
  13. @Sorata_Kanda The value [function] is a part of a class. Functions can't leave their resource environment. So it is impossible to export them while they are loaded. But you can send them over as unloaded code: local exportedFunctionValue = "Airplane = {} function Airplane:fly () end" loadstring(exportedFunctionValue)()
    1 point
  14. Please download and run MTADiag and follow the instructions. Press 'n' when asked. Post any Pastebin URL MTADiag gives you
    1 point
  15. 1 point
  16. طيب بعرف اكواد الميتا واحيانا اكتبها عن غايب جايين تتمسخرو.
    1 point
  17. بعرف الاكواد وركبهم بس انت عطيني الاكواد جاهزه تقلولي ويكي وما ويكي انا شو يفهمني بل ويكي الان تعلقلي على ويكي انت عطيني وبس ولله محتاج
    1 point
  18. هذا القسم لطلب المسابقة و ليس لطلب المودات و غيرها + م اتوقع في مود منشور كذا يمكن انت شفته بسيرفر ثاني و تبيه مثله ف لذالك انصحك تكلم مبرمج يسويه لك بمقابل او بدون مقابل هو و كرمه @N3xT @#DesTroyeR مو ذا مود البكجات حق اساطير؟
    0 points
×
×
  • Create New...