Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 23rd, 2018 64 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. local overheat = 0
  2.  
  3. function overheatCheck()
  4.   if getControlState("vehicle_secondary_fire") then
  5.     -- minigun is active, adding the heat:
  6.     overheat = overheat + 1
  7.   else
  8.     -- minigun is inactive, cooling down to 0:
  9.     overheat = math.max(overheat - 1, 0)
  10.   end  
  11.   -- check for overheating/cooldown, toggle controls accordingly:
  12.   if overheat >= 1000 and isControlEnabled("vehicle_secondary_fire") then
  13.     toggleControl("vehicle_secondary_fire", false)
  14.     outputChatBox("Minigun overheated!", 222, 0, 0)
  15.   elseif overheat == 0 and not isControlEnabled("vehicle_secondary_fire") then
  16.     toggleControl("vehicle_secondary_fire", true)
  17.     outputChatBox("Minigun is back!", 0, 222, 0)
  18.   end
  19. end
  20. addEventHandler("onClientPreRender", root, overHeatCheck)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top