Jump to content

Search the Community

Showing results for tags 'trancar'.

  • 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 1 result

  1. Boa Noite. Estou modificando um script de concessionaria para deixa-lo mais rp. e quero mudar 2 funções nele 1° - Mudar a função de trancar veículo para quando o proprietário sair do servidor só ele conseguir abrir novamente pelo painel de veículos. addEvent("LockMyVehicle", true) addEventHandler("LockMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not isVehicleLocked(vehicle) then setVehicleLocked(vehicle, true) setVehicleDoorsUndamageable(vehicle, true) setVehicleDoorState(vehicle, 0, 0) setVehicleDoorState(vehicle, 1, 0) setVehicleDoorState(vehicle, 2, 0) setVehicleDoorState(vehicle, 3, 0) outputChatBox("#ffffff|#0000FF SRP - CONCESSIONÁRIA #ffffff| O seu veículo #0000FF"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #FFFFFFfoi #0000FFfechado.", source, 38, 122, 216, true) elseif isVehicleLocked(vehicle) then setVehicleLocked(vehicle, false) setVehicleDoorsUndamageable(vehicle, false) outputChatBox("#ffffff|#0000FF SRP - CONCESSIONÁRIA #ffffff| O seu veículo #0000FF"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #FFFFFFfoi #0000FFaberto.", source, 38, 122, 216, true) end else outputChatBox("#ffffff|#0000FF SRP - CONCESSIONÁRIA #ffffff| O seu veiculo não foi conectado.", source, 38, 122, 216, true) end end) 2° - Alterar a função de quando o proprietário do veiculo sair do servidor o veículo não sumir (ser destruido) function SaveVehicleDataOnQuit() for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "Owner") == source then destroyVehicle(veh) end end end addEventHandler("onPlayerQuit", root,SaveVehicleDataOnQuit) Podem me ajudar? por onde começo?
×
×
  • Create New...