Dynamite
Script developed for the server LGW⚡WL+18 FR-QC⚡SERIOUS RP✨FPS OPTIMIZED✨UNIQUE MAPPING-SCRIPT
This scripts allows players to place dynamite and then detonate it with a detonator connected by a wire.
The dynamite spreads a fire that remains active until players extinguished the fire or the server is rebooted.
Vorp Core must use item in Config.ItemName
Others Framework must use Client Event :
Client Side
TriggerEvent("BTFire:placeFire")
Server Side
TriggerClientEvent("BTFire:placeFire", source)
Here is an excerpt from the config.lua file : (parts of the excerpt are hidden) :
Config = {}
Config.DEBUG = false -- Enables debug mode to use dynamite when start/restart
--- Activate the Script
Config.ItemName = "kit_dynamite" -- VORP Only : Sets the item name required to start the script.
-- OTHERS FRAMEWORKS: TriggerClientEvent("BTFire:placeFire", source) or TriggerEvent("BTFire:placeFire")
--- Prompt
Config.PromptGroupLabel = "Dynamite" -- Sets the label for the dynamite/detonator group.
Config.PromptDynamite = "Place the dynamite" -- Text for the prompt to place dynamite.
Config.PromptDetonator = "Place the detonator" -- Text for the prompt to place the detonator.
Config.PromptCancel = "Put away the dynamite" -- Text for the prompt to cancel and put away the dynamite or the detonator.
Config.IgniteKey = keys["E"] -- Sets the key to place the dynamite and place the detonator.
Config.CancelKey = keys["R"] -- Sets the key to cancel the action and put away the bucket, the dynamite or the detonator.
Config.PromptGroupWater = "Extinguish the fire" -- Sets the label for the water/bucket group.
Config.PromptBucket = "Take a bucket" -- Text for the prompt to take a bucket.
Config.PromptWater = "Fill bucket with water" -- Text for the prompt to collect water.
Config.PromptWaterUse = "Throw water on the fire" -- Text for the prompt to use the water on the fire.
Config.PromptWBCancel = "Put down the water bucket" -- Text for the prompt to cancel and put away the bucket.
Config.BucketWaterKey = keys["E"] -- Sets the key to get a bucket, fill it with water and use water on the fire.
--- Inside/Outside building
Config.AllowOutside = true -- Allow the dynamite outside building
Config.FireMinOutside = 3 -- Sets the minimum number of fire circles outside.
Config.FireMaxOutside = 5 -- Sets the maximum number of fire circles outside.
Config.FireMinInside = 5 -- Sets the minimum number of fire circles inside building.
Config.FireMaxInside = 10 -- Sets the maximum number of fire circles inside building.
--- Fire & Smoke
Config.EnableFireSmoke = true -- Adds a large flame with smoke visible from afar, as well as ambient smoke fog in the surrounding area of the fire.
--- Fire Extinguish
Config.AllowExtinguish = true -- Allows players to extinguish fire.
Config.BucketRadius = 4.0 -- The distance from the fire at which the player can collect a bucket.
--- Dynamite parameters
Config.WireLength = 15.0 -- The length of the detonator wire. Can't be under 10.0. (Be careful, a long wire can cause player crash due to game physics)
Config.ExplodeTime = 10 -- Sets the time in seconds before the dynamite explodes. (for example : you can use math.random(5,15) to get a random countdown between 5 and 15 seconds)
Config.ShowCountDown = true -- Show (true) or Hide (false) the time before the explosion.
Config.CountDownStyle = 2 -- 1 - use javascript Countdown / 2 - use RDR2 multiplayer Countdown
--- Discord
Config.DiscordWebhook = "" -- Discord canal webhook (ex : https://discord.com/api/webhooks/1212121212/StmZ_AazZZykg69RY1gRZnp7h4121212AZAbAbBlWxyJzaMq)
Config.DiscordName = "BT_DYNAMITE" -- The title of the Discord message.
Config.Txt = {
TooFar = "Warning, you are going too far, the wire might break.", -- Warning message when moving too far.
TooFarGone = "The wire has broken" -- Message when the string breaks.
}
-- this content is hidden in the excerpt
Last updated