ESX_Armor
FiveM Script - Benutzbare Schutzwesten, Status wird in der Datenbank gespeichert.
FiveM Forum: https://forum.cfx.re/t/esx-msk-armor-usable-armor-vests/4812243
Beschreibung
➥ 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.
➥ 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
Code
Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
Config.Debug = false
Config.getSharedObject = 'esx:getSharedObject'
----------------------------------------------------------------
-- !!! This function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
Config.Notification = function(src, type, xPlayer, message) -- xPlayer = ESX.GetPlayerFromId(src)
if type == 'client' then -- clientside
ESX.ShowNotification(message) -- replace this with your Notify
elseif type == 'server' then -- serverside
xPlayer.showNotification(message) -- replace this with your Notify
end
end
----------------------------------------------------------------
-- How often Armor Status should be saved in database
Config.EnableRefresh = true
Config.Refresh = 30 -- in seconds (default: 30 seconds)
Config.CheckRemoveArmor = true -- Checks the current Armor status and removes the Vest if armor = 0
------------------------------------------------------------
-- Animation for put on the Vest
Config.AnimWait = 2 -- in seconds (default: 1 second)
Config.Animations = {
dict = 'clothingtie',
anim = 'try_tie_neutral_a'
}
----------------------------------------------------------------
-- Set the Armor ID you want to use after Player Relog
Config.defaultSkin = {
male = {skin1 = 11, skin2 = 1}, -- Male
female = {skin1 = 3, skin2 = 1}, -- Female
}
----------------------------------------------------------------
Config.Armories = {
['bulletproof'] = { -- Item
percent = 100,
skin = {
male = {skin1 = 11, skin2 = 1},
female = {skin1 = 3, skin2 = 1}
},
removeItem = true
},
['bulletproof2'] = { -- Item
percent = 50,
skin = {
male = {skin1 = 11, skin2 = 1},
female = {skin1 = 3, skin2 = 1}
},
removeItem = true
},
['bulletproofpolice'] = { -- Item
percent = 100,
skin = {
male = {skin1 = 12, skin2 = 3},
female = {skin1 = 13, skin2 = 1}
},
removeItem = true
},
}
Alles anzeigen
Requirements
- ESX 1.2 (v1-final) // Legacy
- esx_skin
- skinchanger