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
},
}
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
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