Giter VIP home page Giter VIP logo

mgarage's Introduction

discord Discord Hits

mGarage

  • Create garages/impounds in-game or in the Config file
  • Garage action: Target/TextUI
  • Multilanguage
  • Garages for jobs
  • Vehicle search in the garage interface
  • Custom vehicle garages
  • Obtain an item key if necessary
  • Mark vehicles outside the garage
  • Share vehicles with companions
  • Save vehicles with fake license plates (using the 'fakeplate' item from mVehicle)
  • Impound with societies
  • Functions to integrate the garage into any housing system
  • Function to impound vehicles
    • The impound can establish a society account
    • Set a recovery date
    • Function to remove time from a plate vehicle

Functions

OpenGarage

  • exports.mGarage:OpenGarage()
exports.mGarage:OpenGarage({
    name = 'GARAGE ID/NAME',
    garagetype = 'garage',              
    intocar = true,                     
    carType = { 'automobile', 'bike' }, 
    spawnpos = {  vec4(0, 0, 0, 0) }
})

SaveCar

  • exports.mGarage:SaveCar()
    exports.mGarage:SaveCar({
        name = 'GARAGE ID/NAME',
        garagetype = 'garage',              
        entity = vehicleEntity or false to getVehiclePedIsIn,            
        carType = { 'automobile', 'bike' }, 
    })

impound Vehicle

    exports.mGarage:ImpoundVehicle({ 
        vehicle = Vehicle entity, 
        impoundName = 'Impound Name' 
    })

Remove time for recovery vehicle

  -- open input to set plate 
    exports.mGarage:UnpoundVehicle()
  -- or direct plate
     exports.mGarage:UnpoundVehicle(plate)

Example

RegisterCommand('mGarage:opengarage', function(source, args, raw)
    local ped = PlayerPedId()
    local coords, heading = GetEntityCoords(ped), GetEntityHeading(ped)
    exports.mGarage:OpenGarage({
        name = 'Pillbox Hill',
        garagetype = 'garage',              
        intocar = true,                     
        carType = { 'automobile', 'bike' }, 
        spawnpos = {
            vec4(coords.x, coords.y, coords.z, heading),
        }
    })
end)

RegisterCommand('mGarage:savecar', function(source, args, raw)
    local ped = PlayerPedId()
    local vehicleEntity = GetVehiclePedIsIn(ped, false)
    if DoesEntityExist(vehicleEntity) then
        exports.mGarage:SaveCar({
            name = 'Pillbox Hill',
            garagetype = 'garage',             
            entity = vehicleEntity,             
            carType = { 'automobile', 'bike' }, 
        })
    else
        print('No Vehicle')
    end
end)

RegisterCommand('mGarage:impound', function(source, args, raw)
    local ped = PlayerPedId()
    local vehicleEntity = GetVehiclePedIsIn(ped, false)
    if DoesEntityExist(vehicleEntity) then
     ImpoundVehicle({
        vehicle = vehicleEntity,
        impoundName = 'Impound'
    })
    else
        print('No Vehicle')
    end
end)

RegisterCommand('mGarage:unpound', function(source, args, raw)
    UnpoundVehicle()
    -- or 
    --  UnpoundVehicle('MONO 420')
end)

image

mgarage's People

Contributors

mono-94 avatar ent510 avatar sh0rtyyy avatar kawet00 avatar likemantv avatar

Stargazers

Coby.Hツ avatar  avatar snajdan avatar  avatar Blazej Gantz avatar Operation Airstrike avatar Anoxidus avatar Sugarberry avatar  avatar AnthoHansen avatar ItzikNossette avatar Daniel Seitz avatar  avatar  avatar Cata_a avatar ViskCY avatar António Neves avatar Yoda Arsila avatar Console-Bug avatar YuNin9 avatar DandK21 avatar BruJ0 Tv avatar cb() avatar Ilham Wicaksono avatar devri faizal avatar Player - X avatar Kira. avatar Dave Lowe avatar ᐯIᖇᑌᔕ avatar 88scripts avatar FearIspanic avatar  avatar  avatar

Watchers

FearIspanic avatar  avatar Daniel Seitz avatar Heavens avatar  avatar Mist avatar

mgarage's Issues

Personal vehicles dissapear after server restart.

Is there any way you could change it so that on server restart any player owned vehicles that get left out and not returned to garage get sent to the impound because at the moment if you leave your car out and the server restarts, the database still thinks the car is out so when you go to retrieve it doesn't let you. And then if you press GPS it will throw an error because it can't find the car.

global (vehicles)

hello ,

i'am getting this error -

image

what can I do to solve it? What am I doing wrong? or missing?

Ps - sorry im kinda of a noob in this

Garage doesn't save color type.

After storing vehicle to garage and then pulling out of garage the type of color (metallic,matte, etc.) doesn't save, same with chameleon colors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.