Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Edit by haws1290 2015
- --Used Trifecta's PacificHeist.lua as base script
- --Lots of credit to him
- --Semi-Scripted Bank Heist for Blaine County Savings
- local BlaineCountyHeist = {}
- function markBank()
- bankBlip = UI.ADD_BLIP_FOR_COORD(-111.5, 6462.1, 31.6)
- UI.SET_BLIP_SCALE(bankBlip, 1)
- UI.SET_BLIP_SPRITE(bankBlip, 52)
- UI.SET_BLIP_COLOUR(bankBlip, 5)
- UI.SET_BLIP_AS_SHORT_RANGE(bankBlip, true)
- end
- --Part 1 = Gate
- --Part 2 = Open Safe
- --Part 3 = Get Cash
- --Part 4 = Escape
- --Part 5 = Drop-Off
- --EDITABLE VARIABLES MADE EASY--
- --EDIT THE FOLLOWING SO YOU WON'T HAVE TO SEARCH THE CODE FOR THE CORRECT LINE--
- local PayoutMin = 1000000
- local PayoutMax = 3500000
- local wantedLevelPt1 = 1
- local wantedLevelPt2 = 2
- local wantedLevelPt3 = 3
- local wantedLevelPt4 = 4
- local safeWaitTime = 20000 --Milliseconds
- --------------------------------------------------------------------------------
- --DO NOT EDIT----------------------------
- heistPart = 0
- local dropOffBlip
- local flag01 = false --Near Vault
- local flag02 = false --Get Payment
- local flag03 = {} --Deposit Boxes
- local flag04 = false --Pickup Money
- local flag05 = false --Create Pickup Money
- local flag06 = false --Spawn Swat
- local depoFlag = {}
- depoFlag[0] = false
- depoFlag[1] = false
- depoFlag[2] = false
- depoFlag[3] = false
- local bankCashPickup
- local depoPay = 0
- local obj = {}
- local blip = {}
- -----------------------------------------
- markBank()
- function BlaineCountyHeist.unload() end
- function BlaineCountyHeist.init()
- for i = 1,5 do
- flag03[i] = false
- end
- end
- --NOT USED, SCRIPTED EXPLOSION. DOESN'T ALWAYS WORK. WILL USE IT WHEN NATIVE GETS UPDATED
- function explosion()
- --255.745,225.310,101.876
- FIRE.ADD_EXPLOSION(253.551, 223.934, 101.900, 5, 0.5, false, false, 1)
- FIRE.ADD_EXPLOSION(252.260,225.383,101.683, 5, 0.5, false, false, 1)
- wait(1000)
- obj[1] = OBJECT.CREATE_OBJECT(GAMEPLAY.GET_HASH_KEY("prop_weight_20k"),255.745,225.310,101.876, false,false,true)
- OBJECT.PLACE_OBJECT_ON_GROUND_PROPERLY(obj[1])
- obj[2] = OBJECT.CREATE_OBJECT(GAMEPLAY.GET_HASH_KEY("prop_weight_20k"),255.521,225.734,101.876, false,false,true)
- OBJECT.PLACE_OBJECT_ON_GROUND_PROPERLY(obj[2])
- end
- function setBlipDropOff()
- dropOffBlip = UI.ADD_BLIP_FOR_COORD(1378.405, -2078.464, 51.999)
- UI.SET_BLIP_COLOUR(dropOffBlip, 16742399)
- UI.SET_BLIP_SCALE(dropOffBlip, 1)
- UI.SET_BLIP_FLASHES(dropOffBlip, true)
- UI.SET_BLIP_ROUTE(dropOffBlip, true)
- end
- function setBlips()
- blip[4] = UI.ADD_BLIP_FOR_COORD(-104.5, 6477.3, 32.5)
- UI.SET_BLIP_COLOUR(blip[4], 16742399)
- UI.SET_BLIP_SCALE(blip[4], 1)
- UI.SET_BLIP_FLASHES(blip[4], true)
- UI.SET_BLIP_ROUTE(blip[4], true)
- blip[1] = UI.ADD_BLIP_FOR_COORD(-105.8,6478.4,31.6)
- UI.SET_BLIP_COLOUR(blip[1], 16742399)
- UI.SET_BLIP_SCALE(blip[1], 1)
- UI.SET_BLIP_FLASHES(blip[1], true)
- blip[2] = UI.ADD_BLIP_FOR_COORD(-103.5 , 6478.5, 31.6)
- UI.SET_BLIP_COLOUR(blip[2], 16742399)
- UI.SET_BLIP_SCALE(blip[2], 1)
- UI.SET_BLIP_FLASHES(blip[2], true)
- blip[3] = UI.ADD_BLIP_FOR_COORD(-102.9, 6475.6,31.6)
- UI.SET_BLIP_COLOUR(blip[3], 16742399)
- UI.SET_BLIP_SCALE(blip[3], 1)
- UI.SET_BLIP_FLASHES(blip[3], true)
- blip[5] = UI.ADD_BLIP_FOR_COORD(-107.3, 6473.83,31.6)
- UI.SET_BLIP_COLOUR(blip[5], 16742399)
- UI.SET_BLIP_SCALE(blip[5], 1)
- UI.SET_BLIP_FLASHES(blip[5], true)
- end
- function removeBlip(i)
- UI.REMOVE_BLIP(blip[i])
- end
- function drawText(text, x, y, scale)
- UI.SET_TEXT_FONT(6)
- UI.SET_TEXT_SCALE(scale, scale)
- UI.SET_TEXT_COLOUR(255, 255, 255, 255)
- UI.SET_TEXT_WRAP(0.0, 1.0)
- UI.SET_TEXT_CENTRE(false)
- UI.SET_TEXT_DROPSHADOW(2, 2, 0, 0, 0)
- UI.SET_TEXT_EDGE(1, 0, 0, 0, 205)
- UI._SET_TEXT_ENTRY("STRING")
- UI._ADD_TEXT_COMPONENT_STRING(text)
- UI._DRAW_TEXT(y, x)
- end
- function BlaineCountyHeist.tick()
- local playerPed = PLAYER.PLAYER_PED_ID()
- local player = PLAYER.GET_PLAYER_PED(playerPed)
- local location = ENTITY.GET_ENTITY_COORDS(playerPed, nil)
- --Is Player Dead?
- if((ENTITY.IS_ENTITY_DEAD(playerPed) == true) and (heistPart > 0))then
- resetHeist()
- end
- --MAIN HEIST--
- --PART 1
- if ((GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -111.5, 6462.1, 31.6 , location.x, location.y, location.z, true ) < 1 ) and (heistPart == 0)) then
- heistPart = 1 --Start Heist
- notify("Make your way to the deposit boxes and money!")
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt1,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- heistPart = 2 --Move to part 2
- --PART 2
- elseif((GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -104.30, 6471.7, 36 , location.x, location.y, location.z, true ) < 6) and (heistPart == 2) and (ENTITY.IS_ENTITY_DEAD(playerPed) == false)) then
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt2,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- if(flag01 == false) then --Near Safe
- notify("Enter the deposit box room and empty them for a big score.")
- end
- if(GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -105.0,6476.44,31.6, location.x, location.y, location.z, true ) < 3) then
- notify("Grab the cash!")
- notify("Press [E] to raid the deposit boxes!")
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- flag01 = true
- heistPart = 3
- setBlips()
- end
- elseif((heistPart == 3) and (ENTITY.IS_ENTITY_DEAD(playerPed) == false)) then
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- if(flag05 == false) then
- bankCashPickup = OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), -104.5, 6477.3, 32.5, 1000, 1, 1, false, true)
- flag05 = true
- end
- if(GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -104.5, 6477.3, 32.5, location.x, location.y, location.z, true ) < 2 and flag04 == false) then
- notify("You collected the cash!")
- notify("Escape, or go for the deposit boxes!")
- notify("Press [L] when you're ready to leave!")
- PED.SET_PED_COMPONENT_VARIATION(playerPed, 9, 1, 0, 0)
- removeBlip(4)
- flag04 = true
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- end
- if(GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -105.8,6478.4,31.6 , location.x, location.y, location.z, true ) < 1 and depoFlag[0] == false) then
- drawText("Press [E] to raid the Deposit Box!", 0.5, 0.5, 1)
- if(get_key_pressed(Keys.E))then
- notify("Looting 1")
- wait(5000)
- depoPay = depoPay + 250000
- flag03[1] = true
- removeBlip(1)
- notify("Deposit Box 1 Looted")
- print("depo1")
- depoFlag[0] = true
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- end
- elseif(GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -103.5 , 6478.5, 31.6 , location.x, location.y, location.z, true ) < 1 and depoFlag[1] == false) then
- drawText("Press [E] to raid the Deposit Box!", 0.5, 0.5, 1)
- if(get_key_pressed(Keys.E))then
- notify("Looting 2")
- wait(5000)
- depoPay = depoPay + 250000
- flag03[2] = true
- removeBlip(2)
- notify("Deposit Box 2 Looted")
- print("depo2")
- depoFlag[1] = true
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- end
- elseif(GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -102.9, 6475.6,31.6 , location.x, location.y, location.z, true ) < 1 and depoFlag[2] == false) then
- drawText("Press [E] to raid the Deposit Box!", 0.5, 0.5, 1)
- if(get_key_pressed(Keys.E))then
- notify("Looting 3")
- wait(5000)
- depoPay = depoPay + 250000
- flag03[3] = true
- removeBlip(3)
- notify("Deposit Box 3 Looted")
- print("depo3")
- depoFlag[2] = true
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- end
- elseif(GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -107.3, 6473.83,31.6 , location.x, location.y, location.z, true ) < 1 and depoFlag[3] == false) then
- drawText("Press [E] to raid the Deposit Box!", 0.5, 0.5, 1)
- if(get_key_pressed(Keys.E))then
- notify("Looting 4")
- wait(5000)
- depoPay = depoPay + 300000
- flag03[5] = true
- removeBlip(5)
- notify("Deposit Box 4 Looted")
- print("depo4")
- depoFlag[3] = true
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- end
- end
- if((flag04 == true and get_key_pressed(Keys.L)) or (flag03[1] == true and flag03[2] == true and flag03[3] == true and flag03[5] == true and flag04 == true)) then
- heistPart = 4
- removeBlip(1)
- removeBlip(2)
- removeBlip(3)
- removeBlip(4)
- removeBlip(5)
- notify("Shoot your way out of the bank and escape the heat!")
- end
- --PART 4
- elseif((heistPart == 4) and (ENTITY.IS_ENTITY_DEAD(playerPed) == false)) then
- if(GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( -103.5 , 6478.5, 31.6 , location.x, location.y, location.z, true ) < 50) then
- PLAYER.SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER.GET_PLAYER_PED(playerPed),wantedLevelPt4,false)
- PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(PLAYER.GET_PLAYER_PED(playerPed),false)
- end
- if(PLAYER.GET_PLAYER_WANTED_LEVEL(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(playerPed))<1) then
- heistPart = 5 --Move to part 4
- setBlipDropOff()
- end
- --PART 5
- elseif((heistPart == 5 ) and (ENTITY.IS_ENTITY_DEAD(playerPed) == false) and (PLAYER.GET_PLAYER_WANTED_LEVEL(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(playerPed))<1) and (ENTITY.IS_ENTITY_DEAD(playerPed) == false)) then
- local pickup
- notify("Good job. Get to the drop off point to launder your money.")
- if ((PLAYER.GET_PLAYER_WANTED_LEVEL(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(playerPed))<1) and (PLAYER.GET_PLAYER_WANTED_LEVEL(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(playerPed))<1) and (GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( 1378.405, -2078.464, 51.999 , location.x, location.y, location.z, true ) < 10)) then
- if not(flag02) then
- math.randomseed(os.time())
- local finalPayout =math.random (PayoutMin, PayoutMax)
- pickup = OBJECT.CREATE_AMBIENT_PICKUP(GAMEPLAY.GET_HASH_KEY("PICKUP_MONEY_SECURITY_CASE"), 1378.405, -2078.464, 51.999, 0, finalPayout+depoPay, 1, false, true)
- flag02 = true
- end
- if(PLAYER.GET_PLAYER_WANTED_LEVEL(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(playerPed))<1) and (GAMEPLAY.GET_DISTANCE_BETWEEN_COORDS( 1378.405, -2078.464, 51.999 , location.x, location.y, location.z, true ) < 1) then
- PED.SET_PED_COMPONENT_VARIATION(playerPed, 9, 0, 0, 0)
- resetHeist()
- AUDIO.PLAY_MISSION_COMPLETE_AUDIO("MICHAEL_BIG_01")
- notify("Good Job!")
- end
- end
- end
- end
- --RESETS EVERYTHING---------------------------
- --DO NOT EDIT OR RISK BREAKING REPLAYABILITY--
- function resetHeist()
- flag01 = false
- flag02 = false
- flag04 = false
- flag05 = false
- flag06 = false
- flag03[1] = false
- flag03[2] = false
- flag03[3] = false
- flag03[4] = false
- flag03[5] = false
- depoFlag[0] = false
- depoFlag[1] = false
- depoFlag[2] = false
- depoFlag[3] = false
- heistPart = 0
- UI.REMOVE_BLIP(dropOffBlip)
- end
- return BlaineCountyHeist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement