Emote position setting script for FiveM servers
Features:
- No need to pre-configure
- Ready client event for use with your UI
- Customizable localization and key mapping
- Standalone (You can use it with any framework)
- Synchronized with other players
- Detailed settings in config file
- The distance for moving is limited and is also configurable
Default controls:
All controls can be changed in config and in-game. As default ones I chose the ones that I found convenient
- Q — Change Mode
- WASD — Move/Rotate
- LSHIFT/LCTRL — Move/Rotate
- E — Freeze/Unfreeze Character
- Y — Hide/Show Hud
- BACKSPACE — End Setup/Close Script
Config
-- If you're reading this — you're breathtaking ;)
Config = {}
Config.MoveSpeed = 0.03
Config.RotationSpeed = 1.5
Config.PositionRadius = 5.0
Config.SyncRange = 20.0 -- Impacts on optimization
Config.Check = 40 -- Frequency of checks (the lower the number, the smoother the character moves, but impacts on optimization too)
Config.updateAreaInterval = 5000 -- in sec (can impacts on optimization)
Config.CommandActivate = true -- Activate by command toggle
Config.CommandName = "pos" -- You can change the command
-- [IMPORTANT] — Also if you want to trigger script on your server, you can use this event to invoke it in your UI: TriggerClientEvent('beeju:emotePos', your_player_check)
-- Default controls / editable in-game and with https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids
Config.Forward = 'W' -- move/rot
Config.Backward = 'S' -- move/rot
Config.Left = 'A' -- move/rot
Config.Right = 'D' -- move/rot
Config.Up = 'LSHIFT' -- move/rot
Config.Down = 'LCONTROL' -- move/rot
Config.Freeze = 'E' -- freeze/unfreeze character
Config.Hud = 'Y' -- show/hide hood
Config.Mode = 'Q' -- change mode
Config.Done = 'BACK' -- end setup
Config.HelpTool = "~r~Default Controls:\n~y~Q: ~w~Change Mode\n~y~WASD: ~w~Move/Rotate\n~y~LSHIFT/LCTRL: ~w~Move/Rotate\n~y~E: ~w~Freeze/Unfreeze\n~y~Y: ~w~Hud\n~y~BACKSPACE: ~w~End Setup"
Config.Disable = "Deactivated"
Config.OutRange = "~r~You can't go out of range"
-- You can also customize the controls in game settings (section FiveM)
-- In-game settings localization (example: ['moveForward'] = "Вперед",)
Config.Localization = {
['moveForward'] = "Forward/Rot",
['moveBack'] = "Back/Rot",
['moveLeft'] = "Left/Rot",
['moveRight'] = "Right/Rot",
['moveUp'] = "Up/Rot",
['moveDown'] = "Down/Rot",
['freeze'] = "Freeze/Unfreeze",
['hud'] = "Hud",
['posDone'] = "End Setup",
['changeMode'] = "Change Mode"
}
-- Tooltips
Config.Helper = {
['toolTip'] = Config.HelpTool,
['toolTipOff'] = Config.Disable,
['toolTipRange'] = Config.OutRange,
}
- Toggle command — “/pos” (changeable)
At your discretion, you will be able to use “TriggerClientEvent(‘beeju:emotePos’, source)” on your server-side (as example)
Code is accessible | No, only config and server |
Subscription-based | No |
Lines (approximately) | 300+ |
Requirements | Any framework. Standalone |
Support | Yes |