Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 21/05/21 in all areas

  1. Thread's been moved into the Portuguese scripting section for you
    2 points
  2. Thread's been moved into the Portuguese scripting section
    1 point
  3. Mixing upgrade parts from different cars will obviously produce wrong results or crash the game, as they aren't made for eachother. You should already be able to do what you have in mind (with replacing upgrade parts / loading custom upgrade parts made for that vehicle which you're applying them to). Often it's even neccesary, as GTA vehicle mods sites offer many models that come with multiple smaller DFF files, which are the upgrade parts designed for their mod, so you'll need to 'port' them to MTA by using a script that replaces it all. You can better understand this stuff after inspecting this example resource that i uploaded: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18483 Just look at the code and files. It's a Jester mod, that also loads various upgrade parts, such as rear and front bumper. It's a piece of cake, and you don't need to be messing about with anything like carmods.dat Anyways, if you really want to "put Jester front bumper on a Sultan" (no matter how visually crippled that will look), in theory you would need to export the bumper part of Jester (e.g rbmp_c_j.dff, using Alci IMG tool) and load it onto the Jester as its own front bumper (ID 1169, fbmp_a_s.dff) simply by replacing the Sultan bumper model with the desired bumper upgrade part, in the same way as the above example resource does it. If you want to understand the logic better: Each vehicle in GTA SA supports only its own upgrade parts (specific IDs, like for bumper variants) so you can decide the model used for those IDs and applying any custom model to it (like one modelled by yourself, so looking as entirely different bumper). You cannot apply the upgrade ID from another vehicle, to a vehicle for which that ID is not (take a look at Wiki: Vehicle Upgrade IDs or alternatively use GTA SA Prineside ID lookup) Just for reference, script from that resource separately: function replaceModel() txd = engineLoadTXD("559.txd") engineImportTXD(txd, 559) dff = engineLoadDFF("559.dff") engineReplaceModel(dff, 559) end addEventHandler("onClientResourceStart", resourceRoot, replaceModel) setTimer(function() -- rear bumper upgrades dff = engineLoadDFF("tuning/rbmp_a_j.dff") engineReplaceModel(dff, 1159) dff = engineLoadDFF("tuning/rbmp_c_j.dff") engineReplaceModel(dff, 1161) -- front bumper upgrades dff = engineLoadDFF("tuning/fbmp_a_j.dff") engineReplaceModel(dff, 1160) dff = engineLoadDFF("tuning/fbmp_c_j.dff") engineReplaceModel(dff, 1173) end, 5000, 1) After replacing upgrade parts with your desired custom model, all you need to do is use addVehicleUpgrade (with the ID of where you applied the mod to) as @Tekken mentioned.
    1 point
  4. Olá. Você postou o tópico na seção incorreta. Use esta seção para tópicos em Português, relacionados à dúvidas de código. A propósito: o tópico já foi movido para a seção correta. Sobre a sua dúvida, use a função setObjectBreakable. Alterar a vida do objeto a cada 100ms é algo mal otimizado e não funciona. Lembrando que a função citada é client-side, você precisa de usar triggerClientEvent, ou crie o objeto client-side.
    1 point
  5. ?. I can share an example of how to do this using the Imgur API. local file = fileOpen ( "image.png", true ) local data = fileRead ( file, fileGetSize ( file ) ) data = base64Encode ( data ) fileClose ( file ) local sendOptions = { method = "POST", headers = { [ "Authorization" ] = "Client-ID <YOUR_CLIENT_ID>", -- replace <YOUR_CLIENT_ID> with your client ID [ "Content-Type" ] = "multipart/form-data" }, formFields = { [ "image" ] = data, [ "type" ] = "base64" } } fetchRemote ( "https://api.imgur.com/3/upload", sendOptions, function ( data, info ) iprint ( data, info ) end ) The image file (image.png) should be located in the resource folder.
    1 point
  6. The problem is that he as a server owner wants to load a custom carmods.dat file so this way will not work.
    1 point
  7. Thank you so much, low bow.
    1 point
  8. 1 point
  9. Woop woop, look who has accumulated 1,000 posts.
    1 point
  10. No, you have to wait.
    1 point
  11. (I've moved your topic to a proper section)
    1 point
  12. have you tried reinstalling GTA:SA? (verify integrity on steam)
    1 point
  13. It really depends on your internet connection speed and the server speed, you can ask the server owners if they do have the same issue.
    1 point
  14. you're using a modded audio pack or you've modified the game sounds via MTA, and that'll most likely crash your game, it's highly recommended to use a complete vanilla version of the game. checkout this page on how to verify integrity of game files: https://support.steampowered.com/kb_article.php?ref=2037-QEUH-3335
    1 point
  15. you should try each option and see what works then check "Don't show again".
    1 point
  16. Have you overclocked your GPU? if yes, then try to lower the clocking until the effect completely disappears.
    1 point
  17. are you trying to do a "for" loop? checkout this page: https://www.tutorialspoint.com/lua/lua_for_loop.htm
    1 point
  18. in outputChatBox() you have the visibleTo argument, you should set that to who it should send the chatbox message, you can have two lines for each output and a trigger function to send the staffs a copy of it.
    1 point
  19. Tente incluir uma screenshot da tela de crash, isso pode ajudar a identificar
    1 point
  20. Hello Hazardinho, since I have got experience working with rotations I recommend you to use the element's matrix instead, using getElementMatrix. If you look at the wiki page you can see the examples. Explanation: The element matrix stores the rotation of the ped in a coordinate system axis. If you use setElementRotation then the euler angles are automatically converted into this matrix so this matrix is more powerful and less ambiguous than the angles. Problem of euler angles: euler angles are periodic in 360° as well as suffering from gimbal lock in MTA:SA (due to poor implementation, not wanting to going into the details). If you want to use euler angles then you probably need to normalize the angles. local function normalize_euler(angle) while (angle >= 360) do angle = angle - 360; end while (angle < 0) do angle = angle + 360; end return angle; end Then if you do the following: local rotX, rotY, rotZ = getElementRotation(ped); rotX = normalize_euler(rotX); rotY = normalize_euler(rotY); rotZ = normalize_euler(rotZ); ... you are guarranteed to get the angle in the value range including 0 to just below 360. So if you are clueless on where to start, try using the getPositionFromElementOffset Function from the wiki page using the offset x=0, y=-1, z=-0.8. - Martin
    1 point
×
×
  • Create New...