[ESX] MSK Armor - Multiple Armor Vests

Tebex [3.99€ incl. VAT]

Description

  • You can use the armor Item then you get nobproof Item and a Vest will be added to the Ped.
  • With the nobproof Item then the Vest will be removed from Ped.
  • Script checks all Config.Refresh times your status and save it in database.
  • Status will be saved too if you leave the Server.
  • Health and Armor will be saved in Database and restored after player relog.
  • You can set as much vests as you want to add

Config

Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
Config.Debug = true
----------------------------------------------------------------
-- !!! This function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
Config.Notification = function(src, action, xPlayer, message)
    if action == 'client' then -- clientside
        MSK.Notification(message) -- replace this with your Notify
    elseif action == 'server' then -- serverside
        MSK.Notification(src, message) -- replace this with your Notify
    end
end
----------------------------------------------------------------
Config.Hotkey = {
    enable = false, -- Set true to enable the Hotkey
    key = 38, -- Set the Control you want to use
    item = 'bulletproof' -- Set the item that you want to use via Hotkey
}

Config.LoadStatus = {
    health = true, -- Set false if you don't want to restore health after player connect
    armor = true -- Set false if you don't want to restore armor after player connect
}

Config.Refresh = {
    enable = true, -- Set false if you don't want to refresh health and armor status
    debug = false, -- Set true if you want to get a print in console // recommended: false
    time = 10, -- in seconds (default: 10 seconds)
    remove = true -- Checks the current Armor status and removes the Vest if armor = 0
}

Config.removeVestAfterConnect = true -- Set false if you don't want that the Vest will be removed after Player Loaded
Config.giveNoBProof = true -- Set false if you don't want that you get the 'nobproof' item after using a 'bulletproof' item
------------------------------------------------------------
-- Animation for put on the Vest
Config.Animations = {
    dict = 'clothingtie',
    anim = 'try_tie_neutral_a',
    time = 2 -- in seconds (default: 2 seconds)
}
----------------------------------------------------------------
-- Set the Armor ID you want to use after player relog if player has no bproof_1 set
Config.defaultSkin = {
    male = {skin1 = 11, skin2 = 1}, -- Male
    female = {skin1 = 3, skin2 = 1}, -- Female
}
----------------------------------------------------------------
Config.Armories = {
    ['bulletproof'] = { -- Item
        label = 'Bulletproof Vest',
        percent = 100,
        skin = {
            male = {skin1 = 11, skin2 = 1},
            female = {skin1 = 3, skin2 = 1}
        },
        removeItem = true
    },
    ['bulletproof2'] = { -- Item
        label = 'Bulletproof Vest',
        percent = 50,
        skin = {
            male = {skin1 = 11, skin2 = 1},
            female = {skin1 = 3, skin2 = 1}
        },
        removeItem = true
    },
    ['bulletproofpolice'] = { -- Item
        label = 'Police Bulletproof Vest',
        percent = 100,
        skin = {
            male = {skin1 = 12, skin2 = 3},
            female = {skin1 = 13, skin2 = 1}
        },
        removeItem = true
    },
}
Code accessible Yes
Subscription based No
Lines (approximately) ~ 250
Requirements ESX Legacy, esx_skin, skinchanger, oxmysql, msk_core
Support Yes

My other Scripts

Paid

Free

5 Likes

thank you bro

1 Like

Hello ! seems not working with esx_legacy ox_inventory

1 Like

Hey I know this error and I am trying to fix this. But the Script works fine except for restore armor status after relog.
As I said I’m trying to fix this :slight_smile:

1 Like

Update v1.3

Added

  • On Player Joined, if armor status is 0 then the Vest and the Item nobproof will be removed from ped.

Fixed

  • If a Player relog then the Player get the saved status from database and a Vest will be added to the Ped.

Big thanks to @Kiminaze for helping me with the MySQL query.
https://kiminazes-script-gems.tebex.io/

1 Like

thank you thank you master hehe

1 Like

Update v1.4.1

Added

  • Config.CheckRemoveArmor is stable now

Fixed

  • Fixed issue were xPlayer = nil

Big thanks to @Kiminaze
https://kiminazes-script-gems.tebex.io/

Update v1.5

➥ You can edit getSharedObject now in config
➥ You can edit the Notification now in config

Re-download msk_armor at your keymaster

Update v2.0

  • You can now set you own vests as much as you want to add

Re-download msk_armor at your keymaster

Update v2.1

  • Performance improvements
  • Fixed Error with refreshArmor after player connection

Re-download msk_armor at your keymaster

The vest and life are unfortunately not saved what can be the reason ?

Did you uploaded the sql file? Do you use mysql-async or oxmysql ? Any errors?

yes the sql is in it it also stores it in the database but as soon as you make a relog the vest is removed although in the database 100 is stored, I use mysql-async and no no errors in the console

Do you use the latest version? If not please redownload and try again.

We recently bought it (about 2h) so we should have the latest version

Activate Config.Debug and send me the prints in client and serverconsole

In debug mode it retrieves the data, as soon as I turn it off the vest is removed after the relog!

console

join

putveston

afterrelog

So with Config.Debug = true it works but with Config.Debug = false it doesn’t?

Thats strange. I will have a look at this and fix this asap

Yes exactly in debug mode it works when it is off not

There is a problem with ESX_Legacy when creating a new character the skin menu does not open anymore