Altamurenza

Bully SE: Stink Bomb (Fix -2 ammo bug)

May 9th, 2018
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.24 KB | None | 0 0
  1. -- Stink Bomb ammo fix
  2.  
  3. main = function()
  4.     while not SystemIsReady() or AreaIsLoading() do
  5.         Wait(0)
  6.     end
  7.    
  8.     while true do
  9.         if PedHasWeapon(gPlayer,309) then
  10.             if PedIsPlaying(gPlayer,"/Global/Player/Social_Actions/HarassMoves/Shove_Still/Shove/SmashInnaFaceStink",true) then
  11.                 PedSetFlag(gPlayer,24,true)
  12.                 repeat
  13.                     Wait(0)
  14.                 until not PedIsPlaying(gPlayer,"/Global/Player/Social_Actions/HarassMoves/Shove_Still/Shove/SmashInnaFaceStink",true)
  15.                 PedSetFlag(gPlayer,24,false)
  16.             end
  17.         end
  18.        
  19.         Wait(0)
  20.     end
  21. end
  22.  
  23. function F_AttendedClass()
  24.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  25.         return
  26.     end
  27.     SetSkippedClass(false)
  28.     PlayerSetPunishmentPoints(0)
  29. end
  30. function F_MissedClass()
  31.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  32.         return
  33.     end
  34.     SetSkippedClass(true)
  35.     StatAddToInt(166)
  36. end
  37. function F_AttendedCurfew()
  38.     if not PedInConversation(gPlayer) and not MissionActive() then
  39.         TextPrintString("You got home in time for curfew", 4)
  40.     end
  41. end
  42. function F_MissedCurfew()
  43.     if not PedInConversation(gPlayer) and not MissionActive() then
  44.         TextPrint("TM_TIRED5", 4, 2)
  45.     end
  46. end
  47. function F_StartClass()
  48.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  49.         return
  50.     end
  51. end
  52. function F_EndClass()
  53.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  54.         return
  55.     end
  56. end
  57. function F_StartMorning()
  58.     F_UpdateTimeCycle()
  59. end
  60. function F_EndMorning()
  61.     F_UpdateTimeCycle()
  62. end
  63. function F_StartLunch()
  64.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  65.         F_UpdateTimeCycle()
  66.         return
  67.     end
  68.     F_UpdateTimeCycle()
  69. end
  70. function F_EndLunch()
  71.     F_UpdateTimeCycle()
  72. end
  73. function F_StartAfternoon()
  74.     F_UpdateTimeCycle()
  75. end
  76. function F_EndAfternoon()
  77.     F_UpdateTimeCycle()
  78. end
  79. function F_StartEvening()
  80.     F_UpdateTimeCycle()
  81. end
  82. function F_EndEvening()
  83.     F_UpdateTimeCycle()
  84. end
  85. function F_StartCurfew_SlightlyTired()
  86.     F_UpdateTimeCycle()
  87. end
  88. function F_StartCurfew_Tired()
  89.     F_UpdateTimeCycle()
  90. end
  91. function F_StartCurfew_MoreTired()
  92.     F_UpdateTimeCycle()
  93. end
  94. function F_StartCurfew_TooTired()
  95.     F_UpdateTimeCycle()
  96. end
  97. function F_EndCurfew_TooTired()
  98.     F_UpdateTimeCycle()
  99. end
  100. function F_EndTired()
  101.     F_UpdateTimeCycle()
  102. end
  103. function F_Nothing()
  104. end
  105. function F_ClassWarning()
  106.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  107.         return
  108.     end
  109.     local l_23_0 = math.random(1, 2)
  110. end
  111. function F_UpdateTimeCycle()
  112.     if not IsMissionCompleated("1_B") then
  113.         local l_24_0 = GetCurrentDay(false)
  114.         if l_24_0 < 0 or l_24_0 > 2 then
  115.             SetCurrentDay(0)
  116.         end
  117.     end
  118.     F_UpdateCurfew()
  119. end
  120. function F_UpdateCurfew()
  121.     local l_25_0 = shared.gCurfewRules
  122.     if not l_25_0 then
  123.         l_25_0 = F_CurfewDefaultRules
  124.     end
  125.     l_25_0()
  126. end
  127. function F_CurfewDefaultRules()
  128.     local l_26_0 = ClockGet()
  129.     if l_26_0 >= 23 or l_26_0 < 7 then
  130.         shared.gCurfew = true
  131.     else
  132.         shared.gCurfew = false
  133.     end
  134. end
Advertisement
Add Comment
Please, Sign In to add comment