Elvis Willian

Members
  • Content count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Elvis Willian

  • Rank
    Civilian

Details

  • Gang
    ll
  1. help me create colisions

    I created an object, but when I put it in the game, it creates a collision that should not be there. how to solve ?
  2. Replace SFX sounds in mta

    I would like to know if it would be possible to replace the SFX files, so it would be easy to create a system of sounds for vehicles without being that ugly and bad done by scripts
  3. Animations Replace

    Hello, I would like to give you a suggestion that would improve the mta for the better, in order to create new things. Replacing the original animations, I saw that this was disabled because it caused problems, but it would be really fun to create new things in mta sa
  4. Help me script rotate objects !

    Hello, I would like to ask for the help to create a system to rotate an object when I hold a certain button , It will only stop after I release objectRotation = 0; objeto = createObject ( 1852,2714,-1756.2700195313,77.559997558594, 0, 0, 0 ) function func () objectRotation = objectRotation + 1.20 setElementRotation(objeto, 0, 0, objectRotation) end function func2 () objectRotation = objectRotation - 1.20 setElementRotation(objeto, 0, 0, objectRotation) end bindKey ( "2", "down", func2 ) bindKey ( "3", "down", func )
  5. Example Duplicate Weapons - Help

    I tried to create something to attach on a weapon model. Can someone help me solve this? function weapon1(player) local weaponID = getElementModel(arma_1) if weaponID == 356 then PosX = 0 PosZ = 1.4 PosY = 0.4 else return end x,y,z = getElementPosition(player) local arma = createObject(1830, x, y, z+30) attachElements(arma, arma_1,PosX,PosZ,PosY) end end addCommandHandler("weap", weapon1)
  6. Duplicate weapons for freeroam

    I want to create two weapons from the same ID, so each of the two will have different skins
  7. Duplicate weapons for freeroam

    Hello would like tips to develop a script to duplicate the weapons . help me pls
  8. Final Adjustments Sound system in vehicles

    This would help me a lot if you can send me. I'm very grateful.
  9. Final Adjustments Sound system in vehicles

    I just created this script for a reason! Improve the sound quality and create a more realistic system!, What I mean is to adjust the gearshift without the use of handling, but in the last case I can use it, since this resouce that you passed me is much worse than the my
  10. I finished some adjustments, but to be perfect I need to create some kind of delay in the gearshift so it would be more realistic. some help ? local sound = {} function updateEngineSound() local allVehicles = getElementsByType("vehicle") for index, veh in ipairs (allVehicles) do local model = getElementModel(veh) if model == 411 then if getVehicleEngineState(veh) then if isElement(sound[veh]) then local gear = getVehicleCurrentGear ( veh ) or 1 local velocityX, velocityY, velocityZ = getElementVelocity(veh) --local actualspeed = ((velocityX^2 + velocityY^2 + velocityZ^2)^(0.5)) * ((11 - gear) /10) local rpm =((velocityX^2 + velocityY^2 + velocityZ^2)^(0.5)) * 161 local mph = rpm * 80 * 111.847 / gear local minSoundSpeed = 0.15 local soundSpeed if (gear == 0) then mph = rpm * 50 * 111.840 end --soundSpeed = mph/(2000+2000/minSoundSpeed) + 0.20 soundSpeed = mph/(100000/minSoundSpeed) + minSoundSpeed setSoundSpeed (sound[veh], soundSpeed) outputChatBox(gear) else local x, y, z = getElementPosition(veh) sound[veh] = playSound3D("sounds/engine.wav", x, y, z, true) attachElements(sound[veh], veh) end else if isElement(sound[veh]) then destroyElement(sound[veh]) end end end end end addEventHandler("onClientPreRender", root, updateEngineSound)
  11. [Help] ModLoader

  12. Vehicle Sounds adjustment RPM

    Hi, I really need some help! To adjust the speed of sound with the RPM of the vehicle, can anyone help me? local sound = {} function updateEngineSound() local allVehicles = getElementsByType("vehicle") for index, veh in ipairs (allVehicles) do local model = getElementModel(veh) if model == 411 then if getVehicleEngineState(veh) then if isElement(sound[veh]) then local gear = getVehicleCurrentGear ( veh ) or 1 local velocityX, velocityY, velocityZ = getElementVelocity(veh) local actualspeed = ((velocityX^2 + velocityY^2 + velocityZ^2)^(0.5)) * ((11 - gear) /10) local mph = actualspeed * 70 * 111.847 local minSoundSpeed = 0.15 local soundSpeed = mph/(1000+1000/minSoundSpeed) + minSoundSpeed setSoundSpeed (sound[veh], soundSpeed) else local x, y, z = getElementPosition(veh) sound[veh] = playSound3D("sounds/engine.wav", x, y, z, true) attachElements(sound[veh], veh) end else if isElement(sound[veh]) then destroyElement(sound[veh]) end end end end end addEventHandler("onClientPreRender", root, updateEngineSound)
  13. Engine Sound Synchronization Help

    Really, that did not help much. The problem is the issue of changing the speed of sound when the gears pass :\
  14. Engine Sound Synchronization Help

    Well the script is almost perfect! . Just missing the part of synchrony in the gearshift, someone to help me? function updateEngineSound() local allVehicles = getElementsByType("vehicle") for index, veh in ipairs (allVehicles) do local model = getElementModel(veh) if model == 411 then if getVehicleEngineState(veh) then local x, y, z = getElementPosition(veh) local sound = getElementData(veh, "engineSound") if not sound then sound = playSound3D("sounds/engine.wav", x, y, z, true) setElementData(veh, "engineSound", sound,false) end if isSoundPaused(veh) then setSoundPaused(sound, false) end local gear = getVehicleCurrentGear ( veh ) or 1 local velocityX, velocityY, velocityZ = getElementVelocity(veh) local actualspeed = ((velocityX^2 + velocityY^2 + velocityZ^2)^(0.5)) * ((11 - gear) /10) local mph = actualspeed * 70 * 111.847 local minSoundSpeed = 0.15 local soundSpeed = mph/(1000+1000/minSoundSpeed) + minSoundSpeed setSoundSpeed (sound, soundSpeed) setElementPosition(sound, x, y, z) else setSoundPaused(sound, true) end end end end addEventHandler ("onClientPreRender", root, updateEngineSound)
  15. Engine Sound System - HELP

    In fact, you do not have to use the gears specifically. But rather with each speed obtaining a different speed in the sound. Like that, every km / h it changes the local SoundSpeed kmh = actualspeed * 180 SoundSpeed = 0.15 .I tried to write a code for this but gave some errors