Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Initial Setup of Prompts
- -- All of these must be called only ONCE
- local str = CreateVarString(10, "LITERAL_STRING", text) -- Set text to what you want on the prompt
- prompt = CreatePrompt(keyHash, str, 6, 1, 1, -1) -- the 3 & 6th param must be 6 and -1 respectively otherwise prompt breaks
- PromptSetEnabled(prompt, false)
- PromptSetVisible(prompt, false)
- -- Displaying prompt
- -- These are called ONCE. Set them to false again to remove the prompt. If not set to false and the resource is restarted the prompts are then stuck on the screen.
- PromptSetEnabled(prompt, true)
- PromptSetVisible(prompt, true)
- -- Prompt Modifiers
- -- These modify how the button should be pressed. These go into the initial setup and the first param is always the prompt variable.
- -- Finite button mash
- -- iParam17 is how many times you want the button mashed
- Citizen.InvokeNative(0xDF6423BF071C7F71, prompt, iParam17)
- -- Set mash but auto fill
- -- Seems to not work as the name suggests?
- -- iParam16 must be a float for it to work but it doesn't seem to affect anything
- -- iParam17 is how many times button must be pressed
- Citizen.InvokeNative(0x6C39587D7CC66801, prompt, iParam16, iParam17)
- -- Mash indefinitely
- -- Just takes the prompt variable. Does as name suggests
- Citizen.InvokeNative(0x7B66E89312727274, prompt)
- -- Set target mode
- -- No fucking clue
- Citizen.InvokeNative(0x5F6503D9CD2754EB, prompt, 0.6, 0.5, 1)
- -- Mash with resistance
- -- iParam17 how many times to press button without resistance. Must be int
- -- iParam18 how "fast" the resistance is. Float
- -- iParam19 starting position for the prompt. Between 0.0 and 1.0. 0.0 being completely empty and 1.0 being already full. Float
- Citizen.InvokeNative(0xCD1BDFF15EFA79F5, prompt, iParam17, iParam18, iParam19)
- -- Standardized hold mode
- -- iParam24 being how long to hold it for, not in seconds. Int
- Citizen.InvokeNative(0x74C7D7B72ED0D3CF, prompt, iParam24)
- -- Mash with resistance CAN fail
- -- Same variable as mash with resistance but if the prompt runs out it turns red and the button can no longer be hit
- Citizen.InvokeNative(0xDC0CB602DEADBA53, prompt, iParam17, iParam18, iParam19)
- -- Make prompt rotate prompt
- -- Only usable with controllers
- -- iParam20 is how much to rotate
- -- iParam21 is bool and dictates if rotation should be CCW
- Citizen.InvokeNative(0x7ABE7095FB3D2581, prompt, iParam20, iParam21)
- -- The original file that these were retrieved from was https://pastebin.com/Ty4snZEe
- -- I just simply threw them ingame and testing what each needed to work and what they did.
- -- There's probably a few I missed or just didn't notice. I'm being lazy tbh. Fuck it
- -- Update 11/18/19 later in day.
- -- Figured out how to actually handle the prompts being completed/progress of the prompts.
- -- To get the current progress of a mash MODE prompt. ONLY WORKS ON MASH DOES NOT WORK ON HOLD
- print(Citizen.InvokeNative(0x8A9585293863B8A5, prompt, Citizen.ResultAsFloat()))
- -- This returns a value from 0.0 to 1.0, pretty much a percent on how complete the prompt is.
- -- Checks to see if the specified MASH mode prompt completes. Must be a mash prompt.
- Citizen.InvokeNative(0x845CE958416DC473, prompt) -- Will return false when not on screen/not completed. Returns 1 when completed
- -- Also a native to check to see if the MASH mode prompt fails.
- Citizen.InvokeNative(0x25B18E530CF39D6F, prompt) -- Also returns false and 1.
- -- Checks to see if HOLD mode prompt is completed
- Citizen.InvokeNative(0xE0F65F0640EF0617, prompt)
- -- Checks to see if STANDARD mode prompt is complete, triggers very quickly and then resets.
- -- The second param must be false for it to work. Unknown what 2nd param does.
- -- The prompt must also be set as a standard prompt by doing Citizen.InvokeNative(0xCC6656799977741B, prompt, 0)
- Citizen.InvokeNative(0xC92AC953F0A982AE, prompt, false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement