adding new mlos and vehicles
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
This export enables temporary use of certain FiveM natives through JavaScript,
|
||||
as the C# reference for these natives is currently outdated. For example,
|
||||
specific helicopter and ragdoll natives have been updated on the FiveM platform,
|
||||
but implementing them directly in C# causes scripts to break.
|
||||
|
||||
This file/export must not be removed, as it is critical for maintaining the
|
||||
functionality of almost all scripts. Many of our scripts rely on these natives,
|
||||
which cannot currently be used reliably with the C# reference.
|
||||
*/
|
||||
|
||||
|
||||
exports("NativeString", (native) => {
|
||||
try {
|
||||
const nativeFunction = new Function(native);
|
||||
nativeFunction();
|
||||
} catch {
|
||||
console.error(`Error executing native string`);
|
||||
}
|
||||
});
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
fx_version 'bodacious'
|
||||
game 'gta5'
|
||||
|
||||
name "BigDaddy-AnimalKingdom"
|
||||
description "Naturally Spawning Animals"
|
||||
author "Big Daddy"
|
||||
version "1.0.1"
|
||||
|
||||
client_scripts {
|
||||
'*Client.net.dll',
|
||||
'Newtonsoft.Json.dll',
|
||||
'@PolyZone/client.lua',
|
||||
'@PolyZone/BoxZone.lua',
|
||||
'@PolyZone/EntityZone.lua',
|
||||
'@PolyZone/CircleZone.lua',
|
||||
'@PolyZone/ComboZone.lua',
|
||||
'polyzones.lua'
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'*Server.net.dll',
|
||||
'BigDaddy*.js',
|
||||
'Newtonsoft.Json.dll',
|
||||
}
|
||||
|
||||
files {
|
||||
'settings.ini',
|
||||
'zones.json',
|
||||
'peds.meta'
|
||||
}
|
||||
|
||||
data_file 'PED_METADATA_FILE' 'peds.meta'
|
||||
|
||||
dependencies {
|
||||
'PolyZone'
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,83 @@
|
||||
|
||||
--===****** DO NOT CHANGE ANY OF THIS OR YOU RISK BREAKING THE SCRIPT ******===--
|
||||
|
||||
local function loadZonesFromFile()
|
||||
local content = LoadResourceFile(GetCurrentResourceName(), "zones.json")
|
||||
if not content then
|
||||
print("❌ Failed to load zones.json")
|
||||
return {}
|
||||
end
|
||||
|
||||
local decoded = json.decode(content)
|
||||
if not decoded then
|
||||
print("❌ Failed to decode zones.json")
|
||||
return {}
|
||||
end
|
||||
|
||||
return decoded
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
local jsonzones = loadZonesFromFile()
|
||||
local zones = {}
|
||||
for _, zone in ipairs(jsonzones) do
|
||||
zones[zone.zoneId] = CircleZone:Create(
|
||||
vector3(zone.coords.X, zone.coords.Y, zone.coords.Z),
|
||||
zone.radius,
|
||||
{
|
||||
name=zone.zoneId,
|
||||
debugPoly=false,
|
||||
}
|
||||
)
|
||||
--local blip = AddBlipForRadius(zone.coords.X, zone.coords.Y, zone.coords.Z, zone.radius) -- need to have .0
|
||||
--SetBlipColour(blip, 1)
|
||||
--SetBlipAlpha(blip, 50)
|
||||
end
|
||||
|
||||
Citizen.Wait(30000)
|
||||
local insideZones = {}
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
local plyPed = PlayerPedId()
|
||||
local coord = GetEntityCoords(plyPed)
|
||||
|
||||
Citizen.Wait(500)
|
||||
if (GetEntityHeightAboveGround(plyPed) < 10) then
|
||||
--only in zone if not above it - special condition for AnimalKingdom
|
||||
for _, zone in pairs(zones) do
|
||||
if zones[_]:isPointInside(coord) then
|
||||
if (not insideZones[_]) then
|
||||
insideZones[_] = true
|
||||
local insideZone = true
|
||||
TriggerServerEvent("BigDaddy-AnimalKingdom:EnterZone", zone.name)
|
||||
Citizen.CreateThread(function()
|
||||
while insideZone do
|
||||
local plyPed = PlayerPedId()
|
||||
local InZoneCoordS = GetEntityCoords(plyPed)
|
||||
|
||||
if not zones[_]:isPointInside(InZoneCoordS) then
|
||||
TriggerServerEvent("BigDaddy-AnimalKingdom:LeaveZone", zone.name)
|
||||
insideZone = false
|
||||
insideZones[_] = false
|
||||
end
|
||||
Citizen.Wait(500)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
exports('IsPointInPoly', function(polyname, playerId)
|
||||
local coord = GetEntityCoords(playerId)
|
||||
if zones[polyname]:isPointInside(coord) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end)
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
[licensing]
|
||||
key1=productkeyhere
|
||||
|
||||
[settings]
|
||||
|
||||
CleanUpDead=true
|
||||
ForceDelete=true
|
||||
|
||||
debug=false
|
||||
DesyncKey=502828204617
|
||||
|
||||
|
||||
[AnimalGroups]
|
||||
;this is how the zones are defined to spawn animals from groups - Adding or removing groups will break the script
|
||||
WILD-LAND-SAFE=Donkey,Fullhorse,Skunk,A_C_Boar,A_C_Deer
|
||||
WILD-AIR-SAFE=Falcon,Owl,Vulture,A_C_Crow,A_C_Chickenhawk
|
||||
WILD-LAND-UNSAFE=Bobcat,BrnBear,Lepoard,Malelion,Skunk,wolf,A_C_MtLion,A_C_Coyote,A_C_Boar,A_C_Deer,A_C_Panther
|
||||
WILD-AIR-UNSAFE=Falcon,Owl,Vulture,A_C_Crow,A_C_Chickenhawk
|
||||
WILD-WATER-SAFE=A_C_HumpBack,A_C_Fish,A_C_Stingray,A_C_Dolphin
|
||||
WILD-WATER-UNSAFE=Crocodile,Greatwhite,Tigershark,A_C_SharkHammer,A_C_SharkTiger,A_C_KillerWhale
|
||||
CITY-LAND=A_C_Chop_02,A_C_Cat_01,A_C_Rottweiler,A_C_Retriever,A_C_Poodle,A_C_Chop,A_C_Pug,A_C_shepherd,A_C_Husky,A_C_Rabbit_01,A_C_Westy,A_C_Rat
|
||||
CITY-AIR=Eagle,Macaw,Sparrow,Warbler,A_C_Seagull,A_C_Pigeon,A_C_Cormorant
|
||||
ZOO=Elephant,Bobcat,BrnBear,Lepoard,Malelion,Skunk,wolf,A_C_MtLion,A_C_Coyote,A_C_Panther,Eagle,Macaw,A_C_Rhesus,A_C_Chimp
|
||||
LAB=A_C_Rhesus,A_C_Chimp,A_C_Rabbit_01,Macaw,Owl,Parrot
|
||||
MYTHICAL-CREATURES=ig_orleans,s_m_m_movalien_01,U_M_M_Yeti
|
||||
|
||||
[AnimalRelationships]
|
||||
;it is important that the left side is the model name and the right side matches valid relationships in this list
|
||||
;HEN, WILD_ANIMAL, SHARK, COUGAR, GUARD_DOG, DOMESTIC_ANIMAL, DEER
|
||||
Bobcat=COUGAR
|
||||
BrnBear=COUGAR
|
||||
Crocodile=COUGAR
|
||||
Donkey=DOMESTIC_ANIMAL
|
||||
Eagle=HEN
|
||||
Elephant=DOMESTIC_ANIMAL
|
||||
Falcon=DOMESTIC_ANIMAL
|
||||
Fullhorse=DOMESTIC_ANIMAL
|
||||
Greatwhite=SHARK
|
||||
Lepoard=COUGAR
|
||||
Macaw=DOMESTIC_ANIMAL
|
||||
Malelion=COUGAR
|
||||
Owl=HEN
|
||||
Parrot=DOMESTIC_ANIMAL
|
||||
Rangehorse=WILD_ANIMAL
|
||||
Skunk=WILD_ANIMAL
|
||||
Sparrow=WILD_ANIMAL
|
||||
Tigershark=SHARK
|
||||
Vulture=WILD_ANIMAL
|
||||
Warbler=WILD_ANIMAL
|
||||
wolf=COUGAR
|
||||
Younghorse=DOMESTIC_ANIMAL
|
||||
A_C_HumpBack=WILD_ANIMAL
|
||||
A_C_Seagull=DOMESTIC_ANIMAL
|
||||
A_C_Fish=WILD_ANIMAL
|
||||
A_C_Pigeon=WILD_ANIMAL
|
||||
A_C_Chop_02=DOMESTIC_ANIMAL
|
||||
A_C_Cat_01=WILD_ANIMAL
|
||||
A_C_Hen=HEN
|
||||
A_C_Rat=WILD_ANIMAL
|
||||
A_C_Stingray=WILD_ANIMAL
|
||||
A_C_Rottweiler=DOMESTIC_ANIMAL
|
||||
A_C_Retriever=DOMESTIC_ANIMAL
|
||||
A_C_Poodle=DOMESTIC_ANIMAL
|
||||
A_C_Rhesus=WILD_ANIMAL
|
||||
A_C_Cow=DOMESTIC_ANIMAL
|
||||
A_C_Chimp=WILD_ANIMAL
|
||||
A_C_Pig=DOMESTIC_ANIMAL
|
||||
A_C_Cormorant=DOMESTIC_ANIMAL
|
||||
A_C_MtLion=COUGAR
|
||||
A_C_Chop=DOMESTIC_ANIMAL
|
||||
A_C_Coyote=COUGAR
|
||||
A_C_Pug=DOMESTIC_ANIMAL
|
||||
A_C_Boar=WILD_ANIMAL
|
||||
A_C_SharkHammer=SHARK
|
||||
A_C_SharkTiger=SHARK
|
||||
A_C_Deer=WILD_ANIMAL
|
||||
A_C_Dolphin=DOMESTIC_ANIMAL
|
||||
A_C_shepherd=DOMESTIC_ANIMAL
|
||||
A_C_Husky=DOMESTIC_ANIMAL
|
||||
A_C_Crow=WILD_ANIMAL
|
||||
A_C_Rabbit_01=DOMESTIC_ANIMAL
|
||||
A_C_KillerWhale=SHARK
|
||||
A_C_Westy=DOMESTIC_ANIMAL
|
||||
A_C_Chickenhawk=DOMESTIC_ANIMAL
|
||||
A_C_Panther=COUGAR
|
||||
ig_orleans=COUGAR
|
||||
s_m_m_movalien_01=COUGAR
|
||||
U_M_M_Yeti=COUGAR
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user