mirror of
https://github.com/jimathy/rpemotes.git
synced 2026-07-22 13:43:34 -04:00
* fix: only setup +-crouch keys if enabled Keys only need to be set up if keybinding is enabled. * dev: move function * fix: add ragdoll test * refactor: get player ped after anim loaded * grammar * refactor: add return to AttemptCrouch returns if it was successful * style: add category name * feat: add crawling * fix: added missing config Config was missing, sorry! * refactor: use PlayAnimOnce We should use PlayAnimOnce here as it would lower the complexity and make the code easier to read. * feat: add exports Add exports to be used by other developers when creating scripts for their own servers. * refactor: redo config setup * refactor: add blendInSpeed to PlayAnimOnce * refactor: use local function instead of global local functions are much faster to load then global ones. * refactor: redo CrouchKeyPressed Rewrite the entire function to use new configs * style: remove commented code * dev: add new version of crawl A temporary version of crawl, still in development. * refactor: make isProne a global variable Add @iSentrie 's suggestion to make isProne a global variable so it can be used in Emotes.lua to prevent animations being played while crawling. Co-authored-by: iSentrie <xvender7@gmail.com> * refactor: make global isProne uppercase * fix: add prone check before playing anim Add a check to see if we are prone before we play any animations. TODO: This needs to be translated for all the different languages. Co-Authored-By: iSentrie <29688478+iSentrie@users.noreply.github.com> * refactor: add function for idle crawl anim * refactor: increase blend in speed * refactor: add ChangeHeadingSmooth func * feat: add on back rotation anims * feat: use PlayAnimOnce instead * style: whitespace * feat: add config to disable keybinds * fix: convert to PlayAnimOnce func We aren't loading anim dict, let's use PlayAnimOnce instead to make it simple. * Update config default states * refactor: remove unnecessary variable keyPressed is just not needed, the command 'crouch' should't be fired at the same time regardless, so this can be safely removed. * refactor: merge functions * refactor: increase timer Increase the amount of time we should wait before we move to the idle state again. * fix: check if we are in water Only needs to be in crawl, you should be able to crouch along the waterfront. ClearPedTasks is also necessary to prevent the player getting stuck in an animation. * refactor: remove chat message As @iSentrie pointed out these are annoying in some situations. It's pretty self-explanatory why you can't crouch/crawl when these appear anyway. Co-Authored-By: iSentrie <29688478+iSentrie@users.noreply.github.com> * refactor: separate out exit crawl animations * refactor: better crawl entry anim * refactor: allow heading input on PlayIdleCrawlAnim * refactor: use PlayIdleCrawlAnim instead * fix: add inAction checks Fixes issues @iSentrie commented on. This may not cover all situations, needs more testing. * refactor: flip anim I've yet to find any good anims for this, this is the best, or least worst I've found so far. Better to have something then to literately do a flip. * fix: add point checks Disable pointing while crawling. * fix: remove clipsetreset There should be no reason to reset the clipset/walkstyle. This will only mess with crouching. * fix: disable weapon switching while prone * fix: don't play idle anim if we can't crawl We shouldn't play the anim as it will lead to weird behavior when ragdolling/falling while entry anim is played. * fix: move inAction Only set inAction to true when we actually can lay down. * fix: missing pointing check I'll just sneak this in here, "nobody will notice". * fix: check if in animation We should check if we are in an animation before crawling. * refactor: remove command args Remove command args to clean thing up. Suggested by @iSentrie Co-Authored-By: iSentrie <29688478+iSentrie@users.noreply.github.com> * refactor: cancel emote on crawl As suggested by @iSentrie Co-Authored-By: iSentrie <29688478+iSentrie@users.noreply.github.com> * Add comments * fix: add water checks Add checks, to lazy to type more, read the code. * fix: correct check statement Don't juge me, it's late ok Co-authored-by: iSentrie <xvender7@gmail.com> Co-authored-by: iSentrie <29688478+iSentrie@users.noreply.github.com>
89 lines
4.9 KiB
Lua
89 lines
4.9 KiB
Lua
--- Maintained by TayMcKenzieNZ for the community ---
|
|
--- Leakers and resellers are the absolute scum of the earth ---
|
|
|
|
Config = {
|
|
-- Change the language of the menu here!.
|
|
-- Thank you to those who provided translations.
|
|
-- If you would like to provide translations or help fix them, join our Discord!
|
|
-- Check languages code below to change the MenuLanguage
|
|
MenuLanguage = 'en',
|
|
-- Set this to true to enable some extra prints
|
|
DebugDisplay = false,
|
|
-- Set this to false if you have something else on X, and then just use /e c to cancel emotes.
|
|
EnableXtoCancel = true,
|
|
CancelEmoteKey = 'x', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
-- Set this to true if you want to disarm the player when they play an emote.
|
|
DisarmPlayer = false,
|
|
-- Set this if you really wanna disable emotes in cars, as of 1.7.2 they only play the upper body part if in vehicle
|
|
AllowedInCars = true,
|
|
-- You can disable the menu here / change the keybind. It is currently set to F5
|
|
MenuKeybindEnabled = true,
|
|
MenuKeybind = 'f4', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
-- You can disable the Favorite emote keybinding here.
|
|
FavKeybindEnabled = true,
|
|
FavKeybind = 'capital', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
-- You can change the header image for the menu here
|
|
-- Use a 512 x 128 image!
|
|
-- Note this might cause an issue of the image getting stuck on peoples screens
|
|
CustomMenuEnabled = true,
|
|
MenuImage = "https://i.giphy.com/media/kL2WStvEEokt0MioqC/giphy.gif", ----[Custom banner IMGUR or GIPHY URLs go here ]---
|
|
-- You can change the menu image by pasting a link above. It must be the same width and length
|
|
-- You can change the name of the menu here or leave it blank to remove the text in front of the custom banners
|
|
MenuTitle = "",
|
|
-- You can change the menu position here
|
|
MenuPosition = "right", -- (left, right)
|
|
-- You can enable or disable the Ragdoll keybinding here.
|
|
RagdollEnabled = false,
|
|
RagdollKeybind = 'u', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
-- You can enable or disable Ragdoll as Toggle here. Only works if RagdollEnabled is set to true.
|
|
RagdollAsToggle = true,
|
|
-- You can disable the Facial Expressions menu here.
|
|
ExpressionsEnabled = true,
|
|
-- You can disable the Walking Styles menu here.
|
|
WalkingStylesEnabled = true,
|
|
-- Saves walk styles to client and applies them periodically
|
|
PersistentWalk = true,
|
|
-- Polling period to apply persistent walkstyles
|
|
PersistencePollPeriod = 60000,
|
|
-- You can disable the Shared Emotes here.
|
|
SharedEmotesEnabled = true,
|
|
-- If you have the SQL imported enable this to turn on keybinding.
|
|
SqlKeybinding = false,
|
|
-- If you don't like gta notifications, you can disable them here to have messages in the chat.
|
|
NotificationsAsChatMessage = false,
|
|
-- Used for few framework dependent things. Accepted values: "qb-core", false
|
|
Framework = false,
|
|
-- You can disable the Adult Emotes here.
|
|
AdultEmotesDisabled = false,
|
|
-- You can disable the Animal Emotes here.
|
|
AnimalEmotesEnabled = true,
|
|
-- Used to enable or disable the search feature in the menu.
|
|
Search = true,
|
|
-- You can disable the handsup here / change the keybind. It is currently set to H
|
|
HandsupKeybindEnabled = false,
|
|
HandsupKeybind = 'h', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
-- You can disable the fingrer pointing here / change the keybind. It is currently set to B
|
|
PointingKeybindEnabled = false,
|
|
PointingKeybind = 'b', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
-- If crouching should be enabled.
|
|
CrouchEnabled = true,
|
|
CrouchKeybindEnabled = true, -- If true, crouching will use keybinds.
|
|
CrouchKeybind = 'lcontrol', -- The default crouch keybind, get the button string here: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
CrouchOverride = false, -- If true, you won't enter stealth mode even if the crouch key and the "duck" key are the same.
|
|
-- If crawling should be enabled.
|
|
CrawlEnabled = true,
|
|
CrawlKeybindEnabled = true, -- If true, crawling will use keybinds.
|
|
CrawlKeybind = 'rcontrol', -- The default crawl keybind, get the button string here: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
|
-- Check for updates
|
|
CheckForUpdates = true,
|
|
}
|
|
|
|
Config.KeybindKeys = {
|
|
['num4'] = 108,
|
|
['num5'] = 110,
|
|
['num6'] = 109,
|
|
['num7'] = 117,
|
|
['num8'] = 111,
|
|
['num9'] = 118
|
|
}
|