Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- barel = 0
- rootElement = getRootElement()
- screenWidth, screenHeight = guiGetScreenSize()
- ff = 0
- bf = 0
- sf = 0
- def = 1
- stuntname = "stunt"
- wasvehinair = false
- gme = getLocalPlayer()
- function stunttest()
- outputChatBox("runs!")
- setTimer ( stuntinfo, 1000, 1 )
- addEventHandler('onClientResourceStart',getResourceRootElement(getThisResource()),
- function()
- setTimer( function()
- v = getPedOccupiedVehicle(getLocalPlayer())
- if isVehicleOnGround ( v ) == false and (getVehicleType(v) == "Automobile") and v then
- wasvehinair = true
- if not ( getControlState ( "accelerate" ) ) then
- if getKeyState( "arrow_l" ) == true or getKeyState( "arrow_r" ) == true or getKeyState( "a" ) == true or getKeyState( "d" ) == true then
- barel = barel + 1
- end
- if getKeyState( "arrow_u" ) == true or getKeyState( "w" ) == true then
- ff=ff+1
- end
- if getKeyState( "arrow_d" ) == true or getKeyState( "s" ) == true then
- bf = bf +1
- end
- if getKeyState( "space" ) == true then
- if getKeyState( "arrow_l" ) == true or getKeyState( "arrow_r" ) == true or getKeyState( "a" ) == true or getKeyState( "d" ) == true then
- sf = sf +1
- end
- end
- end
- end
- if isVehicleOnGround ( v ) == true and v then
- if wasvehinair then
- stuntname = ""
- if sf >=5 then
- if bf >=12 or ff >=12 then
- if barel >=12 then
- def = 0
- end
- end
- end
- if def == 0 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffSwitch back#ff6666!", 255, 255, 255, true )
- stuntname = "Switch back"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif bf>=100 or ff>=100 or barel >=100 then
- elseif bf >= 35 and barel <=14 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#66ffff What a STUNT#ff6666!", 255, 255, 255, true )
- stuntname = "What a STUNT!"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif bf >= 35 and barel <=14 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble backflip#ff6666!", 255, 255, 255, true )
- stuntname = "Double Backflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif ff >= 25 and barel <=14 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble frontflip#ff6666!", 255, 255, 255, true )
- stuntname = "Double Frontflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif bf >= 30 and barel >=30 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble side backflip#ff6666!", 255, 255, 255, true )
- stuntname = "Double Side Backflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif ff >= 25 and barel >=25 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffdouble side frontflip#ff6666!", 255, 255, 255, true )
- stuntname = "Double Side Frontflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif bf >= 15 and barel <=14 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffbackflip#ff6666!", 255, 255, 255, true )
- stuntname = "Backflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif ff >= 15 and barel <=15 then
- outputChatBox ( "#ff6666[#ffff4fSTUNT#ff6666]#ffffff You did a #66fffffrontflip#ff6666!", 255, 255, 255, true )
- stuntname = "Frontflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif bf >= 10 and barel>=10 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffside backflip#ff6666!", 255, 255, 255, true )
- stuntname = "Side Backflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif ff >= 8 and barel >=8 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffside frontflip#ff6666!", 255, 255, 255, true )
- stuntname = "Side Frontflip"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif sf >= 10 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffblade#ff6666!", 255, 255, 255, true )
- stuntname = "Blade"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- elseif barel >=15 then
- outputChatBox ( "#ff6666[#ffffffSTUNT#ff6666]#ffffff You did a #66ffffbarrel roll#ff6666!", 255, 255, 255, true )
- stuntname = "Barrel roll"
- addEventHandler("onClientRender",rootElement, drawing)
- setTimer(drawingremove,5000,1)
- end
- rt = 0
- ff = 0
- bf = 0
- sf = 0
- def = 1
- barel = 0
- wasvehinair = false
- end
- end
- end,
- 100,0)
- end
- )
- end
- addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), stunttest)
- function drawing()
- dxDrawText ( stuntname, 0, 0, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "pricedown" , "right", "bottom")
- end
- function drawingremove()
- removeEventHandler("onClientRender",rootElement, drawing)
- end
- function stuntinfo()
- outputChatBox ( "#ff6666[INFO]#ffffff Try to do #cdff00stunts#ffffff to #cdff00earn#ffffff some extra #cdff00money#ff6666!", 255, 255, 255, true )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement