$16.50 - BUY HERE
JOIN DISCORD FROM THE TEBEX FOR SALES & MORE!
# ZOOV - S.A.M Sites
EASY TO SETUP & CONFIGURABLE
Features
Planned updates:
Join the discord and request tags for this script! I’ll be setting up a private section for updates & suggestions, this resource will expand into multiple variations of cool scripts over time.
Ground-Defence Systems
- Plan to create several different ground-defence systems all in this one script.
Air-Defence Systems -
- Simulate Misses & Missiles trying to re-lock after missing.
- Make some custom props for both missiles & missile launchers
- Allow vehicle spawns with peds instead of props (they’ll aim at what they’re shooting at.)
NEW UPDATE (1.1)
STANDALONE SCRIPT
Everything is fully customisable! There are examples on how to integrate your framework to the functions within the config, please join the discord for more support.
-
Prop System
You can now spawn your own props! (example included in config.)
This will create the model, such as those in the image, and use it to fire the missiles from. -
Experimental Features
Added a barrage mode, this will let you fire multiple rockets at a time at the same target.
Added a time between shots variable in the config per system (in barrage mode, it wont wait for the rocket to hit or explode, it will keep firing) -
Other Features
Added explosion type to the config, choose between any explosion in the game for when the missile hits your vehicle!
Added multiple other changeable variables in the config to customize each system.
And More misc optimisation and other smaller changes!
RELEASE 1.0
-
Targeting System
The targeting system will track when a player enters the range of the SAM site.
It will monitor the player until it validates them as a target (configurable) -
Locked On
The missile will track the vehicle, until it either explodes after a certain time (configurable) or hits the target!
The firing system will keep attempting to fire until the target has left the zone, or meets your conditions set in the config! -
Effects
You can set the missile to have a red target outlined to the player it’s locked onto, so they can see it coming before their demise…
The missile has synced particle effects using statebags across all players on the server. -
Multiple Zones
If you have overlapping zones, both sites will fire at the player.
Each configured site will lock on and fire a missile until it meets the requirements from the config.
Config
Config.FireAt = {
['heli'] = true,
['plane'] = true,
['submarine'] = false,
['trailer'] = false,
['train'] = false,
['automobile'] = false,
['bike'] = false,
['boat'] = false,
}
Config.TimeBetweenShots = 1000 -- minimum time before the next shot is fired
Config.TimeBetweenTracking = 5000 -- while the player is in the zone, how often it checks if the player should be fired at or valdidated
Config.VerifiyHit = function(source, vehicle)
-- Here you can check if the player is dead, vehicle is destroyed, etc
-- QBCore Example
local object = exports['qb-core']:GetCoreObject()
local _player = object.Functions.GetPlayer(source)
if _player.PlayerData.metadata.isdead then return true, print('Verified Hit: Player is Dead') end
-- General example
if not GetIsVehicleEngineRunning(vehicle) then return true, print('Verified Hit: Vehicle Engine is Off') end
if not DoesEntityExist(vehicle) then return true, print('Verified Hit: Vehicle Does Not Exist') end
return false -- make sure to return false if the vehicle is not destroyed or player didn't die
end
Config.ShouldFire = function(source, vehicle, system)
-- Here you can check for Job Roles, Player Data, etc to decide if they should be fired at
-- QBCore Example
local object = exports['qb-core']:GetCoreObject()
local _player = object.Functions.GetPlayer(source)
if _player.PlayerData.metadata.isdead then return false, print('Failed Validation: Player is Dead') end
return true -- return true if it should fire
end
Config.DefenceSystems = {
{
id = 1, -- unique id for the system, it can be any number, just cant be the same as another system
location = vector3(4285.963379, -4548.514648, 3.207621), -- location of the defence system
fire_from_offset = vector3(0.0, 3.0, 2.0), -- this will fire the missile from this offset, (X = Left/Right, Y = Forward/Backward, Z = Up/Down)
defence_type = 'SAM Site', -- planning to add more types :)
time_between_shots = 1000, -- minimum time between each shot,
barrage_mode = true, -- this is experimental, it will spam fire the shots instead of waiting to check if one hits
range = 500.0, -- max range is player scope
max_travel_time = 20 * 1000, -- max travel time for missile (seconds)
projectile_velocity = 80.0, -- missile velocity
fire_to_offset = vector3(0.0, -30.0, 10.0), -- it will first fire the missile to this offset, and then track the target once it reaches the offset, (X = Left/Right, Y = Forward/Backward, Z = Up/Down)
show_missile_target = true, -- this will track the missile with a red target marker until it explodes
explosion_damage = 100.0,
explosion_screen_shake = 1.0,
explosion_id = 70, -- https://docs.fivem.net/natives/?_0xE3AD2BDBAEE269AC
missile_prop = 'w_smug_airmissile_01b', -- prop to use for missile, if not provided, it will use the default missile
prop_info = { -- remove this blank if you're using one of the props already on the map
-- location = vector3(4283.809570, -4534.017578, 5.904783), -- remove this if you want to use the same position as the system
model = 'hei_prop_carrier_defense_01', -- model to use for the prop (can be the hash or the name)
place_on_ground = true, -- will place the prop on the ground,
heading = 180.0, -- the heading it will face
},
verify_hit = Config.VerifiyHit, -- this is a function that will be called to verify if the missile hit the target, or you can have a custom one per system.
should_fire = Config.ShouldFire, -- this is a function that will be called to verify if the missile should be fired at the target, or you can have a custom one per system.
fire_at = Config.FireAt, -- this is a table that will be checked to see if the missile should be fired at the target, or you can have a custom one per system.
-- fire_at = function(source, vehicle, system) -- you can have a custom function per system, just use this instead of the config one. (Same for verify_hit & should_fire)
-- print('Custom Fire At Function')
-- return true
-- end,
time_between_tracking = Config.TimeBetweenTracking, -- while the player is in the zone, how often it checks if the player should be fired at or valdidated
},
}
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | ~500 |
Requirements | Standalone |
Support | Yes |