Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.19 KB | None | 0 0
  1. barel = 0
  2. rootElement = getRootElement()
  3. screenWidth, screenHeight = guiGetScreenSize()
  4. ff = 0
  5. bf = 0
  6. sf = 0
  7. def = 1
  8. stuntname = "stunt"
  9. wasvehinair = false
  10. gme = getLocalPlayer()
  11. function stunttest()
  12. outputChatBox("runs!")
  13. setTimer ( stuntinfo, 1000, 1 )
  14. addEventHandler('onClientResourceStart',getResourceRootElement(getThisResource()),
  15. function()
  16. setTimer( function()
  17. v = getPedOccupiedVehicle(getLocalPlayer())
  18. if isVehicleOnGround ( v ) == false and (getVehicleType(v) == "Automobile") and v then
  19. wasvehinair = true
  20. if not ( getControlState ( "accelerate" ) ) then
  21. if getKeyState( "arrow_l" ) == true or getKeyState( "arrow_r" ) == true or getKeyState( "a" ) == true or getKeyState( "d" ) == true then
  22. barel = barel + 1
  23. end
  24. if getKeyState( "arrow_u" ) == true or getKeyState( "w" ) == true then
  25. ff=ff+1
  26. end
  27. if getKeyState( "arrow_d" ) == true or getKeyState( "s" ) == true then
  28. bf = bf +1
  29. end
  30. if getKeyState( "space" ) == true then
  31. if getKeyState( "arrow_l" ) == true or getKeyState( "arrow_r" ) == true or getKeyState( "a" ) == true or getKeyState( "d" ) == true then
  32. sf = sf +1
  33. end
  34. end
  35. end
  36. end
  37. if isVehicleOnGround ( v ) == true and v then
  38. if wasvehinair then
  39. stuntname = ""
  40. if sf >=5 then
  41. if bf >=12 or ff >=12 then
  42. if barel >=12 then
  43. def = 0
  44. end
  45. end
  46. end
  47. if def == 0 then
  48. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffSwitch back#ff6666!", 255, 255, 255, true )
  49. stuntname = "Switch back"
  50. addEventHandler("onClientRender",rootElement, drawing)
  51. setTimer(drawingremove,5000,1)
  52. elseif bf>=100 or ff>=100 or barel >=100 then
  53. elseif bf >= 35 and barel <=14 then
  54. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#66ffff What a STUNT#ff6666!", 255, 255, 255, true )
  55. stuntname = "What a STUNT!"
  56. addEventHandler("onClientRender",rootElement, drawing)
  57. setTimer(drawingremove,5000,1)
  58. elseif bf >= 35 and barel <=14 then
  59. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble backflip#ff6666!", 255, 255, 255, true )
  60. stuntname = "Double Backflip"
  61. addEventHandler("onClientRender",rootElement, drawing)
  62. setTimer(drawingremove,5000,1)
  63. elseif ff >= 25 and barel <=14 then
  64. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble frontflip#ff6666!", 255, 255, 255, true )
  65. stuntname = "Double Frontflip"
  66. addEventHandler("onClientRender",rootElement, drawing)
  67. setTimer(drawingremove,5000,1)
  68. elseif bf >= 30 and barel >=30 then
  69. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble side backflip#ff6666!", 255, 255, 255, true )
  70. stuntname = "Double Side Backflip"
  71. addEventHandler("onClientRender",rootElement, drawing)
  72. setTimer(drawingremove,5000,1)
  73. elseif ff >= 25 and barel >=25 then
  74. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble side frontflip#ff6666!", 255, 255, 255, true )
  75. stuntname = "Double Side Frontflip"
  76. addEventHandler("onClientRender",rootElement, drawing)
  77. setTimer(drawingremove,5000,1)
  78. elseif bf >= 15 and barel <=14 then
  79. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffbackflip#ff6666!", 255, 255, 255, true )
  80. stuntname = "Backflip"
  81. addEventHandler("onClientRender",rootElement, drawing)
  82. setTimer(drawingremove,5000,1)
  83. elseif ff >= 15 and barel <=15 then
  84. outputChatBox ( "#ff6666[#ffff4fSTUNT#ff6666]#ffffff You did a #66fffffrontflip#ff6666!", 255, 255, 255, true )
  85. stuntname = "Frontflip"
  86. addEventHandler("onClientRender",rootElement, drawing)
  87. setTimer(drawingremove,5000,1)
  88. elseif bf >= 10 and barel>=10 then
  89. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffside backflip#ff6666!", 255, 255, 255, true )
  90. stuntname = "Side Backflip"
  91. addEventHandler("onClientRender",rootElement, drawing)
  92. setTimer(drawingremove,5000,1)
  93. elseif ff >= 8 and barel >=8 then
  94. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffside frontflip#ff6666!", 255, 255, 255, true )
  95. stuntname = "Side Frontflip"
  96. addEventHandler("onClientRender",rootElement, drawing)
  97. setTimer(drawingremove,5000,1)
  98. elseif sf >= 10 then
  99. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffblade#ff6666!", 255, 255, 255, true )
  100. stuntname = "Blade"
  101. addEventHandler("onClientRender",rootElement, drawing)
  102. setTimer(drawingremove,5000,1)
  103. elseif barel >=15 then
  104. outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffbarrel roll#ff6666!", 255, 255, 255, true )
  105. stuntname = "Barrel roll"
  106. addEventHandler("onClientRender",rootElement, drawing)
  107. setTimer(drawingremove,5000,1)
  108. end
  109. rt = 0
  110. ff = 0
  111. bf = 0
  112. sf = 0
  113. def = 1
  114. barel = 0
  115. wasvehinair = false
  116. end
  117. end
  118. end,
  119. 100,0)
  120. end
  121. )
  122. end
  123.  
  124. addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), stunttest)
  125.  
  126. function drawing()
  127. dxDrawText ( stuntname, 0, 0, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "pricedown" , "right", "bottom")
  128. end
  129.  
  130. function drawingremove()
  131. removeEventHandler("onClientRender",rootElement, drawing)
  132. end
  133.  
  134. function stuntinfo()
  135. outputChatBox ( "#ff6666[INFO]#ffffff Try to do #cdff00stunts#ffffff to #cdff00earn#ffffff some extra #cdff00money#ff6666!", 255, 255, 255, true )
  136. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement