This script get you a interesting feature for better Roleplay
WORKING GAS MASK with ANIMATION
| similar script are free here but:
| advanteges of paid scripts:
1. optimalized
2. full support
3. configurable
4. more realistic - with animation!
| You have two possibilities how You can use our scripts:
- start this scripts as single script - bad optimalization, many resources
- copy this scripts into our base - better optimalization, one resource
| Steps for use like a single script:
- Drag the folder into your server
- Write name of this resource into server.cfg
- If the script have - ImportIntoDatabase.sql - import it into database
- Restart the server
| Steps for adding the script into base:
- Copy client script named as c_firemode.lua into client folder
- Copy server script named as s_*.lua into server folder
- Write this fileS into fxmanifest.lua in our base.
- File- ImportIntoDatabase.sql - import it into database
- Restart the server
| Resmon if script is inactive: 0.00ms
| Resmon if script is active: 0.02ms - script is active only if you putting up or down the mask else is inactive
| Config:
--===============================================
--=== CREATED BY SVEJDARPA ===
--===============================================
Config = {}
Config.ESX_enable = false --allowing/disabling ESX, mainly for notifications, If you can enable it you must edit fxmanifest.lua
Config.Notifications = true --allowing/disabling all notification
--===============================================
--=== REALISTIC GAS MASK ===
--===============================================
Config.GasMaskDetect = false -- in main loop is detecting, if you have a mask and adding you gas protection - less realistic, CMD must be false
Config.GasMaskCMD = true -- in main loop will be created command for using a gasmask, it was used for testing, better solution is triggerEvent and using item, autodetect MUST be false
Config.CMD = 'gasmask' -- command for gasmask
Config.RealisticClothing = true -- better animation for clothing - more realistic
Config.Mask1_Item = 46 -- mask_1 from skin for ITEM
Config.Mask2_Item = 0 -- mask_2 from skin for ITEM
Config.GasMasksWithoutItem = { -- table of masks for autodetect
46
}
--------------DISPLAYED TEXT---------------------------
Config.GasMaskOnText = 'You dressed your mask'
Config.GasMaskOffText = 'You undressed your mask'
--------------Usable Client Event----------------------
-- first nil = mask clothes 1
--second nil = mask clothes 2
-- TriggerEvent('gasmask:useItem', nil, nil)
-- TriggerClientEvent('gasmask:useItem', _source, nil, nil)
function Notification(type, text)
if Config.ESX_enable then
if type == 'error' then
ESX.ShowNotification("~r~"..text, true)
elseif type == 'success' then
ESX.ShowNotification("~g~"..text, true)
elseif type == 'inform' then
ESX.ShowNotification("~y~"..text, true)
end
else
print("".. text)
end
end
| Server Config: for adding item back
--===============================================
--=== ADD ITEM ===
--===============================================
-- not necesary to use this, but you will loose item after use it
RegisterServerEvent('gasmask:addItem')
AddEventHandler('gasmask:addItem', function(item)
if item == 'mask' then
print('add gas mask')
-- Here you can trigger event which you use for adding item back into player inventory
end
end)
| Video: soon
| Price: 2.46€ + tax (2.98€)
| Created by: Svejdarpa#4136
Buy: https://svejdascripts.tebex.io/package/5794995
Code is accessible | Yes |
Subscription-based | No |
Lines (approximately) | N/A |
Requirements | N/A |
Support | Yes |