Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- -- Wait for the game:
- while not SystemIsReady() or AreaIsLoading() do
- Wait(0)
- end
- -- Process:
- while true do
- -- Activation:
- if IsButtonBeingReleased(3,0) then
- -- Lock Weapon HUD:
- PlayerWeaponHudLock(true)
- -- Unlock Camera:
- CameraAllowChange(true)
- -- Set BBGun:
- PedSetWeaponNow(gPlayer, 391, 25)
- -- Set Camera:
- CameraSetActive(2)
- CameraSetShot(2,"ShootingGallery",true)
- -- Lock Camera:
- CameraAllowChange(false)
- -- Show Counter HUD:
- CounterMakeHUDVisible(true)
- -- Ammo:
- local ammo = 15
- -- Set Counter:
- CounterSetCurrent(15)
- CounterSetMax(15)
- -- Wait:
- Wait(200)
- repeat
- if not PedHasWeapon(gPlayer,391) then
- PedSetWeaponNow(gPlayer,391,25)
- end
- if IsButtonBeingReleased(12,0) then
- ammo = ammo - 1
- CounterSetCurrent(ammo)
- end
- TextPrintString("~LOOK_BACK~ Exit",0,1)
- Wait(0)
- until IsButtonBeingReleased(14,0) or ammo < 1
- -- Reset:
- CameraAllowChange(true)
- CameraSetShot(2, 0)
- CameraReturnToPlayer()
- PlayerWeaponHudLock(false)
- CameraDefaultFOV()
- if not PedHasWeapon(gPlayer,-1) then
- PedDestroyWeapon(gPlayer, 391)
- end
- CameraSetActive(1)
- end
- Wait(0)
- end
- end
- -- STimeCycle.lur functions:
- function F_AttendedClass()
- if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
- return
- end
- SetSkippedClass(false)
- PlayerSetPunishmentPoints(0)
- end
- function F_MissedClass()
- if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
- return
- end
- SetSkippedClass(true)
- StatAddToInt(166)
- end
- function F_AttendedCurfew()
- if not PedInConversation(gPlayer) and not MissionActive() then
- TextPrintString("You got home in time for curfew", 4)
- end
- end
- function F_MissedCurfew()
- if not PedInConversation(gPlayer) and not MissionActive() then
- TextPrint("TM_TIRED5", 4, 2)
- end
- end
- function F_StartClass()
- if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
- return
- end
- end
- function F_EndClass()
- if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
- return
- end
- end
- function F_StartMorning()
- F_UpdateTimeCycle()
- end
- function F_EndMorning()
- F_UpdateTimeCycle()
- end
- function F_StartLunch()
- if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
- F_UpdateTimeCycle()
- return
- end
- F_UpdateTimeCycle()
- end
- function F_EndLunch()
- F_UpdateTimeCycle()
- end
- function F_StartAfternoon()
- F_UpdateTimeCycle()
- end
- function F_EndAfternoon()
- F_UpdateTimeCycle()
- end
- function F_StartEvening()
- F_UpdateTimeCycle()
- end
- function F_EndEvening()
- F_UpdateTimeCycle()
- end
- function F_StartCurfew_SlightlyTired()
- F_UpdateTimeCycle()
- end
- function F_StartCurfew_Tired()
- F_UpdateTimeCycle()
- end
- function F_StartCurfew_MoreTired()
- F_UpdateTimeCycle()
- end
- function F_StartCurfew_TooTired()
- F_UpdateTimeCycle()
- end
- function F_EndCurfew_TooTired()
- F_UpdateTimeCycle()
- end
- function F_EndTired()
- F_UpdateTimeCycle()
- end
- function F_Nothing()
- end
- function F_ClassWarning()
- if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
- return
- end
- local l_23_0 = math.random(1, 2)
- end
- function F_UpdateTimeCycle()
- if not IsMissionCompleated("1_B") then
- local l_24_0 = GetCurrentDay(false)
- if l_24_0 < 0 or l_24_0 > 2 then
- SetCurrentDay(0)
- end
- end
- F_UpdateCurfew()
- end
- function F_UpdateCurfew()
- local l_25_0 = shared.gCurfewRules
- if not l_25_0 then
- l_25_0 = F_CurfewDefaultRules
- end
- l_25_0()
- end
- function F_CurfewDefaultRules()
- local l_26_0 = ClockGet()
- if l_26_0 >= 23 or l_26_0 < 7 then
- shared.gCurfew = true
- else
- shared.gCurfew = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment