Jump to content

Topo1st

Members
  • Posts

    53
  • Joined

  • Last visited

Posts posted by Topo1st

  1. For years I've been wondering, what's the point of joining a server, then spamming the server chat with nonsense like "yxxcvbn,ùmlkjhgfdsqazertyuiop^$qaaaaqqqqqqqqqqqqqqqqqqqqqqqaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq" (real life example) and quitting fast. Are there any known spam bots disturbing MTA servers and therefore should us server owners start adding captchas to our login/registration panels (provided that a player cannot send chat messages until they've logged in)?

  2. I have this server using AVMES (Advanced Vehicle Mechanics Emulation System). Whether you're just interested in testing AVMES, or love driving cars but you're bored with the default GTA driving mechanics, you might want to check this out. BoR6 is mostly freeroam but you'll also have to work a bit: there are a few free-to-use sample cars but you're going to have to buy most of the modded cars. Have fun!

    IP: 51.77.245.89:22003

     

  3. It's so good to see you are already light years ahead of me. It's so sad that my clutch isn't as advanced as yours! The car even sounds so good, that when I tested it, I thought a car drove INTO my house. I had to check there really wasn't a car in my kitchen!

    I have to say you REALLY deserve that praise you got from those mountain hillbillies you told me about. An "amateur pre-puberty kid" (Or how was it? My English is so crappy, I can't understand everything I read) like me will NEVER be able to create a DESIGN like that! With one .wav, and one script.

    Keep up the good work while I keep working with my bitch-ass project.

  4. I modified the code to fit my purpose. Though it should look fine, the result is '-1.#IND'.

    Note that applyDopplerEffectToSound is called by another function called by onClientRender.

    function setSoundProperty(sound, property, value) 
        if (sound) and (getElementType(sound) == "sound") then 
            local samplerate, tempo, pitch, reversed = getSoundProperties(sound) 
            if (property == "SampleRate") then 
                local success = setSoundProperties(sound, tonumber(value), tempo, pitch, reversed) 
                if (success) then 
                    return true 
                end 
            elseif (property == "Tempo") then 
                local success = setSoundProperties(sound, samplerate, tonumber(value), pitch, reversed) 
                if (success) then 
                    return true 
                end 
            elseif (property == "Pitch") then 
                local success = setSoundProperties(sound, samplerate, tempo, tonumber(value), reversed) 
                if (success) then 
                    return true 
                end 
            elseif (property == "Reversed") then 
                if (value == true) or (value == false) then 
                    success = setSoundProperties(sound, samplerate, tempo, pitch, value) 
                    if (success) then 
                        return true 
                    end 
                end 
            end 
        end 
    end 
      
    function applyDopplerEffectToSound(sound) 
        local veh = getPedOccupiedVehicle(localPlayer) 
        local soundveh = getElementAttachedTo(sound) 
        local tpX, tpY, tpZ = getElementPosition(soundveh) 
        local tvX, tvY, tvZ = getElementVelocity(soundveh) 
        if (veh) then 
            local mpX, mpY, mpZ = getElementPosition(veh) 
            local mvX, mvY, mvZ = getElementVelocity(veh) 
            local dX, dY, dZ = distance(mpX, mpY, mpZ, tpX, tpY, tpZ) 
            local distance = getDistanceBetweenPoints3D(mpX, mpY, mpZ, tpX, tpY, tpZ) 
            local dpS = dotproduct(tvX, tvY, tvZ, dX, dY, dZ) 
            local dpR = dotproduct(mvX, mvY, mvZ, dX, dY, dZ) 
            local vr = dpR / distance 
            local vs = dpS / distance 
            local f = ((1 + vr) / (1 + vs)) * (4.5 * (vs - vr)) 
            setSoundProperty(sound, "Pitch", f) 
        else 
            local mpX, mpY, mpZ = getElementPosition(localPlayer) 
            local mvX, mvY, mvZ = getElementVelocity(localPlayer) 
            local dX, dY, dZ = distance(mpX, mpY, mpZ, tpX, tpY, tpZ) 
            local distance = getDistanceBetweenPoints3D(mpX, mpY, mpZ, tpX, tpY, tpZ) 
            local dpS = dotproduct(tvX, tvY, tvZ, dX, dY, dZ) 
            local dpR = dotproduct(mvX, mvY, mvZ, dX, dY, dZ) 
            local vr = dpR / distance 
            local vs = dpS / distance 
            local f = ((1 + vr) / (1 + vs)) * (4.5 * (vs - vr)) 
            setSoundProperty(sound, "Pitch", f) 
        end 
    end 
      
    function distance(x, y, z, a, b, c) 
        return math.abs(a - x), math.abs(b - y), math.abs(c - z) 
    end 
          
    function dotproduct(x, y, z, a, b, c) 
        return math.abs(x * a) + math.abs(y * b) + math.abs(z * c) 
    end 
    

  5. Interesting.

    Well, you should begin with having a mapping, which vehicle (or model) is using a sound.

    Then go ahead and make a onClientRender handler. In this handler you get the localPlayer's velocity and position (check for localPlayer's vehicle and use it if available), go through the mapping with a loop and get each vehicle's velocity and position aswell. In this loop you do the calculation as written on the sources you provided (shouldn't be too hard) and set the sound properties (create the sound if not done before). Play with the fPitch and fTempo values to get a nice effect.

    PlaySound

    SetSoundVolume

    SetSoundProperties

    OnClientRender

    The point is that I can't figure out how to take advantage of those formulas. The sound element with the vehicle it's attached to, along with the listener (in fact, the camera element) is known. I need help at the point where I have to do those calculations.

  6. Months ago i had seen numerous attempts at Manual and Automatic transmissions on MTA.

    Is that a reference to my work? :D

    Absolutely, yours was truely the best one around when i was looking for them. Would of been so much better if i could make a video of mine to display its features, but my sound card doesnt support what-you-hear recording. Sound was the best part in my opinion.

    You're talking about a plural, I would be interested to see what else have you seen besides my 'thing', if I may ask? :)

  7. You need to import a custom handling line to make those 'large boats' work as expected. Might be difficult though, because MTA doesn't have a function to alter vehicle 'special handling' (those lines at very end of handling.cfg).

  8. If you look at around 0:29 on your video, the car keeps accelerating when it's at 8k, that's shouldn't really be happening :P What about adding a rev-limiter?

    The rev limiter, in this case, was at 9k. The tachometer wouldn't show more than 8k, so it shows 8k even though the engine was revving at 9k.

  9. Sounds much better now, but there's still some work needed with the tachometer. Even at full RPM it sounds/seems like the car is still accelerating a fair bit.

    The tachometer is fine :wink: The engine was revving at 9000rpm but I made the needle stop moving when the tacho reaches max. So, in this case it would stop at 8k :)

    It was annoying when the needle kept raising over the tachometer scale 'if you know what I mean' :lol:

  10. Well, I'd say Forza, but those are Xbox exclusive, so might be a bit difficult to get a hand on those. Not sure what your process is like to get the sound effects working with your resource. :)

    It's a funny thing that I extracted all the car sounds from Forza 4, just a few days ago :P It's just sad that there were no "onload" sounds at all, so they can't quite be used :(

    Another thing with Forza sounds is that I would need to mix exhaust/engine bay sounds to make them quite work.

    TDU maybe, or ripping em from Gran Turismo

    Gran Turismo 6 has some fantastic quality sounds (Though people say they are horrible, listen to the Volkswagen 1200 for example. Just beautiful flat-four engine sounds.), but GT is totally protected. There is no way I could get my hands on those.

    TDU has horrible sound effects :/

    Totally agree :D

  11. Some really impressive work so far, this sure has huge potential. I'd however say that the sound effects are rather bad - it's too loud and doesn't really sound realistic nor good. It kind of reminds me of Test Drive Unlimited, which make engine sound fanatics like me wanna cry ourselves to sleep.

    But other than that, great work! Can't wait to see some more progress!

    I'm using the sounds I've extracted from NFS:Shift. It's clear that EA made them way too loud and overdriven. Let me know if you know a good source of sounds. (I'm a crazy engine sound fanatic too!)

×
×
  • Create New...