#Mail Theft for QBCore/QBox [Inspired]

1 messages · Page 1 of 1 (latest)

vagrant stratus
#

Mail Theft for QBCore/QBox [Inspired]

warm lichen
#

5$ for this not worth it

frosty path
#

why is this paid 😭

kind nexus
#

frrrr i can make this in 5-15 mins

sick ether
#

crazy script

odd ivy
#

isnt this like all of this:

local models = { "prop_postbox_01a" } 
exports.ox_target:addModel(models, {
  label = "Rob Postbox",
  distance = 2.0,
  onSelect = function(data)
    if Entity(data.entity).state.robbed then
      return
    end

    local ped = PlayerPedId()
    TaskTurnPedToFaceEntity(ped, data.entity, -1)
    local entityCoords = GetEntityCoords(data.entity)
    local entityHeading = GetEntityHeading(data.entity)
    local offsetCoords = GetOffsetFromEntityInWorldCoords(data.entity, 0.0, -1.0, 0.0)
    TaskGoToCoordAnyMeans(ped, offsetCoords.x, offsetCoords.y, offsetCoords.z, 1.0, 0, 0, 0, 0)
    local animDict = "anim@scripted@lifeinvader@office@hotwire@heeled@"
    local anim = "hotwire"
    
    lib.requestAnimDict(animDict)
    TaskPlayAnim(ped, animDict, anim, 8.0, -8.0, -1, 0, 0, false, false, false)
    lib.skillCheck({
      duration = 10000,
      pos = {x = 0.0, y = 0.0, z = 0.0},
      scale = 1.0,
      canFail = true,
      disable = {move = true, combat = true},
      success = function()
        TriggerServerEvent("snowy_postbox:server:robPostbox", NetworkGetNetworkIdFromEntity(data.entity))
      end,
      fail = function()
        lib.notify({
          title = "Failed",
          description = "You failed to rob the postbox",
          duration = 10000,
          position = "top",
          type = "error",
        })
      end,
    })

  end,
})
RegisterNetEvent("snowy_postbox:server:robPostbox", function(entity)
    if Entity(entity).state.robbed then return end

    if #(GetEntityCoords(GetPlayerPed(source)) - GetEntityCoords(entity)) > 3.0 then return end

    Entity(entity).state.robbed = true

    local amount = math.random(1, 100)
    local reward = amount * 2
    exports.ox_inventory:AddItem(source, "money", reward)
    lib.notify(source, {
        title = "Success",
        description = "You robbed the postbox and got $" .. reward,
        duration = 10000,
        position = "top",
        type = "success",
    })
end)