Jump to content

Shady1

Members
  • Posts

    864
  • Joined

  • Last visited

  • Days Won

    57

Everything posted by Shady1

  1. Using these parameters totally depends on your needs and game scripts. If you do not need this additional information, you can omit or pass these parameters. I added these parameters to trigger onVehicleCollision hitElement: Collision object. In this case, it will be the object or element the vehicle collides with. force: The force of collision. This is a numeric value representing the severity of the collision. bodyPart: The part of the body where the collision occurred. For example, vehicle hood, windshield, rear bumper. collisionX, collisionY, collisionZ: Coordinates of the point where the collision occurred. normalX, normalY, normalZ: The normal of the collision surface. This is a vector that indicates which direction the collision surface is in. material1, material2: Strings representing the material types of the colliding objects.
  2. local marker = -- The marker element you want to prevent the player from hitting function onVehicleCollision(hitElement, force, bodyPart, collisionX, collisionY, collisionZ, normalX, normalY, normalZ, material1, material2) if getElementType(hitElement) == "vehicle" then -- Check if the player is in a vehicle local player = getVehicleOccupant(hitElement) if player and getElementType(player) == "player" then -- Player is in a vehicle and colliding with the marker if isElementWithinMarker(hitElement, marker) then -- Do something here (e.g., cancel the collision, display a message, etc.) cancelEvent() end end end end addEventHandler("onVehicleCollision", root, onVehicleCollision)
  3. local marker = -- The marker element you want to prevent the player from hitting function onVehicleCollision(hitElement) if hitElement == localPlayer and getElementType(hitElement) == "vehicle" then -- Check if the player is in a vehicle if isElementWithinMarker(hitElement, marker) then -- Player is in a vehicle and colliding with the marker -- Do something here (e.g., display a message, play a sound, etc.) -- To prevent the collision, you can remove the vehicle's speed local vehicle = getPedOccupiedVehicle(hitElement) setElementVelocity(vehicle, 0, 0, 0) end end end addEventHandler("onClientVehicleCollision", root, onVehicleCollision) https://wiki.multitheftauto.com/wiki/OnClientVehicleCollision
  4. timeBar = 100 progBar = guiCreateProgressBar(321, 533, 159, 34, false) setTimer(function() timeBar = timeBar - 6.66666666667 lastTime = timeBar guiProgressBarSetProgress(progBar, lastTime) if lastTime <= 0 then guiSetVisible(progBar, false) end end, 1000, 15) I didn't understand, but one detail caught my attention and I wanted to edit it.
  5. GTA:SA Download original version and reinstall MTA:SA https://www.g2a.com/grand-theft-auto-san-andreas-steam-key-global-i10000004439009
  6. You have multiple errors, I can say that you are having these problems because GTA:SA and MTA:SA are not properly installed and you are installing a modded game, delete the MTA:SA and GTA:SA files and install them again without mods.
  7. Shady1

    Voice chat bug

    update your sound drivers
  8. Another player like you asked this question and I gave him an answer, please read my answer.
  9. Hi @scolen , I will send you a link with a good explanation for making inventory system, I think you can do it by trying it,check the link I sent you and start creating the codes, if you have a problem and have problems in progress please continue with this topic and tell us more clearly what you couldn't do so we can give you good support
  10. Shady1

    BAN

    hello welcome to the forum, I already gave you an answer about this topic on the MTA Discord server, you should read it again.
  11. GPU driver issue, try updating them or rolling back / reinstalling
  12. Hello @Phoenix78 welcome to the Forum... I saw that you have used GTA:SA crack and I suggest you to download GTA:SA legit version as soon as possible and I suggest you to check your drivers.
  13. The answer to your question will depend on you, for example, the more you practice and you tend to learn, the faster you can learn, you should read many tutorial videos and documents. I will send you a few tutorials, I made some of them, you can browse, don't forget to practice more and if you have a problem with Lua script, open a topic in this forum and tell your question, knowledgeable people will help you and I can help. Tutorials: https://forum.multitheftauto.com/forum/123-tutorials/
  14. Take a look at the site I sent you and you can do whatever it takes. https://wiki.multitheftauto.com/wiki/Call
  15. https://nightly.multitheftauto.com/ https://forum.multitheftauto.com/topic/80449-verdanatff-problem/
  16. To use it you need a modded panel and export it to your F1 panel.
  17. Shady1

    F1 panel sorunu

    büyük ihtimalle exports etmeniz gerekecektir
  18. I saw that you already mentioned this issue in your previous thread, you can have a look if you wish.
  19. Shady1

    [HELP]

    -- Client-side script addCommandHandler("setunit", function(command, unitNumber) -- Check if the unit number is valid (must be a number) if not tonumber(unitNumber) then outputChatBox("Invalid unit number! Please enter a valid number.", 255, 0, 0) return end unitNumber = math.floor(tonumber(unitNumber)) outputChatBox("You have set your unit number to: " .. unitNumber, 0, 255, 0) end)
  20. Shady1

    [HELP]

    Do you want to always show the player or do something like a trace so it can't know its original position but it knows its previous position use https://wiki.multitheftauto.com/wiki/CreateBlipAttachedTo
  21. Shady1

    [HELP]

    i don't understand what you are trying to do in the code, but i did as you asked, i didn't test it, try it and message back. local sanyi function Reset() destroyElement(sanyi) end setTimer( function() local x, y, z = getElementPosition(localPlayer) sanyi = createBlip(x, y, z, 0) end, 2000, 0) setTimer(Reset, 3000, 0)
  22. Shady1

    [HELP]

    tell me exactly what the problem is, or tell me what you want it to be
  23. Shady1

    [HELP]

    if it worked and you liked my help, you can give a like in the comment.
  24. Shady1

    [HELP]

    use https://wiki.multitheftauto.com/wiki/GetElementModel and source addEventHandler("onClientVehicleEnter", root, function(thePed, seat) local vehid = getElementModel(source) local playerskin = getElementModel(localPlayer) if (vehid ~= 596) then return end if (playerskin == 280) then playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeress belépés", 255, 255, 255, true) PDMenu = true else playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikertelen belépés", 255, 255, 255, true) end end)
×
×
  • Create New...