Jump to content

Search the Community

Showing results for tags 'trancarveiculo'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 2 results

  1. Olá pessoal estou com outro problema diferente agora, basicamente tou com um mod de trancar veiculos aqui porem ele veio com o som de trancar veiculo muito feio, consegui trocar o som quando o player tranca o veiculo sem estar nele porem tou tendo dificuldades para conseguir colocar um som diferente se o player estiver dentro do veiculo server side function doToggleLights ( source, beep ) local theVehicle if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then if (getElementType(source) == "player") then if not (getPedOccupiedVehicle(source)) then if ( getVehicleOverrideLights ( theVehicle ) ~= 2 ) then -- if the current state isn't 'force on' setVehicleOverrideLights ( theVehicle, 2 ) -- force the lights on -- play sound close to element if ( beep == true ) then local theElement = theVehicle triggerClientEvent ( getRootElement(), "playSoundLockOut", getRootElement(), theElement, 5) end else setVehicleOverrideLights ( theVehicle, 1 ) -- otherwise, force the lights off end else if ( beep == true ) then local theElement = theVehicle triggerClientEvent ( getRootElement(), "playSoundLockIn", getRootElement(), theElement, 5) end end end else end end Obrigado a quem puder ajudar Principalmente ao @Lord Henryque tem me ajudado bastante aqui!
  2. Olá pessoal tenho aqui um script de Trancar veiculo porem se eu sair do veiculo e deixar ele trancado e entrar noutro veiculo e trancar ficam os dois trancados e tenho acesso para destrancar os dois, mas todos os player tambem tenhem ou seja eles podem destrancar os veiculos que eu tranquei alguem pode ajudar? Client Side function processLockUnlock(vehicle) local locked = isVehicleLocked(vehicle) if isPedInVehicle(localPlayer) then if locked then playSounds("lockin") triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, false) else playSounds("lockin") triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, true) end else if locked then playSounds("lockout") triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, false) setVehicleOverrideLights ( vehicle, 2 ) setTimer ( setVehicleOverrideLights, 1000, 1, vehicle, 1 ) outputChatBox ( "\n#ff8c00✘ #ffffffINFO #ff8c00✘➺ #ffffffVeiculo Destrancado!\n", 255, 165, 0, true ) else playSounds("lockout") triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, true) setVehicleOverrideLights ( vehicle, 2 ) setTimer ( setVehicleOverrideLights, 1000, 1, vehicle, 1 ) setTimer ( setVehicleOverrideLights, 1500, 1, vehicle, 2 ) setTimer ( setVehicleOverrideLights, 2000, 1, vehicle, 1 ) outputChatBox ( "\n#ff8c00✘ #ffffffINFO #ff8c00✘➺ #ffffffVeiculo Trancado!\n", 255, 165, 0, true ) end end end local klikkTimer = false function setVehicleLockState() --Função trancar o carro if klikkTimer then return end if isTimer(klikkTimerRun) then return end klikkTimer = true klikkTimerRun = setTimer(function() klikkTimer = false end,500,1) local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle then processLockUnlock(vehicle) else local int2 = getElementInterior(localPlayer) local dim2 = getElementDimension(localPlayer) local mx,my,mz = getElementPosition(localPlayer) for k,v in ipairs(getElementsByType("vehicle")) do local x,y,z = getElementPosition(v) local int = getElementInterior(v) local dim = getElementDimension(v) local dist = getDistanceBetweenPoints3D(x,y,z,mx,my,mz) if dist <= 10 and int2 == int and dim2 == dim then processLockUnlock(v) return end end end end bindKey("l", "down", setVehicleLockState)
×
×
  • Create New...