Commit Graph

185 Commits

Author SHA1 Message Date
Demetrio
87b08c29c6 feat(client/raycast): allow defining distance (#296) 2023-04-17 14:50:12 +10:00
Diogo Manuel Coelho Morais dos Santos
e91be47067 feat(streaming): requestWeaponAsset (#264) 2023-04-17 14:21:40 +10:00
Dolu
b035c5aa56 feat(client/addKeybind): add defaultMapper field (#219)
This allow other mapper input like `MOUSE_BUTTON` for example.
See: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/
2023-04-17 14:11:18 +10:00
Linden
389ed5263d fix(server/addCommand): nil command name on error 2023-04-01 11:25:57 +11:00
Linden
b3b49b1cbd fix: missing and invalid types and parameters 2023-02-25 18:20:14 +11:00
Linden
c57b1a9215 fix(imports/locale): prevent error from invalid locales
People with poorly formatted json files would not get a locales table,
leading to an error when trying to iterate.
Contains some other inconsequential changes, and warnings.
2023-02-23 18:54:49 +11:00
Aaron-Downham
f5bada7aa4 refactor(import/disableControls): add missing lua typings (#231) 2023-02-22 13:26:09 +11:00
Linden
7ab2aac9be feat(imports/require): custom require for script files 2023-02-22 09:53:58 +11:00
Linden
47b8a72527 refactor(server/addCommand): add suggestion on command creation
Delayed commands should trigger the suggestion.
2023-02-22 01:30:52 +11:00
Linden
b47ae9d4fa refactor(server/addCommand): use single command handler for aliases 2023-02-22 01:27:03 +11:00
Linden
4d15b38d02 feat(imports/addCommand)!: update syntax and support param help text
BREAKING CHANGE: First parameter now holds command name(s).
Second parameter is properties, containing (optional) values for help,
restricted, and params.

See #224 for more info.
2023-02-21 19:52:12 +11:00
Luke
b56e6826a8 Merge branch 'v3' 2023-02-17 15:54:20 +01:00
Linden
250cd56896 fix(callback): return types 2023-02-06 13:22:19 +11:00
Dolu
bd51fc72e0 fix(imports): return coords getNearbyObjects and getNearbyVehicles 2023-02-03 13:11:13 +11:00
Dolu
0ea6705b16 feat(imports): getNearbyObjects and getClosestObject
Also fixed the return params types for players and vehicles imports
2023-02-03 13:11:13 +11:00
Linden
a8b9f8cde5 fix(locale/shared): phrase-construction for strings without placeholders
string.gsub returns two variables, the updated string and the pattern occurrences.
The outer string.gsub would replace n occurrences, or nothing if the string did not
contain '%'.
2023-02-01 03:20:04 +11:00
Linden
74628a5167 refactor: remove deprecated code
getCore and player modules were deprecated long ago and only used once.
2023-01-25 15:39:35 +11:00
Linden
6fbdd49702 fix(shared/locale): only construct phrases for strings 2023-01-16 18:18:51 +11:00
DokaDoka
fe58a4893f feat(table): limited merge function
adds number values and overrides everything else
2023-01-16 02:57:03 +11:00
DokaDoka
f8788d74b6 fix(client/zones): abort triangle creation if polygon is not simple 2023-01-15 16:20:11 +11:00
DokaDoka
ba9380b39a feat(client/zones): ensure polyzone is coplanar 2023-01-13 22:26:50 +11:00
DokaDoka
6e10ebe464 feat(client/zones): break triangle creating loop of it is going to deadloop 2023-01-13 16:08:37 +11:00
DokaDoka
0e052ed7c5 fix(client/zones): get diagonal offsets in 2d
avoids floating point weirdness with the z coord
2023-01-13 16:07:25 +11:00
Linden
fd5bd066ab feat(shared/locale): locale phrases 2023-01-08 15:24:36 +11:00
DokaDoka
6bfd6091d7 refactor(client/zones): break polygon into triangles with the ear clipping method 2023-01-07 19:16:36 +11:00
Errorismx
a2772a87b4 fix(client/points): nil index when nearby point is removed (#186)
Co-authored-by: Linden <65407488+thelindat@users.noreply.github.com>
2022-12-30 21:15:12 +11:00
ANTOND
e59089573a fix(imports/scaleform): return scaleform handle (#188) 2022-12-30 21:12:03 +11:00
ANTOND
c40a828465 chore(logger): ignore diagnostic warn (#183) 2022-12-30 21:10:33 +11:00
Linden
012b68a3be fix(client/zones): remove all zone references
Should resolve #191.
2022-12-30 21:07:32 +11:00
Linden
6a704c40fe refactor(client/zones): re-order zones and call onExit before onEnter
insideZones will be stored as a map rather than an array for simplicity.
Store zones the player is entering and exiting, then sort based on distance;
always triggering onExit for all zones before onEnter.
See #179.
2022-12-24 16:08:21 +11:00
Linden
b688b98bba fix(client/raycast): missing table
This was broken with 26538b8
2022-12-20 17:54:59 +11:00
Linden
0ea5725b86 refactor(imports/getCore): add removal notice
Was deprecated ~3 months ago, will be removed in the next large update.
2022-12-20 08:22:14 +11:00
TheFarFantomas
cfb3e4c7d9 feat(imports): requestScaleformMovie (#180) 2022-12-20 08:11:18 +11:00
Linden
511241e03c refactor(client/points): ensure coords are a vector 2022-12-20 08:09:35 +11:00
Linden
08a725105b fix(client/zones): disable marker rotation 2022-12-17 06:21:22 +11:00
Linden
ccad59fcf6 fix(server/logger): validate response on failed http request
One person is receiving a CURL error rather than a response from
datadog, leading to a nil index.
We'll also use the newly supported "warn" function.
2022-12-15 11:24:08 +11:00
DokaDoka
61a940a188 refactor(client/zones): redo triangle algorithm 2022-12-13 14:29:23 +11:00
Linden
124a5f15ba refactor(imports/callback): response varargs
Trying to have scrt compatible responses gets weird when using
msgpack.
2022-12-13 08:26:43 +11:00
Scully
231d1c3c77 feat: improved RedM support (#162)
* Improvements + remove redm keybind system as it's pointless
2022-11-26 13:05:55 +11:00
Linden
ed7c04ac9c refactor(client/raycast): change los flags 2022-11-26 02:02:02 +11:00
Linden
f96cb13ff4 refactor(client/addKeybind): save control hash 2022-11-24 17:31:03 +11:00
Linden
ba635b91e7 fix(client/addKeybind): get control button when indexing currentKey
Changing the key binding for a command invalidates the previous result from
GetControlInstructionalButton. Use an index metamethod for backwards
compatibility and add the getCurrentKey method.
2022-11-24 17:16:57 +11:00
Linden
00c2086072 refactor(streaming): convert to modules
Import methods rather than call via exports.
2022-11-21 21:39:05 +11:00
Linden
d2799075ad fix: types and nil-checks 2022-11-21 21:39:05 +11:00
Linden
ce5697f3b2 feat(zones): add basic zone support to the server
Quick and dirty with many features stripped (onEnter/onExit/inside).
2022-11-16 23:07:53 +11:00
Linden
9b7eef2880 fix(client/zones): convert vector4 to vector3
Sometimes people send the incorrect types, and it's apparently on us (???)
to allow them to do the wrong thing and catch their mistakes for them.
2022-11-09 16:04:03 +11:00
Ehbw2
0d2c06e982 fix(logger/loki): Fix error when passing invalid/nil tags (#139) 2022-10-26 02:30:53 +11:00
Linden
a2014502d5 refactor(addCommand): send raw input to callback
Resolves #101, just use a pattern or split the string.
2022-10-25 03:09:12 +11:00
Linden
03dcf14f7e fix(callback): multi-return values for callback method
Resolves #136
2022-10-25 03:03:03 +11:00
Linden
541e708970 refactor(addKeybind): move RegisterCommand to top 2022-10-25 02:58:39 +11:00