forked from Simnation/Main
Update client.lua
This commit is contained in:
parent
fd9adb7a96
commit
3c3d6999c7
1 changed files with 138 additions and 4 deletions
|
@ -1,8 +1,142 @@
|
|||
local cayoCoords = vector3(4840.571, -5174.425, 0.0)
|
||||
|
||||
-- Lade alle notwendigen IPLs für Cayo Perico
|
||||
local function LoadAllCayoIPLs()
|
||||
-- Hauptinsel IPLs
|
||||
RequestIpl("h4_mph4_terrain_01_grass_0")
|
||||
RequestIpl("h4_mph4_terrain_01_grass_1")
|
||||
RequestIpl("h4_mph4_terrain_02_grass_0")
|
||||
RequestIpl("h4_mph4_terrain_02_grass_1")
|
||||
RequestIpl("h4_mph4_terrain_02_grass_2")
|
||||
RequestIpl("h4_mph4_terrain_02_grass_3")
|
||||
RequestIpl("h4_mph4_terrain_04_grass_0")
|
||||
RequestIpl("h4_mph4_terrain_04_grass_1")
|
||||
RequestIpl("h4_mph4_terrain_05_grass_0")
|
||||
RequestIpl("h4_mph4_terrain_06_grass_0")
|
||||
RequestIpl("h4_islandx_terrain_01")
|
||||
RequestIpl("h4_islandx_terrain_02")
|
||||
RequestIpl("h4_islandx_terrain_03")
|
||||
RequestIpl("h4_islandx_terrain_04")
|
||||
RequestIpl("h4_islandx_terrain_05")
|
||||
RequestIpl("h4_islandx_terrain_06")
|
||||
RequestIpl("h4_islandx_terrain_props_05_a")
|
||||
RequestIpl("h4_islandx_terrain_props_05_b")
|
||||
RequestIpl("h4_islandx_terrain_props_05_c")
|
||||
RequestIpl("h4_islandx_terrain_props_05_d")
|
||||
RequestIpl("h4_islandx_terrain_props_05_e")
|
||||
RequestIpl("h4_islandx_terrain_props_05_f")
|
||||
RequestIpl("h4_mph4_terrain_01")
|
||||
RequestIpl("h4_mph4_terrain_02")
|
||||
RequestIpl("h4_mph4_terrain_03")
|
||||
RequestIpl("h4_mph4_terrain_04")
|
||||
RequestIpl("h4_mph4_terrain_05")
|
||||
RequestIpl("h4_mph4_terrain_06")
|
||||
RequestIpl("h4_islandx_terrain_01_lod")
|
||||
RequestIpl("h4_islandx_terrain_02_lod")
|
||||
RequestIpl("h4_islandx_terrain_03_lod")
|
||||
RequestIpl("h4_islandx_terrain_04_lod")
|
||||
RequestIpl("h4_islandx_terrain_05_lod")
|
||||
RequestIpl("h4_islandx_terrain_06_lod")
|
||||
RequestIpl("h4_mph4_terrain_01_lod")
|
||||
RequestIpl("h4_mph4_terrain_02_lod")
|
||||
RequestIpl("h4_mph4_terrain_03_lod")
|
||||
RequestIpl("h4_mph4_terrain_04_lod")
|
||||
RequestIpl("h4_mph4_terrain_05_lod")
|
||||
RequestIpl("h4_mph4_terrain_06_lod")
|
||||
|
||||
-- Hauptgebäude und Strukturen
|
||||
RequestIpl("h4_islandairstrip")
|
||||
RequestIpl("h4_islandairstrip_props")
|
||||
RequestIpl("h4_islandx_mansion")
|
||||
RequestIpl("h4_islandx_mansion_props")
|
||||
RequestIpl("h4_islandx_props")
|
||||
RequestIpl("h4_islandxdock")
|
||||
RequestIpl("h4_islandxdock_props")
|
||||
RequestIpl("h4_islandxdock_props_2")
|
||||
RequestIpl("h4_islandxtower")
|
||||
RequestIpl("h4_islandx_maindock")
|
||||
RequestIpl("h4_islandx_maindock_props")
|
||||
RequestIpl("h4_islandx_maindock_props_2")
|
||||
RequestIpl("h4_IslandX_Mansion_Vault")
|
||||
RequestIpl("h4_islandairstrip_propsb")
|
||||
RequestIpl("h4_beach")
|
||||
RequestIpl("h4_beach_props")
|
||||
RequestIpl("h4_beach_bar_props")
|
||||
RequestIpl("h4_islandx_barrack_props")
|
||||
RequestIpl("h4_islandx_checkpoint")
|
||||
RequestIpl("h4_islandx_checkpoint_props")
|
||||
RequestIpl("h4_islandx_Mansion_B")
|
||||
RequestIpl("h4_islandx_Mansion_B_Side_B")
|
||||
RequestIpl("h4_islandx_Mansion_B_Side_C")
|
||||
RequestIpl("h4_islandx_Mansion_B_Side_Guardhut")
|
||||
RequestIpl("h4_islandx_Mansion_Lights")
|
||||
RequestIpl("h4_islandx_Mansion_Vault")
|
||||
RequestIpl("h4_islandx_Mansion_Vault_Lod")
|
||||
RequestIpl("h4_mph4_island")
|
||||
RequestIpl("h4_mph4_island_long_0")
|
||||
RequestIpl("h4_mph4_island_strm_0")
|
||||
|
||||
-- Wasser und Umgebung
|
||||
RequestIpl("h4_islandx_sea_mines")
|
||||
RequestIpl("h4_mph4_island_placement")
|
||||
RequestIpl("h4_aa_guns")
|
||||
RequestIpl("h4_aa_guns_lod")
|
||||
RequestIpl("h4_island_padlock")
|
||||
RequestIpl("h4_islandairstrip_doorsclosed")
|
||||
RequestIpl("h4_Underwater_Gate_Closed")
|
||||
|
||||
-- Erweitere die Weltgrenzen
|
||||
ExtendWorldBoundaryForPlayer(-5000.0, -7000.0, 7000.0, -2000.0)
|
||||
|
||||
-- Setze Map Zoom Data für bessere Sicht
|
||||
SetMapZoomDataLevel(0, 0.96, 0.9, 0.08, 0.0, 0.0)
|
||||
SetMapZoomDataLevel(1, 1.6, 0.9, 0.08, 0.0, 0.0)
|
||||
SetMapZoomDataLevel(2, 8.6, 0.9, 0.08, 0.0, 0.0)
|
||||
SetMapZoomDataLevel(3, 12.3, 0.9, 0.08, 0.0, 0.0)
|
||||
SetMapZoomDataLevel(4, 22.3, 0.9, 0.08, 0.0, 0.0)
|
||||
SetMapZoomDataLevel(5, 55.0, 0.9, 0.08, 0.0, 0.0)
|
||||
|
||||
-- Erstelle Blip für Cayo Perico
|
||||
local blip = AddBlipForCoord(cayoCoords)
|
||||
SetBlipSprite(blip, 681) -- Insel-Icon
|
||||
SetBlipDisplay(blip, 4)
|
||||
SetBlipScale(blip, 0.9)
|
||||
SetBlipColour(blip, 2) -- Grün
|
||||
SetBlipAsShortRange(blip, true)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentString("Cayo Perico")
|
||||
EndTextCommandSetBlipName(blip)
|
||||
|
||||
print("^2[CayoMap]^7 Alle Cayo Perico IPLs geladen!")
|
||||
end
|
||||
|
||||
-- Hauptthread
|
||||
CreateThread(function()
|
||||
Wait(2000)
|
||||
LoadAllCayoIPLs()
|
||||
|
||||
-- Erweitere die Welt-Grenzen permanent
|
||||
ExtendWorldBoundaryForPlayer(-4000.0, -6500.0, 6500.0, -3000.0)
|
||||
|
||||
print("^2[CayoMap]^7 Cayo Perico zur Pausemap hinzugefügt!")
|
||||
-- Kontinuierliche Überprüfung für die Pausemap
|
||||
while true do
|
||||
Wait(1000)
|
||||
if IsPauseMenuActive() then
|
||||
-- Stelle sicher, dass die erweiterten Grenzen aktiv sind
|
||||
ExtendWorldBoundaryForPlayer(-5000.0, -7000.0, 7000.0, -2000.0)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Beim Spieler-Login
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadAllCayoIPLs()
|
||||
end)
|
||||
|
||||
-- Füge einen Befehl hinzu, um die Map neu zu laden
|
||||
RegisterCommand('reloadcayomap', function()
|
||||
LoadAllCayoIPLs()
|
||||
TriggerEvent('chat:addMessage', {
|
||||
color = {0, 255, 0},
|
||||
multiline = true,
|
||||
args = {"System", "Cayo Perico Map neu geladen!"}
|
||||
})
|
||||
end, false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue