Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 17/05/21 in all areas

  1. @Erlkonig Thank you a lot
    1 point
  2. Olá. Seja bem-vindo ao fórum! No próprio site da função setVehicleHandling tem as propriedades disponíveis e seus valores. Na propriedade que você tem dúvida, há esta informação:
    1 point
  3. Code: addEvent("Tic.addVeh", true) addEventHandler("Tic.addVeh", root, function(source, model) local query = dbPoll(dbQuery(database, "SELECT * FROM playersConce WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) if query and #query > 0 then if vehicleConces[source] then if isPedInVehicle(source) then local r1, g1, b1, r2, g2, b2, r3, g3, b3 = getVehicleColor(vehicleConces[source], true) local conceSQL = { vehLife = getElementHealth(vehicleConces[source]), vehColor = { r1, g1, b1, r2, g2, b2, r3, g3, b3, }, vehTunning = {}, vehUpgrade = {}, } removeElementData(vehicleConces[source], "Tic.vehicleBank") destroyElement(vehicleConces[source]) local vehFuel = dbPoll(dbQuery(database, "SELECT * FROM playersConce WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) setElementData(vehicleConces[source], "DNL:Combustivel", vehFuel) dxMsg(source, "Your vehicle was saved in the garage!", "success") dbExec(database, "UPDATE playersConce SET Estado = ?, Dados = ? WHERE Account = ? AND Model = ?", "Garage", toJSON(conceSQL), getAccountName(getPlayerAccount(source)), model) dbExec(database, "UPDATE playersConce SET Fuel = ? WHERE Account = ?", getElementData(source, "DNL:Combustivel"), getAccountName(getPlayerAccount(source))) else dxMsg(source, "Get inside the vehicle and try again.", "info") end else dxMsg(source, "Your not have a vehicle!", "info") end end end ) About the solve: As I understand, you had destroyed the element before setElementData ( destroyElement(vehicleConces[source] ). Also in dbExec you're trying to get ElementData from source, not from vehicleConces[source].
    1 point
×
×
  • Create New...