Advertisement
Guest User

Untitled

a guest
Aug 13th, 2020
1,221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. local buttons = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS")
  2. while not HasScaleformMovieLoaded(buttons) do
  3. Wait(0)
  4. end
  5.  
  6. local Display = true
  7.  
  8. BeginScaleformMovieMethod(buttons, "CLEAR_ALL")
  9. EndScaleformMovieMethod()
  10.  
  11. BeginScaleformMovieMethod(buttons, "TOGGLE_MOUSE_BUTTONS")
  12. ScaleformMovieMethodAddParamBool(true)
  13. EndScaleformMovieMethod()
  14.  
  15. BeginScaleformMovieMethod(buttons, "SET_DATA_SLOT")
  16. ScaleformMovieMethodAddParamInt(0) -- position(?)
  17. ScaleformMovieMethodAddParamPlayerNameString("~INPUT_FRONTEND_ACCEPT~")
  18. PushScaleformMovieMethodParameterString("Enter (clickable)")
  19. ScaleformMovieMethodAddParamBool(true) -- make this button clickable
  20. ScaleformMovieMethodAddParamInt(201) -- what control will be pressed when you click the button
  21. EndScaleformMovieMethod()
  22.  
  23. BeginScaleformMovieMethod(buttons, "SET_DATA_SLOT")
  24. ScaleformMovieMethodAddParamInt(1)
  25. ScaleformMovieMethodAddParamPlayerNameString("~INPUT_FRONTEND_CANCEL~")
  26. PushScaleformMovieMethodParameterString("Esc (not clickable)")
  27. ScaleformMovieMethodAddParamBool(false) -- make this button not clickable
  28. ScaleformMovieMethodAddParamInt(202)
  29. EndScaleformMovieMethod()
  30.  
  31. BeginScaleformMovieMethod(buttons, "SET_BACKGROUND_COLOUR")
  32. ScaleformMovieMethodAddParamInt(0) -- r
  33. ScaleformMovieMethodAddParamInt(0) -- g
  34. ScaleformMovieMethodAddParamInt(0) -- b
  35. ScaleformMovieMethodAddParamInt(80) -- opacity
  36. EndScaleformMovieMethod()
  37.  
  38. BeginScaleformMovieMethod(buttons, "DRAW_INSTRUCTIONAL_BUTTONS")
  39. EndScaleformMovieMethod()
  40.  
  41. Citizen.CreateThread(function()
  42. while Display do
  43. Wait(0)
  44. SetMouseCursorActiveThisFrame()
  45.  
  46. if IsControlJustPressed(0, 201) or IsControlJustPressed(0, 202) then
  47. Display = false
  48.  
  49. SetScaleformMovieAsNoLongerNeeded(buttons)
  50.  
  51. BeginTextCommandThefeedPost("STRING")
  52. AddTextComponentSubstringPlayerName("Enter or esc pressed")
  53. EndTextCommandThefeedPostTicker(true, true)
  54. end
  55.  
  56. DrawScaleformMovieFullscreen(buttons, 255, 255, 255, 255, 0)
  57. end
  58. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement