Advertisement
davedumas0

fiveM-bunkers.lua[updated 8-21-2017]

Aug 14th, 2017
706
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 35.68 KB | None | 0 0
  1. local bunkerModel = 1696520608
  2. -- Credit : Ideo
  3.  
  4. --------------------------------------------------------------------------------------------------------------------
  5. -- Graphic Functions
  6. --------------------------------------------------------------------------------------------------------------------
  7. local options = {
  8.     x = 0.1,
  9.     y = 0.2,
  10.     width = 0.2,
  11.     height = 0.04,
  12.     scale = 0.4,
  13.     font = 0,
  14.     menu_title = "Model Menu",
  15.     menu_subtitle = "Categories",
  16.     color_r = 30,
  17.     color_g = 144,
  18.     color_b = 255,
  19. }
  20.  
  21.  
  22.  
  23. function Notify(text)
  24.     SetNotificationTextEntry('STRING')
  25.     AddTextComponentString(text)
  26.     DrawNotification(false, false)
  27. end
  28.  
  29. function drawTxt(x,y ,width,height,scale, text, r,g,b,a, outline)
  30.     SetTextFont(0)
  31.     SetTextProportional(0)
  32.     SetTextScale(scale, scale)
  33.     SetTextColour(r, g, b, a)
  34.     SetTextDropShadow(0, 0, 0, 0,255)
  35.     SetTextEdge(1, 0, 0, 0, 255)
  36.     SetTextDropShadow()
  37.     if(outline)then
  38.         SetTextOutline()
  39.     end
  40.     SetTextEntry("STRING")
  41.     AddTextComponentString(text)
  42.     DrawText(x - width/2, y - height/2 + 0.005)
  43. end
  44.  
  45. function DisplayHelpText(str)
  46.     SetTextComponentFormat("STRING")
  47.     AddTextComponentString(str)
  48.     DisplayHelpTextFromStringLabel(0, 0, 1, -1)
  49. end
  50. Keys = {
  51.     ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
  52.     ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
  53.     ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
  54.     ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
  55.     ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
  56.     ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
  57.     ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
  58.     ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
  59.     ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
  60. }
  61.  
  62.  
  63.  
  64. Menu = {}
  65. Menu.GUI = {}
  66. Menu.buttonCount = 0
  67. Menu.selection = 0
  68. Menu.hidden = true
  69. MenuTitle = "Menu"
  70.  
  71. function Menu.addButton(name, func,args)
  72.  
  73.     local yoffset = 0.3
  74.     local xoffset = 0
  75.     local xmin = 0.0
  76.     local xmax = 0.2
  77.     local ymin = 0.05
  78.     local ymax = 0.05
  79.     Menu.GUI[Menu.buttonCount+1] = {}
  80.     Menu.GUI[Menu.buttonCount+1]["name"] = name
  81.     Menu.GUI[Menu.buttonCount+1]["func"] = func
  82.     Menu.GUI[Menu.buttonCount+1]["args"] = args
  83.     Menu.GUI[Menu.buttonCount+1]["active"] = false
  84.     Menu.GUI[Menu.buttonCount+1]["xmin"] = xmin + xoffset
  85.     Menu.GUI[Menu.buttonCount+1]["ymin"] = ymin * (Menu.buttonCount + 0.01) +yoffset
  86.     Menu.GUI[Menu.buttonCount+1]["xmax"] = xmax
  87.     Menu.GUI[Menu.buttonCount+1]["ymax"] = ymax
  88.     Menu.buttonCount = Menu.buttonCount+1
  89. end
  90.  
  91.  
  92. function Menu.updateSelection()
  93.     if IsControlJustPressed(1, Keys["DOWN"]) then
  94.         if(Menu.selection < Menu.buttonCount -1 ) then
  95.             Menu.selection = Menu.selection +1
  96.         else
  97.             Menu.selection = 0
  98.         end    
  99.         PlaySound(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1)
  100.     elseif IsControlJustPressed(1, Keys["TOP"]) then
  101.         if(Menu.selection > 0)then
  102.             Menu.selection = Menu.selection -1
  103.         else
  104.             Menu.selection = Menu.buttonCount-1
  105.         end
  106.         PlaySound(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1)
  107.     elseif IsControlJustPressed(1, Keys["NENTER"])  then
  108.         MenuCallFunction(Menu.GUI[Menu.selection +1]["func"], Menu.GUI[Menu.selection +1]["args"])
  109.         PlaySound(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1)
  110.     --elseif IsControlJustPressed(1, Keys["BACKSPACE"])  then
  111.     --      MenuCallFunction(Menu.GUI[Menu.selection -1]["func"], Menu.GUI[Menu.selection -1]["args"])
  112.     --      PlaySound(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1)
  113.     end
  114.     local iterator = 0
  115.     for id, settings in ipairs(Menu.GUI) do
  116.         Menu.GUI[id]["active"] = false
  117.         if(iterator == Menu.selection ) then
  118.             Menu.GUI[iterator +1]["active"] = true
  119.         end
  120.         iterator = iterator +1
  121.     end
  122. end
  123.  
  124. function Menu.renderGUI(options)
  125.     if not Menu.hidden then
  126.         Menu.renderButtons(options)
  127.         Menu.updateSelection()
  128.     end
  129. end
  130.  
  131. function Menu.renderBox(xMin,xMax,yMin,yMax,color1,color2,color3,color4)
  132.     DrawRect(xMin, yMin,xMax, yMax, color1, color2, color3, color4);
  133. end
  134.  
  135. function Menu:setTitle(options)
  136.     SetTextFont(1)
  137.     SetTextProportional(0)
  138.     SetTextScale(1.0, 1.0)
  139.     SetTextColour(255, 255, 255, 255)
  140.     SetTextDropShadow(0, 0, 0, 0,255)
  141.     SetTextEdge(1, 0, 0, 0, 255)
  142.     SetTextDropShadow()
  143.     SetTextOutline()
  144.     SetTextCentre(1)
  145.     SetTextEntry("STRING")
  146.     AddTextComponentString(options.menu_title)
  147.     DrawText(options.x, options.y)
  148. end
  149.  
  150. function Menu:setSubTitle(options)
  151.     SetTextFont(2)
  152.     SetTextProportional(0)
  153.     SetTextScale(options.scale +0.1, options.scale +0.1)
  154.     SetTextColour(255, 255, 255, 255)
  155.     SetTextEntry("STRING")
  156.     AddTextComponentString(options.menu_subtitle)
  157.     DrawRect(options.x,(options.y +0.08),options.width,options.height,options.color_r,options.color_g,options.color_b,150)
  158.     DrawText(options.x - options.width/2 + 0.005, (options.y+ 0.08) - options.height/2 + 0.0028)
  159.  
  160.     SetTextFont(0)
  161.     SetTextProportional(0)
  162.     SetTextScale(options.scale, options.scale)
  163.     SetTextColour(255, 255, 255, 255)
  164.     SetTextDropShadow(0, 0, 0, 0,255)
  165.     SetTextEdge(1, 0, 0, 0, 255)
  166.     SetTextDropShadow()
  167.     SetTextOutline()
  168.     SetTextCentre(0)
  169.     SetTextEntry("STRING")
  170.     AddTextComponentString(options.rightText)
  171.     DrawText((options.x + options.width/2 - 0.0385) , options.y + 0.067)
  172. end
  173.  
  174. function Menu:drawButtons(options)
  175.     local y = options.y + 0.12
  176.  
  177.     for id, settings in pairs(Menu.GUI) do
  178.         SetTextFont(0)
  179.         SetTextProportional(0)
  180.         SetTextScale(options.scale, options.scale)
  181.         if(settings["active"]) then
  182.             SetTextColour(0, 0, 0, 255)
  183.         else
  184.             SetTextColour(255, 255, 255, 255)
  185.         end
  186.         SetTextCentre(0)
  187.         SetTextEntry("STRING")
  188.         AddTextComponentString(settings["name"])
  189.         if(settings["active"]) then
  190.             DrawRect(options.x,y,options.width,options.height,255,255,255,255)
  191.         else
  192.             DrawRect(options.x,y,options.width,options.height,0,0,0,150)
  193.         end
  194.         DrawText(options.x - options.width/2 + 0.005, y - 0.04/2 + 0.0028)
  195.         y = y + 0.04
  196.     end
  197. end
  198.  
  199. function Menu.renderButtons(options)
  200.  
  201.     Menu:setTitle(options)
  202.     Menu:setSubTitle(options)
  203.     Menu:drawButtons(options)
  204.  
  205. end
  206.  
  207. --------------------------------------------------------------------------------------------------------------------
  208.  
  209. function ClearMenu()
  210.     --Menu = {}
  211.     Menu.GUI = {}
  212.     Menu.buttonCount = 0
  213.     Menu.selection = 0
  214. end
  215.  
  216. function MenuCallFunction(fnc, arg)
  217.     _G[fnc](arg)
  218. end
  219.  
  220.  
  221. function Main()
  222.     DisplayHelpText("Use ~INPUT_CELLPHONE_UP~ ~INPUT_CELLPHONE_DOWN~ to ~y~move~w~ and ~y~Enter~w~ to ~r~select")
  223.     Notify("Press ~r~F5 ~w~to ~g~open~w~/~r~close~w~!")
  224.     options.menu_title = "things"
  225.     options.menu_subtitle = "and stuff"
  226.     ClearMenu()
  227.     Menu.addButton("unload_rl_01_amy_skater_01", "things1", nil)
  228.     Menu.addButton("unload_rl_02_amy_skater_01", "things2", nil)
  229.     Menu.addButton("operate_01_amy_skater_01", "things3", nil)
  230.     Menu.addButton("operate_02_amy_skater_01","things4",nil)
  231.     Menu.addButton("operate_03_amy_skater_01", "things5", nil)
  232.     Menu.addButton("reachout_amy_skater_01", "things6", nil)
  233. end
  234.  
  235.  
  236. --[[
  237.  animations =
  238. {
  239. {"ANIM@AMB@OFFICE@BOARDROOM@CREW@FEMALE@VAR_A@BASE@"}, {"ANIM@AMB@OFFICE@BOARDROOM@CREW@MALE@VAR_A@BASE@"}, {"ANIM@AMB@OFFICE@BOARDROOM@CREW@FEMALE@VAR_b@BASE@"}, {"ANIM@AMB@OFFICE@BOARDROOM@CREW@MALE@VAR_b@BASE@"}, {"ANIM@AMB@OFFICE@BOARDROOM@CREW@FEMALE@VAR_C@BASE@"},
  240. {"ANIM@AMB@OFFICE@BOARDROOM@CREW@MALE@VAR_C@BASE@"},
  241. {"ANIM@AMB@CLUBHOUSE@BOARDROOM@BOSS@FEMALE@BASE@"},
  242. {"ANIM@AMB@CLUBHOUSE@BOARDROOM@BOSS@MALE@BASE@"},
  243. {"anim@AMB@OFFICE@LAPTOPS@FEMALE@VAR_A@BASE@", "IDLE_A"},
  244. {"anim@AMB@OFFICE@LAPTOPS@FEMALE@VAR_A@BASE@", "IDLE_B"},
  245. {"anim@AMB@OFFICE@LAPTOPS@FEMALE@VAR_A@BASE@", "IDLE_C"}
  246. {"anim@AMB@OFFICE@LAPTOPS@FEMALE@VAR_A@BASE@", "BASE"},
  247. }
  248. --]]
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256. ------------------------------------------------------------------------
  257. --------------------------bunker map blips------------------------------
  258. ------------------------------------------------------------------------
  259.  ownBunker = true
  260.  
  261. local bunkerCoords = {
  262.   {n = 1, x=-3058.714, y=3329.19, z=12.5844},
  263.   {n = 2, x=24.43542, y=2959.705, z=58.35517},
  264.   {n = 3, x=481.0465, y=2995.135, z=43.96672},
  265.   {n = 4, x=848.6175, y=2996.567, z=45.81612},
  266.   {n = 5, x=2126.785, y=3335.04, z=48.21422},
  267.   {n = 6, x=2493.654, y=3140.399, z=51.28789},
  268.   {n = 7, x=1823.961, y=4708.14, z=42.4991},
  269.   {n = 8, x=-783.0755, y=5934.686, z=24.31475},
  270.   {n = 9, x=-3180.466, y=1374.192, z=19.9597},
  271.   {n = 10, x=-783.0755, y=5934.686, z=24.31475},
  272.   {n = 11, x=1570.372, y=2254.549, z=78.89397},
  273.   {n = 12, x=-391.3216, y=4363.728, z=58.65862}
  274. }
  275. local bunkerSet = "standard_bunker_set"
  276. local bunkerSetPrintPress = "counterfeit_standard_equip"
  277. local bunkerSetInterior = "interior_basic"
  278. local bunkerSetMeth = "meth_lab_basic"
  279. local bunkerSetCoke = "coke_cut_01"
  280. local bunkerSetWeed = "weed_growtha_stage1"
  281.  
  282.  
  283. -----------------------------------------------------------------------
  284. --------------------load bunker interior and doors---------------------
  285. -----------------------------------------------------------------------
  286. function LoadBunkers()
  287.   -- Interiors
  288.   RequestIpl("grdlc_int_01_shell")
  289.   RequestIpl("gr_grdlc_int_01")
  290.   RequestIpl("gr_grdlc_int_02")
  291.   RequestIpl("gr_entrance_placement")
  292.   RequestIpl("gr_grdlc_interior_placement")
  293.   RequestIpl("gr_grdlc_interior_placement_interior_0_grdlc_int_01_milo_")
  294.   RequestIpl("gr_grdlc_interior_placement_interior_1_grdlc_int_02_milo_")
  295.   -- Outside
  296.   RequestIpl("gr_case0_bunkerclosed")
  297.   RequestIpl("gr_case1_bunkerclosed")
  298.   RequestIpl("gr_case2_bunkerclosed")
  299.   RequestIpl("gr_case3_bunkerclosed")
  300.   RequestIpl("gr_case4_bunkerclosed")
  301.   RequestIpl("gr_case5_bunkerclosed")
  302.   RequestIpl("gr_case6_bunkerclosed")
  303.   RequestIpl("gr_case7_bunkerclosed")
  304.   RequestIpl("gr_case9_bunkerclosed")
  305.   RequestIpl("gr_case10_bunkerclosed")
  306.   RequestIpl("gr_case11_bunkerclosed")  
  307. end
  308. local a = nil
  309. --local bunkerInterior = GetInteriorFromEntity(a)
  310. local bunkerRoomKey = GetRoomKeyFromEntity(a)
  311.  
  312. Citizen.CreateThread(function()
  313.   for _, item in pairs(bunkerCoords) do
  314.     Citizen.Trace("Adding coords\n")
  315.     item.blip = AddBlipForCoord(item.x, item.y, item.z)
  316.     SetBlipSprite(item.blip, 350)
  317.     SetBlipAsShortRange(item.blip, false)
  318.     BeginTextCommandSetBlipName("STRING")
  319.     AddTextComponentString("Bunker")
  320.     EndTextCommandSetBlipName(item.blip)
  321.   end
  322.   LoadBunkers()
  323.   rmky = GetKeyForEntityInRoom(PlayerPedId())
  324. end)
  325.  
  326. Citizen.CreateThread(function()
  327.      temp0 = GetPlayerPed(-1)
  328.      temp1 = 0
  329.      index = tostring(temp1)
  330.      players = {}
  331.      while temp1 <=5 do
  332.       Citizen.Wait(0)
  333.       temp2 = IntToPlayerindex(temp1)    
  334.        if GetPlayerPed(temp2) ~= temp0 then          
  335.        end             
  336.        if DoesEntityExist(GetPlayerPed(temp2)) then    
  337.         name = GetPlayerName(temp2)
  338.         index = tostring(temp2)
  339.         players[index] = name
  340.        else
  341.        name = GetPlayerName(temp2)     
  342.        end     
  343.       temp1 = temp1+1              
  344.        
  345.          --playerIndex1 = temp2
  346.         -- playerName1 = name      
  347.       if temp1 >= 5 then
  348.         temp1 = 0
  349.       end
  350.      end
  351.      if not name == GetPlayerName(PlayerId()) then
  352.       name2 = name
  353.       playerIndex1 = temp2
  354.      end
  355.      if GetInteriorFromEntity(GetPlayerPed(temp2)) == 258561 then
  356.       temp3 = temp2
  357.      end             
  358. end)
  359.  
  360. -----------------------------------------------------------------------------
  361. --------------------------marker creation------------------------------------
  362. -----------------------------------------------------------------------------
  363. --this draws all the markers on the ground
  364. function createMarker()
  365.   Citizen.CreateThread(function()
  366.     players = {}  
  367.     while true do
  368.       Citizen.Wait(0)
  369.  
  370.     bunkerInterior = GetInteriorAtCoordsWithType(938.3077, -3196.112, -100.0,"gr_grdlc_int_02")
  371.     interiorValid = IsValidInterior(bunkerInterior)
  372.     if not rmky == 0 then
  373.         --ForceRoomForEntity(PlayerPedId(), rmky)
  374.     end
  375.    
  376.     --this does nothing ATM
  377.  
  378.     DrawMarker(1, 888.4329, -3206.185, -99.1861, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, 2.5, 2.5, 2.5, 200, 233, 0, 150, 0, 0, 2, 0, 0, 0, false )
  379.     --this draws the enter marker
  380.       DrawMarker(1, -3153.622, 1376.978, 16.193, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.52, 255, 255, 0, 150, 0, 0, 2, 0, 0, 0, false )
  381.     --this draws the exit marker
  382.       DrawMarker(1, 894.797, -3244.699, -98.258, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.52, 255, 255, 0, 150, 0, 0, 2, 0, 0, 0, false )
  383.         if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1), false), 894.797, -3244.699, -98.258) < 1.0 and IsControlPressed(0, 38) then
  384.           if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then    
  385.             SetEntityCoords(GetVehiclePedIsIn(PlayerPedId(), false), -3145.574, 1374.651, 18.46523)
  386.             ForceRoomForEntity(GetVehiclePedIsIn(PlayerPedId(), false), 258561, -995756533)
  387.            else
  388.             SetEntityCoords(GetPlayerPed(-1), -3145.574, 1374.651, 18.46523)
  389.             ForceRoomForEntity(PlayerPedId(), 258561, -1116396409)
  390.            end
  391.        end     
  392.       --this draws the marker to enter the "MOC"
  393.       DrawMarker(1, 848.4579, -3242.338, -99.69917, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.52, 0, 255, 255, 150, 0, 0, 2, 0, 0, 0, false )
  394.       if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1), true), 848.4579, -3242.338, -99.69917) < 5.8 and IsControlPressed(0, 38) then
  395.         SetEntityCoords(GetPlayerPed(-1), 1103.5620, -3000.00, -40.00)
  396.       end
  397.       --this draws the marker to return to bunker from the "MOC"
  398.           DrawMarker(1, 1102.645, -2986.465, -39.99833, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.52, 0, 255, 255, 150, 0, 0, 2, 0, 0, 0, false )
  399.       if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1), true), 1102.645, -2986.465, -38.99833) < 3.8 and IsControlPressed(0, 38) then
  400.         SetEntityCoords(GetPlayerPed(-1), -3153.622, 1376.978, 16.193)
  401.         if not IsInteriorReady(258561)then
  402.          --SetNetworkIdSyncToPlayer(1, 0, 0)
  403.         end
  404.         -- Citizen.Wait(1)
  405.         SetEntityCoords(GetPlayerPed(-1), 885.982, -3245.716, -98.278)
  406.         --SetNetworkIdExistsOnAllMachines(PlayerPedId(), 0)
  407.         --SetEntityVisible(GetPlayerPed(-1), false, 0)
  408.  
  409.       end
  410.       --this requests the sounds for the bunker door
  411.       if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1), true), -3153.622, 1376.978, 16.193) < 5.8  then
  412.       RequestStreamedScript("Door_Open_Long", "DLC_GR_Bunker_Door_Sounds")
  413.         LoadStream("Door_Open_Long", "DLC_GR_Bunker_Door_Sounds")
  414.        
  415.       end
  416.        rmky = GetRoomKeyFromEntity(PlayerPedId())
  417.        interiorID = GetInteriorFromEntity(GetPlayerPed(-1))
  418.        --if player in close to the marker it will tp player into the bunker and start the animation
  419.       if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1), true), -3153.622, 1376.978, 16.193) < 5.8 and IsControlPressed(0, 38) then
  420.         PlayStreamFrontend()
  421.         PlaySoundFrontend(-1, "Door_Open_Long", "DLC_GR_Bunker_Door_Sounds", 1)
  422.         enterAnim = true
  423.         Citizen.Wait(0)
  424.       if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then        
  425.         TaskVehicleDriveToCoord(GetPlayerPed(-1), GetVehiclePedIsIn(PlayerPedId(), false), -3188.031, 1373.702, 16.806, 3.0, 1.0, GetHashKey(GetEntityModel(GetVehiclePedIsIn(PlayerPedId(), false))), 16777216, 17.0, false)
  426.       else
  427.         TaskGoStraightToCoord(PlayerPedId(), -3188.031, 1373.702, 16.806, 1.0, 8000, 88.617, 0.0)
  428.       end
  429.         Citizen.Wait(8000)
  430.          DoScreenFadeOut(1000)
  431.         Citizen.Wait(1000)
  432.       end
  433.     end
  434.   end)
  435. end
  436.  
  437. createMarker()
  438.     EnableInteriorProp(258561,"standard_bunker_set")
  439.     EnableInteriorProp(258561,"Bunker_Style_C")
  440.     EnableInteriorProp(258561,"Office_Upgrade_set")
  441.     EnableInteriorProp(258561,"Gun_schematic_set")
  442.     EnableInteriorProp(258561,"security_upgrade")
  443.     EnableInteriorProp(258561,"gun_range_lights")
  444.     EnableInteriorProp(258561,"gun_locker_upgrade")
  445.     RefreshInterior(258561)  
  446.  
  447. Citizen.CreateThread(function()
  448. ----------------------------------------------------------------------------
  449. ----------------------------cutscene stuff 1--------------------------------
  450. -----------------------------(spawn stuff)----------------------------------
  451.     while true do
  452.      Citizen.Wait(0)
  453.  
  454.     if DoesObjectOfTypeExistAtCoords(-3153.622, 1376.978, 16.193, 50.0, 913755451, 0, 1, 0) and enterAnim == true then
  455.        bunkerClosedDoor = GetClosestObjectOfType(-3153.622, 1376.978, 16.193, 50.0, 913755451, 0, 1, 0)
  456.          SetEntityAlpha(bunkerClosedDoor,0, true)
  457.          FreezeEntityPosition(bunkerClosedDoor, true)
  458.          SetEntityCollision(bunkerClosedDoor, false, true)
  459.        bunkerRotaion = GetEntityRotation(bunkerClosedDoor, 2, 1)
  460.          bunkerRotaionX = bunkerRotaion.x
  461.          bunkerRotaionY = bunkerRotaion.y
  462.          bunkerRotaionZ = bunkerRotaion.z
  463.          bunkerClosedDoorCoords = GetEntityCoords(bunkerClosedDoor)
  464.          bunkerClosedDoorCoordsX = bunkerClosedDoorCoords.x
  465.          bunkerClosedDoorCoordsY = bunkerClosedDoorCoords.y
  466.          bunkerClosedDoorCoordsZ = bunkerClosedDoorCoords.z
  467.          bunkerHeading = GetEntityHeading(bunkerClosedDoor)
  468.          RequestModel(-1855746761)
  469.          bunkerDoorBottom = CreateObjectNoOffset(-1855746761, bunkerClosedDoorCoordsX, bunkerClosedDoorCoordsY, bunkerClosedDoorCoordsZ)       
  470.           SetEntityRotation(bunkerDoorBottom, bunkerClosedDoorCoordsX, bunkerClosedDoorCoordsY, bunkerClosedDoorCoordsZ, 2, true)
  471.           SetEntityHeading(bunkerDoorBottom, bunkerHeading)      
  472.         bunkerDoorBottomCoords = GetEntityCoords(bunkerDoorBottom)
  473.          bunkerDoorBottomCoordsX = bunkerDoorBottomCoords.x
  474.          bunkerDoorBottomCoordsY = bunkerDoorBottomCoords.y
  475.          bunkerDoorBottomCoordsZ = bunkerDoorBottomCoords.z
  476.          bunkerDoorBottomRot = GetEntityRotation(bunkerDoorBottom, 2, 1)
  477.          bunkerDoorBottomRotX = bunkerDoorBottomRot.x
  478.          bunkerDoorBottomRotY = bunkerDoorBottomRot.y
  479.          bunkerDoorBottomRotZ = bunkerDoorBottomRot.z
  480.          bunkerDoorBottomHeading = GetEntityHeading(bunkerDoorBottom)
  481.  
  482.     end
  483. -----------------------------------------------------------------------
  484. --------------------------cutscene stuff 2-----------------------------
  485. ---------------------------(camera stuff)------------------------------
  486.     --this creates the cut scene cam
  487.     if enterAnim == true then  
  488.     bunkerEnterCam = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1)
  489.       SetCamParams(bunkerEnterCam, -3168.725, 1372.125, 17.90084, -0.6113692, -0.7532815, 52.60472, 50.0, 0, 1, 1, 2)
  490.       -- this is the 1st position of the cut scene cam
  491.       SetGameplayCamRelativeHeading(-140.1253)
  492.       SetCamActive(bunkerEnterCam, true)
  493.     RenderScriptCams(true, 0, 1000, 1, 0, 0)
  494.    
  495.     bunkerDoorTop = CreateObjectNoOffset(-884803471, -3191.19, 1373.341, 17.5628)
  496.     SetEntityHeading(bunkerDoorTop, GetEntityHeading(bunkerDoorBottom))
  497.       entityRot1 = GetEntityRotation(bunkerDoorTop, 2, 1)
  498.       entityRotX = entityRot1.x
  499.       entityRotY = entityRot1.y
  500.       entityRotZ = entityRot1.z
  501.  
  502.       --this sets the door top to closed position/rotation
  503.       SetEntityRotation(bunkerDoorTop, entityRotX, entityRotY +20, entityRotZ, 2, 1)
  504.       --this is supposed to move the bunker door top like an animation from closed to open
  505.        bunkerMove = 0
  506.  
  507.        Citizen.Wait(100)
  508.        -- this adds 1 to the variable that will subtract from the bunker boor top's rotation Y axis
  509.  ----------------------------------------------------------------------------------------------------
  510. ---------------------------------------bunker door animation-----------------------------------------
  511. -----------------------------------------------------------------------------------------------------
  512.       while bunkerMove < 20 do      
  513.         SetEntityRotation(bunkerDoorTop, entityRotX, entityRotY +20 - bunkerMove, entityRotZ, 2, 1)
  514.        bunkerMove = bunkerMove + 1
  515.         Citizen.Wait(100)      
  516.       end
  517.       if bunkerMove >= 18 then
  518.         StopStream()
  519.         Citizen.Wait(10)
  520.         RequestStreamedScript("Door_Open_Limit", "DLC_GR_Bunker_Door_Sounds")
  521.         LoadStream("Door_Open_Limit", "DLC_GR_Bunker_Door_Sounds")
  522.         PlayStreamFrontend()
  523.         PlaySoundFrontend(-1, "Door_Open_Limit", "DLC_GR_Bunker_Door_Sounds", 1)       
  524.       end
  525.       --this turns off the 1st cam to cange position
  526.       Citizen.Wait(0)    
  527.       RenderScriptCams(false, 1, 1000, 1, 0, 0)
  528.       SetCamActive(bunkerEnterCam, false)
  529.       --this is the 2nd position of the cut scene cam
  530.       SetCamParams(bunkerEnterCam, -3184.147, 1366.103, 19.897, 0, 0, 315.0, 50.0, 0, 1, 1, 2)   
  531.       SetGameplayCamRelativeHeading(53.90472)
  532.       SetCamActive(bunkerEnterCam, true)
  533.       --TaskGoStraightToCoord(PlayerPedId(), -3188.031, 1373.702, 16.806, 1.0, 8000, 88.617, 0.0)
  534.       RenderScriptCams(true, 1, 1000, 1, 0, 0)
  535.        Citizen.Wait(8000)          
  536.         if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then  
  537.          SetEntityCoords(GetVehiclePedIsIn(PlayerPedId(), false), 885.982, -3245.716, -98.278)
  538.          --ForceRoomForEntity(GetVehiclePedIsIn(PlayerPedId(), false), 258561, -995756533)
  539.         else
  540.  
  541.             EnableInteriorProp(258561,"standard_bunker_set")
  542.             EnableInteriorProp(258561,"Bunker_Style_C")
  543.             EnableInteriorProp(258561,"Office_Upgrade_set")
  544.             EnableInteriorProp(258561,"Gun_schematic_set")
  545.             EnableInteriorProp(258561,"security_upgrade")
  546.             EnableInteriorProp(258561,"gun_range_lights")
  547.             EnableInteriorProp(258561,"gun_locker_upgrade")
  548.             RefreshInterior(258561)
  549.          SetEntityCoords(GetPlayerPed(-1), 894.797, -3244.699, -96.258)
  550.          
  551.         end    
  552.       RenderScriptCams(false, 0, 3000, 1, 0, 0)
  553.         Citizen.Wait(700)
  554.         DoScreenFadeIn(1000)   
  555.        Citizen.Wait(2000)
  556.      
  557.       enterAnim = false
  558.     else
  559.         SetEntityAlpha(bunkerClosedDoor,255, true)
  560.         FreezeEntityPosition(bunkerClosedDoor, false)
  561.         SetEntityCollision(bunkerClosedDoor, true, true)
  562.         SetEntityAsMissionEntity(bunkerDoorTop)
  563.         DeleteEntity(bunkerDoorTop)
  564.         SetEntityAsMissionEntity(bunkerDoorBottom)
  565.         DeleteEntity(bunkerDoorBottom)
  566.        
  567.     end
  568. -----------------------------------------------------------------------------
  569. ---------------------------inside MOC----------------------------------------
  570. -----------------------------------------------------------------------------
  571.     if not HasModelLoaded(GetHashKey("gr_prop_gr_trailer_monitor_03"))then
  572.         RequestModel(GetHashKey("gr_prop_gr_trailer_monitor_03"))
  573.     end
  574.     if not HasModelLoaded(-2083549178) then
  575.       RequestModel(-2083549178)
  576.     end
  577.     if DoesEntityExist(GetClosestObjectOfType(1102.596, -3001.493,-40.00575, 2.0, -2083549178, 0, 0, 0)) then
  578.      mocIntCarMod = GetClosestObjectOfType(1102.596, -3001.493,-40.00575, 2.0, -2083549178, 0, 0, 0)
  579.      SetObjectTextureVariant(mocIntCarMod, 7)
  580.     end    
  581.     if not DoesEntityExist(mocIntCarMod) then
  582.        mocIntCarMod = CreateObjectNoOffset(-2083549178, 1102.596, -3001.493,-40.00575, 0, 1, 0)
  583.        SetEntityRotation(mocIntCarMod, -0, -0, -0.1030985)
  584.        SetEntityHeading(mocIntCarMod, 359.89691162109)     
  585.        FreezeEntityPosition(mocIntCarMod, 1)
  586.        SetEntityCollision(mocIntCarMod, true, true)
  587.        SetObjectTextureVariant(mocIntCarMod, 7)
  588.     else
  589.     SetObjectTextureVariant(mocIntCarMod, 7)
  590.     end
  591.     if not HasModelLoaded(-2104782239) then
  592.       RequestModel(-2104782239)
  593.     end
  594.    
  595.         if DoesEntityExist(GetClosestObjectOfType(1102.572, -3009.447, -39.98857, 2.0, -2104782239, 0, 0, 0)) then
  596.          mocIntCommand = GetClosestObjectOfType(1102.572, -3009.447, -39.98857, 2.0, -2104782239, 0, 0, 0)
  597.         end
  598.         if not DoesEntityExist(mocIntCommand) then
  599.          mocIntCommand = CreateObjectNoOffset(-2104782239, 1102.572, -3009.447, -39.98857, 0, 1, 0)
  600.          SetEntityRotation(mocIntCommand, -0, -0, -0.2033111)
  601.          SetEntityHeading(mocIntCommand, 359.79669189453)      
  602.          FreezeEntityPosition(mocIntCommand, 1)
  603.          SetEntityCollision(mocIntCommand, true, true)
  604.          SetObjectTextureVariant(mocIntCommand, 7)
  605.         else
  606.          SetObjectTextureVariant(mocIntCommand, 7)
  607.         end
  608.         if DoesEntityExist(GetClosestObjectOfType(1102.189, -3009.409, -39.97825, 2.0, -901846631, 0, 0, 0)) then
  609.          mocIntClosedDoor = GetClosestObjectOfType(1102.189, -3009.409, -39.97825, 2.0, -901846631, 0, 0, 0)
  610.         end    
  611.        if not DoesEntityExist(mocIntClosedDoor) then
  612.          mocIntClosedDoor = CreateObjectNoOffset(-901846631, 1102.189, -3009.409, -39.97825, 0, 1, 0)
  613.          SetEntityRotation(mocIntClosedDoor, -0, -0, -179.9231)
  614.          SetEntityHeading(mocIntClosedDoor, 180.07693481445)       
  615.          FreezeEntityPosition(mocIntClosedDoor, 1)
  616.          SetEntityCollision(mocIntClosedDoor, true, true)
  617.          SetObjectTextureVariant(mocIntClosedDoor, 7)
  618.         else
  619.          SetObjectTextureVariant(mocIntClosedDoor, 7)
  620.         end
  621.        
  622.         if not DoesEntityExist(mocMonitor3) then
  623.          mocMonitor3 = CreateObjectNoOffset(GetHashKey("gr_prop_gr_trailer_monitor_03"), 1106.366, -3008.03, -40.01062, 0, 1, 0)          
  624.          SetEntityRotation(mocMonitor3, -0, -0, 97.5754)
  625.          SetEntityHeading(mocMonitor3, 97.575401306152)
  626.          FreezeEntityPosition(mocMonitor3, 1)
  627.         end  
  628.        
  629. -----------------------------------------------------------------------------
  630. ------------------------inside the bunker------------------------------------
  631. -----------------------------------------------------------------------------
  632.      if not HasModelLoaded(-769147461)then      
  633.         RequestModel(-769147461)
  634.       end    
  635.      if not HasModelLoaded(GetHashKey("s_m_m_scientist_01"))then        
  636.         RequestModel(GetHashKey("s_m_m_scientist_01"))
  637.       end    
  638.      --request the MOC trailer
  639.      if not HasModelLoaded(1502869817) then  
  640.       RequestModel(1502869817)
  641.      end
  642.      --request the MOC truck
  643.      if not HasModelLoaded(GetHashKey("hauler2")) then  
  644.       RequestModel(GetHashKey("hauler2"))
  645.      end
  646.       if DoesEntityExist(GetClosestVehicle(890.708, -3236.804, -98.8961, 1.0, -769147461)) then
  647.         buggyB = GetClosestVehicle(890.708, -3236.804, -98.8961, 1.0, -769147461)
  648.                 SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(buggyB), 0)
  649.                 NetworkSetEntityVisibleToNetwork(buggyB, 0)
  650.                 SetVehicleExtra(buggyB, 2, true)
  651.                 SetVehicleExtra(buggyB, 3, true)
  652.                 SetVehicleExtra(buggyB, 1, true)
  653.                 ForceRoomForEntity(buggyB, 258561, -1116396409)
  654.       end
  655.       if DoesEntityExist(GetClosestVehicle(890.708, -3236.804, -98.8961, 1.0, -769147461)) then
  656.         buggyA = GetClosestVehicle(887.824, -3236.251, -98.8946, 1.0, -769147461)
  657.                 SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(buggyA), 0)
  658.                 NetworkSetEntityVisibleToNetwork(buggyA, 0)
  659.                 SetVehicleExtra(buggyA, 2, false)
  660.                 SetVehicleExtra(buggyA, 3, false)
  661.                 SetVehicleExtra(buggyA, 1, false)
  662.                 ForceRoomForEntity(buggyA, 258561, -1116396409)
  663.       end  
  664.       if not DoesEntityExist(buggyB) then      
  665.        buggyB = CreateVehicle(-769147461, 890.708, -3236.804, -98.8961, 0.0, 0, 0)     
  666.                 SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(buggyB), 1)
  667.                 NetworkSetEntityVisibleToNetwork(buggyB, 0)
  668.                 SetVehicleExtra(buggyB, 2, true)
  669.                 SetVehicleExtra(buggyB, 3, true)
  670.                 SetVehicleExtra(buggyB, 1, true)
  671.                 ForceRoomForEntity(buggyB, 258561, -1116396409)
  672.      end
  673.       if not DoesEntityExist(buggyA) then
  674.        buggyA = CreateVehicle(-769147461, 887.824, -3236.251, -98.8946, 0.0, 0, 0)
  675.                 SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(buggyA), 0)
  676.                 NetworkSetEntityVisibleToNetwork(buggyA, 0)
  677.                 SetVehicleExtra(buggyA, 1, false)
  678.                 SetVehicleExtra(buggyA, 2, false)
  679.                 SetVehicleExtra(buggyA, 3, false)
  680.                 --ForceRoomForEntity(buggyA, 258561, -1116396409)
  681.      end
  682.      
  683.       if DoesEntityExist(GetClosestVehicle(890.708, -3236.804, -98.8961, 30.0, GetHashKey("hauler2"), 131078)) then
  684.        mocTruck = GetClosestVehicle(834.2265, -3234.795, -98.4865, 30.0, GetHashKey("hauler2"), 131078)
  685.              SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(mocTruck), 0)
  686.              NetworkUnregisterNetworkedEntity(NetworkGetNetworkIdFromEntity(mocTruck))
  687.              NetworkSetEntityVisibleToNetwork(mocTruck, 0)
  688.              SetEntityCollision(mocTruck, true, false)
  689.       end
  690.      
  691.       if DoesEntityExist(GetClosestVehicle(834.2265, -3234.795, -98.4865, 30.0, 1502869817, 131078)) then
  692.         mocTrailer = GetClosestVehicle(842.6267, -3239.217, -96.8499, 30.0, 1502869817, 131078)
  693.              SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(mocTrailer), 0)
  694.              NetworkUnregisterNetworkedEntity(NetworkGetNetworkIdFromEntity(mocTrailer))
  695.              NetworkSetEntityVisibleToNetwork(mocTrailer, 0)
  696.              SetEntityCollision(mocTrailer, true, false)
  697.       end
  698.       if not DoesEntityExist(mocTrailer) then
  699.         mocTrailer = CreateVehicle(1502869817, 842.6267, -3239.217, -96.8499, 62.28, 0, 0)
  700.              SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(mocTrailer), 0)
  701.              NetworkUnregisterNetworkedEntity(NetworkGetNetworkIdFromEntity(mocTrailer))
  702.              NetworkSetEntityVisibleToNetwork(mocTrailer, 0)
  703.              SetEntityCollision(mocTrailer, true, false)
  704.       end    
  705.       if not DoesEntityExist(mocTruck) then
  706.         mocTruck = CreateVehicle(GetHashKey("hauler2"), 834.2265, -3234.795, -98.4865, 62.28, 0, 0)
  707.             SetNetworkIdExistsOnAllMachines(NetworkGetNetworkIdFromEntity(mocTruck), 0)
  708.             NetworkUnregisterNetworkedEntity(NetworkGetNetworkIdFromEntity(mocTruck))
  709.             NetworkSetEntityVisibleToNetwork(mocTruck, 0)
  710.             SetVehicleOnGroundProperly(mocTruck)
  711.       end
  712.     if DoesEntityExist(mocTrailer) and DoesEntityExist(mocTruck) then
  713.       if not IsVehicleAttachedToTrailer(mocTruck) then
  714.        AttachVehicleToTrailer(mocTruck, mocTrailer, 1.0)
  715.       end
  716.     end
  717.      if not DoesEntityExist(bunkPedC) then
  718.        bunkPedC = CreatePed(26, GetHashKey("s_m_m_scientist_01"), 889.994, -3201.95, -98.1963, 100.0, 0, false)
  719.        PlaceObjectOnGroundProperly(bunkPedC)
  720.                 SetEntityNoCollisionEntity(GetPlayerPed(playerID), bunkPedC, 0)
  721.                 SetNetworkIdExistsOnAllMachines(bunkPedC, 0)
  722.                 NetworkUnregisterNetworkedEntity(bunkPedC)
  723.                 NetworkSetEntityVisibleToNetwork(bunkPedC, 0)
  724.                                
  725.        FreezeEntityPosition(bunkPedC, 0)
  726.      end
  727.      if not DoesEntityExist(bunkPedB) then
  728.        bunkPedB = CreatePed(26, GetHashKey("s_m_m_scientist_01"), 893.9716, -3201.912, -98.19622, 33.884, 0, false)
  729.        PlaceObjectOnGroundProperly(bunkPedB)
  730.                 SetEntityNoCollisionEntity(GetPlayerPed(playerID), bunkPedB, 0)
  731.                 SetNetworkIdExistsOnAllMachines(bunkPedB, 0)
  732.                 NetworkUnregisterNetworkedEntity(bunkPedB)
  733.                 NetworkSetEntityVisibleToNetwork(bunkPedB, 0)
  734.        FreezeEntityPosition(bunkPedB, 0)
  735.      end
  736.      if not DoesEntityExist(bunkPedD) then
  737.        bunkPedD = CreatePed(26, GetHashKey("s_m_m_scientist_01"), 893.9716, -3201.912, -98.19622, 33.884, 0, false)
  738.        PlaceObjectOnGroundProperly(bunkPedD)
  739.                 SetEntityNoCollisionEntity(GetPlayerPed(playerID), bunkPedD, 0)
  740.                 SetNetworkIdExistsOnAllMachines(bunkPedD, 0)
  741.                 NetworkUnregisterNetworkedEntity(bunkPedD)
  742.                 NetworkSetEntityVisibleToNetwork(bunkPedD, 0)
  743.        FreezeEntityPosition(bunkPedD, 0)
  744.      end
  745.      if not DoesEntityExist(bunkPedA) then
  746.         bunkPedA = CreatePed(26, GetHashKey("s_m_m_scientist_01"), 885.606, -3199.558, -98.196, 33.884, 0, false)
  747.        PlaceObjectOnGroundProperly(bunkPedA)
  748.        --GiveWeaponToPed(bunkPedA, 961495388, 0, true, true)
  749.        TaskPlayAnim(bunkPedA, "anim@amb@machinery@lathe@", "unload_01_amy_skater_01", 1.0, 1.0, 1000, 0, 0, 0, 0, 0)
  750.                 SetEntityNoCollisionEntity(GetPlayerPed(playerID), bunkPedA, 0)
  751.                 SetNetworkIdExistsOnAllMachines(bunkPedA, 0)
  752.                 NetworkUnregisterNetworkedEntity(bunkPedA)
  753.                 NetworkSetEntityVisibleToNetwork(bunkPedA, 0)      
  754.        FreezeEntityPosition(bunkPedA, 0)
  755.      end
  756.      
  757.      if not DoesEntityExist(modShopBunkerPed) then
  758.       if not HasModelLoaded(921328393)then      
  759.         RequestModel(921328393)
  760.       end  
  761.      modShopBunkerPed = CreatePed(26, 921328393, 834.137, -3244.638, -98.699, -18.0, 0, false)
  762.      end
  763.     end
  764. end)
  765.  
  766. ------------------------------------------------------------------------------------------
  767. ----------------party time is just a bunch of girls dancing on fridays--------------------
  768. ------------------------------------------------------------------------------------------
  769. function partyTime()
  770.   Citizen.CreateThread(function()
  771.   partyPeds = {"a_f_y_beach_01", "csb_stripper_01", "csb_stripper_02", "a_f_y_juggalo_01"}
  772.     while true do
  773.     Citizen.Wait(0)
  774.      if not HasModelLoaded(GetHashKey(partyPeds[1])) then
  775.       RequestModel(GetHashKey(partyPeds[1]))
  776.      end
  777.      if not HasModelLoaded(GetHashKey(partyPeds[2])) then
  778.       RequestModel(GetHashKey(partyPeds[2]))
  779.      end
  780.      if not HasModelLoaded(GetHashKey(partyPeds[3])) then
  781.       RequestModel(GetHashKey(partyPeds[3]))
  782.      end
  783.      if not HasModelLoaded(GetHashKey(partyPeds[4])) then
  784.       RequestModel(GetHashKey(partyPeds[4]))
  785.      end
  786.       if not DoesEntityExist(partyPed0) then
  787.        partyPed0 = CreatePed(5, GetHashKey(partyPeds[1]), 904.9504, -3225.118, -98.2738, 0.0, 0, 0)
  788.         SetPedComponentVariation(partyPed0, 3, 2, 0)
  789.       end
  790.       if not DoesEntityExist(partyPed1) then
  791.       partyPed1 = CreatePed(5, GetHashKey(partyPeds[2]),909.3971, -3221.369, -98.26151, 0.0, 0, 0)
  792.         SetPedComponentVariation(partyPed1, 3, 2, 0)
  793.       end
  794.       if not DoesEntityExist(partyPed2) then
  795.       partyPed2 = CreatePed(5, GetHashKey(partyPeds[3]), 901.5885, -3225.548, -98.27573, 0.0, 0, 0)
  796.         SetPedComponentVariation(partyPed2, 3, 2, 0)     
  797.       end
  798.       if not DoesEntityExist(partyPed3) then
  799.       partyPed3 = CreatePed(5, GetHashKey(partyPeds[4]), 900.417, -3216.832, -98.232, 0.0, 0, 0)
  800.      
  801.         SetPedComponentVariation(partyPed3, 3, 2, 0)     
  802.        
  803.       end
  804.      
  805.     end  
  806.   end)
  807. end
  808. function partyTimeOver()
  809.   Citizen.CreateThread(function()
  810.  
  811.     while true do
  812.     Citizen.Wait(0)
  813.  
  814.       if DoesEntityExist(partyPed0) then
  815.        SetEntityAsMissionEntity(partyPed0)
  816.        DeletePed(partyPed0)
  817.        SetModelAsNoLongerNeeded(GetHashKey(partyPeds[1]))
  818.       end
  819.       if DoesEntityExist(partyPed1) then
  820.        SetEntityAsMissionEntity(partyPed1)
  821.        DeletePed(partyPed1)
  822.        SetModelAsNoLongerNeeded(GetHashKey(partyPeds[2]))
  823.       end
  824.       if DoesEntityExist(partyPed2) then
  825.        SetEntityAsMissionEntity(partyPed2)
  826.        DeletePed(partyPed2)
  827.        SetModelAsNoLongerNeeded(GetHashKey(partyPeds[3]))
  828.       end
  829.       if not DoesEntityExist(partyPed3) then    
  830.         SetEntityAsMissionEntity(partyPed3)
  831.         DeletePed(partyPed3)
  832.         --SetModelAsNoLongerNeeded(GetHashKey(partyPeds[4]))
  833.       end
  834.      
  835.     end  
  836.   end)
  837. end
  838. if (GetClockDayOfWeek() == 5 or GetClockDayOfWeek() == 6) or GetClockDayOfWeek() == 7 then
  839. partyTime()
  840.  else
  841. partyTimeOver()
  842. end
  843.  
  844. LoadBunkers()
  845. -----------------------------------------------------------------
  846. ----makes players invisible to each other while in the bunker----
  847. -----------------------------------------------------------------
  848. Citizen.CreateThread(function()
  849. EnableMpDlcMaps(1)
  850.  while true do
  851.  Citizen.Wait(0)
  852. --Citizen.Trace(tostring(dave))
  853.  for i = 0, 25 do
  854.   if DoesEntityExist(GetPlayerPed(i)) and not PlayerId() == i then
  855.     playerID = i     
  856.  end
  857.  end
  858.   end
  859. end)
  860.  
  861.  
  862.  
  863.  
  864. Citizen.CreateThread(function()
  865.     while true do
  866.         Citizen.Wait(0)
  867.                     if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1), true), 888.4329, -3206.185, -99.1861) < 1.8 then -- INPUT_CELLPHONE_DOWN
  868.                         Main() -- Menu to draw
  869.                         Menu.hidden = false
  870.                     else
  871.                         menu.hidden = true
  872.                     end
  873.                     Menu.renderGUI(options) -- Draw menu on each tick if Menu.hidden = false
  874.                 end      
  875. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement