From a8c744c468b3be15685e473fc284fbc7e14436f0 Mon Sep 17 00:00:00 2001 From: colistro123 Date: Sun, 10 Nov 2024 05:42:05 +0100 Subject: [PATCH] Reorganize Documentation and Fix Broken Links This PR addresses several issues in the documentation, including incorrect links and inconsistencies in the navigation bar. Notably, the 'Developer Docs' section contained content like "Securing Events," which seemed out of scope. Additionally, there was a structural issue with the naming and placement of sections. Both 'Guides for Scripting' and 'Scripting Reference' were outside the 'Developer Docs', even though they are developer-oriented. This PR reorganizes these sections under 'Developer Docs' for better logical grouping. I also implemented a parser to verify and correct markdown URLs across the documentation. The parser flagged multiple broken links, which have been fixed in this PR. The broken links are reflected down below, the parser can be found [here](https://github.com/colistro123/doc-tools/tree/master/check-links). ``` Broken URL: https://fivem.net/docs/resources/spawnmanager/functions/setAutoSpawn/functions/forceRespawn/ (from file: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/resources/spawnmanager/functions/setAutoSpawn.md, link: ./functions/forceRespawn) Broken URL: https://fivem.net/docs/resources/spawnmanager/functions/setAutoSpawn/functions/setAutoSpawnCallback/ (from file: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/resources/spawnmanager/functions/setAutoSpawn.md, link: ./functions/setAutoSpawnCallback) Broken URL: https://fivem.net/docs/resources/spawnmanager/functions/setAutoSpawn/functions/spawnPlayer/ (from file: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/resources/spawnmanager/functions/setAutoSpawn.md, link: ./functions/spawnPlayer) Broken URL: https://fivem.net/docs/resources/spawnmanager/functions/spawnPlayer/functions/setAutoSpawn/ (from file: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/resources/spawnmanager/functions/spawnPlayer.md, link: ./functions/setAutoSpawn) Broken URL: https://fivem.net/docs/resources/spawnmanager/functions/spawnPlayer/functions/addSpawnPoint/ (from file: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/resources/spawnmanager/functions/spawnPlayer.md, link: ./functions/addSpawnPoint) Broken URL ('.md' extension present): /content/docs/scripting-manual/introduction/creating-your-first-script.md Path: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/scripting-manual/introduction/about-native-functions.md Broken URL: https://fivem.net/docs/content/scripting-manual/introduction/creating-your-first-script/ (from file: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/scripting-manual/introduction/about-native-functions.md, link: /content/scripting-manual/introduction/creating-your-first-script.md) Broken URL: https://fivem.net/docs/scripting-manual/nui-development/cef/ (from file: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/scripting-manual/nui-development/_index.md, link: cef) Broken URL ('.md' extension present): /docs/scripting-manual/networking/state-bags.md Path: D:/Users/Ignacio/Desktop/Projects/Resources (Projects that are not mine)/fivem-docs/content/docs/scripting-reference/_index.md ``` --- content/docs/_index.md | 6 ++-- .../docs/client-manual/console-commands.md | 2 +- content/docs/client-manual/crosshair.md | 2 +- content/docs/developers/_index.md | 24 ++++++++++--- .../developers/scripting-manual/_index.md | 32 +++++++++++++++++ .../scripting-manual/debugging/_index.md | 0 .../debugging/using-profiler.md | 0 .../scripting-manual/introduction/_index.md | 11 ++++++ .../introduction/about-native-functions.md | 4 +-- .../creating-your-first-script-csharp.md | 6 ++-- .../creating-your-first-script-javascript.md | 4 +-- .../creating-your-first-script.md | 2 +- .../introduction/fact-sheet.md | 36 +++++++++---------- .../introduction/introduction-to-resources.md | 2 +- .../migrating-from-deprecated/_index.md | 4 +-- .../chat-messages.md | 2 +- .../creating-commands.md | 0 .../scripting-manual/networking/_index.md | 0 .../scripting-manual/networking/ids.md | 0 .../scripting-manual/networking/state-bags.md | 0 .../nui-development/_index.md | 13 +++++++ .../scripting-manual/nui-development/dui.md | 0 .../nui-development/full-screen-nui.md | 4 +-- .../nui-development/loading-screens/_index.md | 2 +- .../loading-screens/endDataFileEntries.md | 0 .../loading-screens/endInitFunction.md | 0 .../loading-screens/initFunctionInvoked.md | 0 .../loading-screens/initFunctionInvoking.md | 0 .../loading-screens/loadProgress.md | 0 .../loading-screens/onDataFileEntry.md | 0 .../loading-screens/onLogLine.md | 0 .../loading-screens/performMapLoadFunction.md | 0 .../loading-screens/startDataFileEntries.md | 0 .../loading-screens/startInitFunction.md | 0 .../loading-screens/startInitFunctionOrder.md | 0 .../nui-development/nui-callbacks.md | 2 +- .../scripting-manual/runtimes/_index.md | 13 +++++++ .../scripting-manual/runtimes/csharp.md | 2 +- .../scripting-manual/runtimes/javascript.md | 4 +-- .../scripting-manual/runtimes/lua.md | 16 ++++----- .../using-new-game-features/_index.md | 4 +-- .../collection-based-natives.md | 0 .../fuel-consumption.md | 0 .../using-scaleform/_index.md | 0 .../scripting-manual/voice/_index.md | 0 .../working-with-events/_index.md | 12 +++---- .../working-with-events/event-cancelation.md | 0 .../listening-for-events.md | 0 .../working-with-events}/server-security.md | 5 +-- .../working-with-events/triggering-events.md | 0 .../developers/scripting-reference/_index.md | 32 +++++++++++++++++ .../client-functions/_index.md | 6 ++-- .../scripting-reference/convars/_index.md | 0 .../scripting-reference/events/_index.md | 9 +++++ .../events/client-events/_index.md | 0 .../scripting-reference/events/list/_index.md | 0 .../events/list/gameEventTriggered.md | 0 .../events/list/onClientResourceStart.md | 0 .../events/list/onClientResourceStop.md | 0 .../events/list/onResourceStart.md | 0 .../events/list/onResourceStarting.md | 0 .../events/list/onResourceStop.md | 0 .../events/list/playerConnecting.md | 0 .../events/list/playerDropped.md | 0 .../events/list/populationPedCreating.md | 0 .../events/list/rconCommand.md | 0 .../events/list/respawnPlayerPedEvent.md | 0 .../list/vehicleComponentControlEvent.md | 0 .../events/server-events/_index.md | 0 .../scripting-reference/onesync/_index.md | 4 +-- .../resource-manifest/resource-manifest.md | 4 +-- .../scripting-reference/runtimes/_index.md | 9 +++++ .../runtimes/csharp/_index.md | 9 +++++ .../runtimes/csharp/client-functions.md | 0 .../runtimes/csharp/server-functions.md | 0 .../runtimes/javascript/_index.md | 9 +++++ .../runtimes/javascript/client-functions.md | 15 ++++++++ .../javascript/functions/RegisterNetEvent.md | 0 .../runtimes/javascript/functions/_index.md | 0 .../functions/addRawEventListener.md | 0 .../javascript/functions/clearTick.md | 2 +- .../javascript/functions/emit-client.md | 2 +- .../javascript/functions/emit-server.md | 2 +- .../javascript/functions/emitNet-client.md | 2 +- .../javascript/functions/emitNet-server.md | 2 +- .../runtimes/javascript/functions/exports.md | 0 .../javascript/functions/on-client.md | 2 +- .../javascript/functions/on-server.md | 2 +- .../javascript/functions/onNet-client.md | 2 +- .../javascript/functions/onNet-server.md | 2 +- .../functions/removeEventListener.md | 0 .../runtimes/javascript/functions/setTick.md | 2 +- .../runtimes/javascript/server-functions.md | 16 +++++++++ .../runtimes/lua/_index.md | 9 +++++ .../runtimes/lua/client-functions.md | 26 ++++++++++++++ .../runtimes/lua/functions/AddEventHandler.md | 4 +-- .../runtimes/lua/functions/Citizen.Await.md | 0 .../lua/functions/Citizen.CanonicalizeRef.md | 0 .../lua/functions/Citizen.CreateThread.md | 2 +- .../lua/functions/Citizen.CreateThreadNow.md | 0 .../functions/Citizen.GetFunctionReference.md | 0 .../Citizen.InvokeFunctionReference.md | 0 .../lua/functions/Citizen.InvokeNative.md | 0 .../functions/Citizen.PointerValueFloat.md | 0 .../Citizen.PointerValueFloatInitialized.md | 0 .../lua/functions/Citizen.PointerValueInt.md | 0 .../Citizen.PointerValueIntInitialized.md | 0 .../functions/Citizen.PointerValueVector.md | 0 .../lua/functions/Citizen.ResultAsFloat.md | 0 .../lua/functions/Citizen.ResultAsInteger.md | 0 .../lua/functions/Citizen.ResultAsLong.md | 0 .../lua/functions/Citizen.ResultAsObject.md | 0 .../lua/functions/Citizen.ResultAsString.md | 0 .../lua/functions/Citizen.ResultAsVector.md | 0 .../functions/Citizen.ReturnResultAnyway.md | 0 .../functions/Citizen.SetCallRefRoutine.md | 0 .../functions/Citizen.SetDeleteRefRoutine.md | 0 .../Citizen.SetDuplicateRefRoutine.md | 0 .../lua/functions/Citizen.SetEventRoutine.md | 0 .../lua/functions/Citizen.SetTickRoutine.md | 0 .../lua/functions/Citizen.SetTimeout.md | 0 .../runtimes/lua/functions/Citizen.Trace.md | 0 .../runtimes/lua/functions/Citizen.Wait.md | 0 .../lua/functions/GetPlayerIdentifiers.md | 0 .../runtimes/lua/functions/GetPlayers.md | 0 .../lua/functions/PerformHttpRequest.md | 0 .../lua/functions/PerformHttpRequestAwait.md | 2 +- .../lua/functions/RegisterNUICallback.md | 0 .../lua/functions/RegisterNetEvent.md | 2 +- .../lua/functions/RemoveEventHandler.md | 2 +- .../runtimes/lua/functions/SendNUIMessage.md | 0 .../lua/functions/TriggerClientEvent.md | 4 +-- .../runtimes/lua/functions/TriggerEvent.md | 0 .../lua/functions/TriggerServerEvent.md | 0 .../runtimes/lua/functions/_index.md | 23 ++++++++++++ .../runtimes/lua/functions/cross.md | 0 .../runtimes/lua/functions/dot.md | 0 .../runtimes/lua/functions/inv.md | 0 .../runtimes/lua/functions/norm.md | 0 .../runtimes/lua/functions/promise.all.md | 0 .../runtimes/lua/functions/promise.first.md | 0 .../runtimes/lua/functions/promise.map.md | 0 .../runtimes/lua/functions/promise.new.md | 0 .../runtimes/lua/functions/quat.md | 4 +-- .../runtimes/lua/functions/slerp.md | 0 .../runtimes/lua/functions/vec.md | 6 ++-- .../runtimes/lua/functions/vector2.md | 2 +- .../runtimes/lua/functions/vector3.md | 4 +-- .../runtimes/lua/functions/vector4.md | 2 +- .../runtimes/lua/server-functions.md | 23 ++++++++++++ .../server-functions/_index.md | 6 ++-- content/docs/fxdk/resources.md | 8 ++--- content/docs/game-references/data-files.md | 2 +- content/docs/game-references/game-events.md | 2 +- .../chat/events/chat-addSuggestions.md | 2 +- .../chat/events/chat-removeSuggestion.md | 2 +- .../docs/resources/chat/events/chatMessage.md | 2 +- .../spawnmanager/functions/setAutoSpawn.md | 6 ++-- .../spawnmanager/functions/spawnPlayer.md | 4 +-- content/docs/scripting-manual/_index.md | 32 ----------------- .../scripting-manual/introduction/_index.md | 11 ------ .../nui-development/_index.md | 13 ------- .../docs/scripting-manual/runtimes/_index.md | 13 ------- content/docs/scripting-reference/_index.md | 32 ----------------- .../docs/scripting-reference/events/_index.md | 9 ----- .../scripting-reference/runtimes/_index.md | 9 ----- .../runtimes/csharp/_index.md | 9 ----- .../runtimes/javascript/_index.md | 9 ----- .../runtimes/javascript/client-functions.md | 15 -------- .../runtimes/javascript/server-functions.md | 16 --------- .../runtimes/lua/_index.md | 9 ----- .../runtimes/lua/client-functions.md | 26 -------------- .../runtimes/lua/functions/_index.md | 23 ------------ .../runtimes/lua/server-functions.md | 23 ------------ .../docs/server-manual/setting-up-a-server.md | 2 +- 175 files changed, 381 insertions(+), 366 deletions(-) create mode 100644 content/docs/developers/scripting-manual/_index.md rename content/docs/{ => developers}/scripting-manual/debugging/_index.md (100%) rename content/docs/{ => developers}/scripting-manual/debugging/using-profiler.md (100%) create mode 100644 content/docs/developers/scripting-manual/introduction/_index.md rename content/docs/{ => developers}/scripting-manual/introduction/about-native-functions.md (96%) rename content/docs/{ => developers}/scripting-manual/introduction/creating-your-first-script-csharp.md (94%) rename content/docs/{ => developers}/scripting-manual/introduction/creating-your-first-script-javascript.md (98%) rename content/docs/{ => developers}/scripting-manual/introduction/creating-your-first-script.md (99%) rename content/docs/{ => developers}/scripting-manual/introduction/fact-sheet.md (60%) rename content/docs/{ => developers}/scripting-manual/introduction/introduction-to-resources.md (96%) rename content/docs/{ => developers}/scripting-manual/migrating-from-deprecated/_index.md (62%) rename content/docs/{ => developers}/scripting-manual/migrating-from-deprecated/chat-messages.md (93%) rename content/docs/{ => developers}/scripting-manual/migrating-from-deprecated/creating-commands.md (100%) rename content/docs/{ => developers}/scripting-manual/networking/_index.md (100%) rename content/docs/{ => developers}/scripting-manual/networking/ids.md (100%) rename content/docs/{ => developers}/scripting-manual/networking/state-bags.md (100%) create mode 100644 content/docs/developers/scripting-manual/nui-development/_index.md rename content/docs/{ => developers}/scripting-manual/nui-development/dui.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/full-screen-nui.md (94%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/_index.md (97%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/endDataFileEntries.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/endInitFunction.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/initFunctionInvoked.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/initFunctionInvoking.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/loadProgress.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/onDataFileEntry.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/onLogLine.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/performMapLoadFunction.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/startDataFileEntries.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/startInitFunction.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/loading-screens/startInitFunctionOrder.md (100%) rename content/docs/{ => developers}/scripting-manual/nui-development/nui-callbacks.md (96%) create mode 100644 content/docs/developers/scripting-manual/runtimes/_index.md rename content/docs/{ => developers}/scripting-manual/runtimes/csharp.md (96%) rename content/docs/{ => developers}/scripting-manual/runtimes/javascript.md (96%) rename content/docs/{ => developers}/scripting-manual/runtimes/lua.md (84%) rename content/docs/{ => developers}/scripting-manual/using-new-game-features/_index.md (59%) rename content/docs/{ => developers}/scripting-manual/using-new-game-features/collection-based-natives.md (100%) rename content/docs/{ => developers}/scripting-manual/using-new-game-features/fuel-consumption.md (100%) rename content/docs/{ => developers}/scripting-manual/using-scaleform/_index.md (100%) rename content/docs/{ => developers}/scripting-manual/voice/_index.md (100%) rename content/docs/{ => developers}/scripting-manual/working-with-events/_index.md (62%) rename content/docs/{ => developers}/scripting-manual/working-with-events/event-cancelation.md (100%) rename content/docs/{ => developers}/scripting-manual/working-with-events/listening-for-events.md (100%) rename content/docs/developers/{ => scripting-manual/working-with-events}/server-security.md (97%) rename content/docs/{ => developers}/scripting-manual/working-with-events/triggering-events.md (100%) create mode 100644 content/docs/developers/scripting-reference/_index.md rename content/docs/{ => developers}/scripting-reference/client-functions/_index.md (69%) rename content/docs/{ => developers}/scripting-reference/convars/_index.md (100%) create mode 100644 content/docs/developers/scripting-reference/events/_index.md rename content/docs/{ => developers}/scripting-reference/events/client-events/_index.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/_index.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/gameEventTriggered.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/onClientResourceStart.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/onClientResourceStop.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/onResourceStart.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/onResourceStarting.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/onResourceStop.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/playerConnecting.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/playerDropped.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/populationPedCreating.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/rconCommand.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/respawnPlayerPedEvent.md (100%) rename content/docs/{ => developers}/scripting-reference/events/list/vehicleComponentControlEvent.md (100%) rename content/docs/{ => developers}/scripting-reference/events/server-events/_index.md (100%) rename content/docs/{ => developers}/scripting-reference/onesync/_index.md (98%) rename content/docs/{ => developers}/scripting-reference/resource-manifest/resource-manifest.md (97%) create mode 100644 content/docs/developers/scripting-reference/runtimes/_index.md create mode 100644 content/docs/developers/scripting-reference/runtimes/csharp/_index.md rename content/docs/{ => developers}/scripting-reference/runtimes/csharp/client-functions.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/csharp/server-functions.md (100%) create mode 100644 content/docs/developers/scripting-reference/runtimes/javascript/_index.md create mode 100644 content/docs/developers/scripting-reference/runtimes/javascript/client-functions.md rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/RegisterNetEvent.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/_index.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/addRawEventListener.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/clearTick.md (86%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/emit-client.md (66%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/emit-server.md (67%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/emitNet-client.md (76%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/emitNet-server.md (83%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/exports.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/on-client.md (79%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/on-server.md (77%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/onNet-client.md (70%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/onNet-server.md (71%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/removeEventListener.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/javascript/functions/setTick.md (79%) create mode 100644 content/docs/developers/scripting-reference/runtimes/javascript/server-functions.md create mode 100644 content/docs/developers/scripting-reference/runtimes/lua/_index.md create mode 100644 content/docs/developers/scripting-reference/runtimes/lua/client-functions.md rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/AddEventHandler.md (78%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.Await.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.CanonicalizeRef.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.CreateThread.md (92%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.CreateThreadNow.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.GetFunctionReference.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.InvokeFunctionReference.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.InvokeNative.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloat.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloatInitialized.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.PointerValueInt.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.PointerValueIntInitialized.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.PointerValueVector.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.ResultAsFloat.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.ResultAsInteger.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.ResultAsLong.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.ResultAsObject.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.ResultAsString.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.ResultAsVector.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.ReturnResultAnyway.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.SetCallRefRoutine.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.SetDeleteRefRoutine.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.SetDuplicateRefRoutine.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.SetEventRoutine.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.SetTickRoutine.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.Trace.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/Citizen.Wait.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/GetPlayers.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/PerformHttpRequest.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait.md (82%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/RegisterNUICallback.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/RegisterNetEvent.md (89%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/RemoveEventHandler.md (81%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/SendNUIMessage.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/TriggerClientEvent.md (84%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/TriggerEvent.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/TriggerServerEvent.md (100%) create mode 100644 content/docs/developers/scripting-reference/runtimes/lua/functions/_index.md rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/cross.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/dot.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/inv.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/norm.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/promise.all.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/promise.first.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/promise.map.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/promise.new.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/quat.md (96%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/slerp.md (100%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/vec.md (86%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/vector2.md (97%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/vector3.md (95%) rename content/docs/{ => developers}/scripting-reference/runtimes/lua/functions/vector4.md (97%) create mode 100644 content/docs/developers/scripting-reference/runtimes/lua/server-functions.md rename content/docs/{ => developers}/scripting-reference/server-functions/_index.md (68%) delete mode 100644 content/docs/scripting-manual/_index.md delete mode 100644 content/docs/scripting-manual/introduction/_index.md delete mode 100644 content/docs/scripting-manual/nui-development/_index.md delete mode 100644 content/docs/scripting-manual/runtimes/_index.md delete mode 100644 content/docs/scripting-reference/_index.md delete mode 100644 content/docs/scripting-reference/events/_index.md delete mode 100644 content/docs/scripting-reference/runtimes/_index.md delete mode 100644 content/docs/scripting-reference/runtimes/csharp/_index.md delete mode 100644 content/docs/scripting-reference/runtimes/javascript/_index.md delete mode 100644 content/docs/scripting-reference/runtimes/javascript/client-functions.md delete mode 100644 content/docs/scripting-reference/runtimes/javascript/server-functions.md delete mode 100644 content/docs/scripting-reference/runtimes/lua/_index.md delete mode 100644 content/docs/scripting-reference/runtimes/lua/client-functions.md delete mode 100644 content/docs/scripting-reference/runtimes/lua/functions/_index.md delete mode 100644 content/docs/scripting-reference/runtimes/lua/server-functions.md diff --git a/content/docs/_index.md b/content/docs/_index.md index 13dad08dd..c5b995b05 100644 --- a/content/docs/_index.md +++ b/content/docs/_index.md @@ -15,10 +15,10 @@ Welcome to the documentation for the [FiveM][home] modification framework. Use t ## Asset developers * 🧐 Get started developing assets for FiveM using our [🧰 Cfx.re Development Kit](./fxdk), - learn what [🎯 resources](./scripting-manual/introduction/introduction-to-resources) are, or get started with [πŸ“Ÿ scripting](./scripting-manual/introduction) for FiveM. + learn what [🎯 resources](./developers/scripting-manual/introduction/introduction-to-resources) are, or get started with [πŸ“Ÿ scripting](./developers/scripting-manual/introduction) for FiveM. * πŸ“š Look at the [🏞 native reference](/natives/) to find functions to use. -* 🀯 Already experienced with development? Check out the [🧾 fact sheet](./scripting-manual/introduction/fact-sheet) to get some quick info. -* πŸ“’ There's helpful [πŸ₯‘ guides](./scripting-reference/) for scripting, or [πŸ‘½ a reference](./game-references/) of game-related information. +* 🀯 Already experienced with development? Check out the [🧾 fact sheet](./developers/scripting-manual/introduction/fact-sheet) to get some quick info. +* πŸ“’ There's helpful [πŸ₯‘ guides](./developers/scripting-reference/) for scripting, or [πŸ‘½ a reference](./game-references/) of game-related information. [home]: https://fivem.net [forum]: https://forum.cfx.re diff --git a/content/docs/client-manual/console-commands.md b/content/docs/client-manual/console-commands.md index 0602a0572..8e2145ef4 100644 --- a/content/docs/client-manual/console-commands.md +++ b/content/docs/client-manual/console-commands.md @@ -392,4 +392,4 @@ Example: `test_ace group.admin command.adminstuff` [faq-data]: https://support.cfx.re/hc/en-us/articles/8016397932444-Client-FAQ#where-is-fivem-installed [vconsole]: https://forum.cfx.re/t/20005 -[manifest-reference]: /docs/scripting-reference/resource-manifest/resource-manifest/ +[manifest-reference]: /docs/developers/scripting-reference/resource-manifest/resource-manifest/ diff --git a/content/docs/client-manual/crosshair.md b/content/docs/client-manual/crosshair.md index e09f038a0..c901c9400 100644 --- a/content/docs/client-manual/crosshair.md +++ b/content/docs/client-manual/crosshair.md @@ -124,4 +124,4 @@ The crosshair can be disabled from the server by entering the following line in setr cl_customCrosshair false ``` -Entering said line will set the [convar](https://docs.fivem.net/docs/scripting-reference/convars/#standard-convars) (console variable) as a [replicated variable](https://docs.fivem.net/docs/scripting-reference/convars/#using-commands-1) set to `false`. \ No newline at end of file +Entering said line will set the [convar](https://docs.fivem.net/docs/developers/scripting-reference/convars/#standard-convars) (console variable) as a [replicated variable](https://docs.fivem.net/docs/developers/scripting-reference/convars/#using-commands-1) set to `false`. \ No newline at end of file diff --git a/content/docs/developers/_index.md b/content/docs/developers/_index.md index c9fdbef98..666d22f0e 100644 --- a/content/docs/developers/_index.md +++ b/content/docs/developers/_index.md @@ -1,12 +1,26 @@ --- title: Developer docs -weight: 900 +weight: 500 --- -This section of the documentation is specific to the core mechanics of FiveM. +## Welcome to the Developer Documentation -- [Coding guidelines](/docs/developers/coding-guidelines) +This section provides comprehensive coverage of topics ranging from core FiveM mechanics to advanced event handling. -- [Compiling FiveM](/docs/developers/compiling-fivem) +### Where to Start -- [Script runtimes](/docs/developers/script-runtimes) \ No newline at end of file +If you’re new to scripting, we highly recommend starting with **[Guides for Scripting](/docs/developers/scripting-manual)**. This will introduce you to the fundamentals and help you build a solid foundation. + +### Explore Further + +- **[Guides for Scripting](/docs/developers/scripting-manual)** + Step-by-step tutorials and practical examples to help you get started. + +- **[Script Runtimes](/docs/developers/script-runtimes)** + Learn about the different runtimes available for scripting in FiveM. + +- **[Scripting Reference](/docs/developers/scripting-reference)** + A complete reference guide for available functions, events, and more. + + + \ No newline at end of file diff --git a/content/docs/developers/scripting-manual/_index.md b/content/docs/developers/scripting-manual/_index.md new file mode 100644 index 000000000..6c50684d9 --- /dev/null +++ b/content/docs/developers/scripting-manual/_index.md @@ -0,0 +1,32 @@ +--- +title: Guides for scripting +weight: 400 +layout: single +--- + +- [Scripting introduction](/docs/developers/scripting-manual/introduction) + - [Introduction to resources](/docs/developers/scripting-manual/introduction/introduction-to-resources) + - [Creating your first script](/docs/developers/scripting-manual/introduction/creating-your-first-script) + - [About native functions](/docs/developers/scripting-manual/introduction/about-native-functions) +- [Scripting runtimes](/docs/developers/scripting-manual/runtimes) + - [Scripting in Lua](/docs/developers/scripting-manual/runtimes/lua) + - [Scripting in JavaScript](/docs/developers/scripting-manual/runtimes/javascript) + - [Scripting in C#](/docs/developers/scripting-manual/runtimes/csharp) +- [Migrating from deprecated methods](/docs/developers/scripting-manual/migrating-from-deprecated) + - [Chat Messages](/docs/developers/scripting-manual/migrating-from-deprecated/chat-messages) +- [Working with events](/docs/developers/scripting-manual/working-with-events) + - [Listening for events](/docs/developers/scripting-manual/working-with-events/listening-for-events) + - [Triggering events](/docs/developers/scripting-manual/working-with-events/triggering-events) + + + +- [User interfaces with NUI](/docs/developers/scripting-manual/nui-development) + - [Fullscreen NUI](/docs/developers/scripting-manual/nui-development/full-screen-nui) + - [Direct-rendered UI (DUI)](/docs/developers/scripting-manual/nui-development/dui) + - [NUI callbacks](/docs/developers/scripting-manual/nui-development/nui-callbacks) + - [Loading screens](/docs/developers/scripting-manual/nui-development/loading-screens) +- [Using Scaleform](/docs/developers/scripting-manual/using-scaleform) +- [Voice](/docs/developers/scripting-manual/voice) +- [Using new game features](/docs/developers/scripting-manual/using-new-game-features) + - [Fuel consumption](/docs/developers/scripting-manual/using-new-game-features/fuel-consumption) + - [Collection-based natives](/docs/developers/scripting-manual/using-new-game-features/collection-based-natives) diff --git a/content/docs/scripting-manual/debugging/_index.md b/content/docs/developers/scripting-manual/debugging/_index.md similarity index 100% rename from content/docs/scripting-manual/debugging/_index.md rename to content/docs/developers/scripting-manual/debugging/_index.md diff --git a/content/docs/scripting-manual/debugging/using-profiler.md b/content/docs/developers/scripting-manual/debugging/using-profiler.md similarity index 100% rename from content/docs/scripting-manual/debugging/using-profiler.md rename to content/docs/developers/scripting-manual/debugging/using-profiler.md diff --git a/content/docs/developers/scripting-manual/introduction/_index.md b/content/docs/developers/scripting-manual/introduction/_index.md new file mode 100644 index 000000000..c1530af8f --- /dev/null +++ b/content/docs/developers/scripting-manual/introduction/_index.md @@ -0,0 +1,11 @@ +--- +title: Scripting introduction +weight: 410 +layout: single +--- + +- [Introduction to resources](/docs/developers/scripting-manual/introduction/introduction-to-resources) +- [Creating your first script in Lua](/docs/developers/scripting-manual/introduction/creating-your-first-script) +- [Creating your first script in C#](/docs/developers/scripting-manual/introduction/creating-your-first-script-csharp) +- [Creating your first script in JavaScript](/docs/developers/scripting-manual/introduction/creating-your-first-script-javascript) +- [About native functions](/docs/developers/scripting-manual/introduction/about-native-functions) diff --git a/content/docs/scripting-manual/introduction/about-native-functions.md b/content/docs/developers/scripting-manual/introduction/about-native-functions.md similarity index 96% rename from content/docs/scripting-manual/introduction/about-native-functions.md rename to content/docs/developers/scripting-manual/introduction/about-native-functions.md index 4f0a37659..10b9b18f2 100644 --- a/content/docs/scripting-manual/introduction/about-native-functions.md +++ b/content/docs/developers/scripting-manual/introduction/about-native-functions.md @@ -54,7 +54,7 @@ AddTextEntry('CUSTOM_ENTRY', 'Hello, FiveM!') -- Display the custom text entry when a player presses a specific key Citizen.CreateThread(function() while true do - Citizen.Wait(0) -- You can learn more about wait on https://docs.fivem.net/docs/scripting-reference/runtimes/lua/functions/Citizen.Wait + Citizen.Wait(0) -- You can learn more about wait on https://docs.fivem.net/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Wait if IsControlJustReleased(0, 38) then -- Native that check if control E is released BeginTextCommandDisplayHelp('CUSTOM_ENTRY') -- Display notification with another native EndTextCommandDisplayHelp(0, false, true, -1) @@ -80,7 +80,7 @@ end, false) ``` ### Create Your First Resource -To learn how to create your first resource step-by-step, refer to the comprehensive guide in [this section](/content/docs/scripting-manual/introduction/creating-your-first-script.md). This guide will walk you through the process of setting up a new resource, writing your first script, and integrating it into your FiveM server. +To learn how to create your first resource step-by-step, refer to the comprehensive guide in [this section](/docs/developers/scripting-manual/introduction/creating-your-first-script). This guide will walk you through the process of setting up a new resource, writing your first script, and integrating it into your FiveM server. ### Commonly Used Native Functions Here are some commonly used native functions and their descriptions: diff --git a/content/docs/scripting-manual/introduction/creating-your-first-script-csharp.md b/content/docs/developers/scripting-manual/introduction/creating-your-first-script-csharp.md similarity index 94% rename from content/docs/scripting-manual/introduction/creating-your-first-script-csharp.md rename to content/docs/developers/scripting-manual/introduction/creating-your-first-script-csharp.md index 4e9f09e3b..bd1556573 100644 --- a/content/docs/scripting-manual/introduction/creating-your-first-script-csharp.md +++ b/content/docs/developers/scripting-manual/introduction/creating-your-first-script-csharp.md @@ -9,8 +9,8 @@ Getting started with scripting for FiveM might be a tad overwhelming, given the Before creating your first script with C#, there are a couple of things you will need to set up and understand. * [A basic understanding of C#](https://learn.microsoft.com/en-us/dotnet/csharp/#learn-to-program) -* [Creating a C# project and setup your environment](/docs/scripting-manual/runtimes/csharp) -* [Understanding of resources and manifest files](/docs/scripting-reference/resource-manifest/resource-manifest) +* [Creating a C# project and setup your environment](/docs/developers/scripting-manual/runtimes/csharp) +* [Understanding of resources and manifest files](/docs/developers/scripting-reference/resource-manifest/resource-manifest) ### Writing code Now that you have set up your C# project and environment, you will have two projects; `MyResourceNameClient` and `MyResourceNameServer`. @@ -71,7 +71,7 @@ You might be overwhelmed at this point, but don't worry. We will go through ever ```csharp EventHandlers["onClientResourceStart"] += new Action(OnClientResourceStart); ``` -In the constructor we've added an event handler for the [onClientResourceStart](/docs/scripting-reference/events/list/onClientResourceStart/) event. It takes one argument; a string with the name of the resource that was started. It also has a delegate method `OnClientResourceStart`, which we defined beneath the constructor. Once the resource has started, FiveM will trigger this event and invoke the method. +In the constructor we've added an event handler for the [onClientResourceStart](/docs/developers/scripting-reference/events/list/onClientResourceStart/) event. It takes one argument; a string with the name of the resource that was started. It also has a delegate method `OnClientResourceStart`, which we defined beneath the constructor. Once the resource has started, FiveM will trigger this event and invoke the method. ```csharp if (GetCurrentResourceName() != resourceName) return; diff --git a/content/docs/scripting-manual/introduction/creating-your-first-script-javascript.md b/content/docs/developers/scripting-manual/introduction/creating-your-first-script-javascript.md similarity index 98% rename from content/docs/scripting-manual/introduction/creating-your-first-script-javascript.md rename to content/docs/developers/scripting-manual/introduction/creating-your-first-script-javascript.md index 65b872e3d..b5f058560 100644 --- a/content/docs/scripting-manual/introduction/creating-your-first-script-javascript.md +++ b/content/docs/developers/scripting-manual/introduction/creating-your-first-script-javascript.md @@ -10,7 +10,7 @@ Before creating your first script with JavaScript, there are a couple of things * [Understanding the JavaScript programming language (Getting Started)][basic-understanding-js] * [Understanding the JavaScript runtime][runtime-javascript] -* [Understanding of resources and manifest files](/docs/scripting-reference/resource-manifest/resource-manifest) +* [Understanding of resources and manifest files](/docs/developers/scripting-reference/resource-manifest/resource-manifest) We will be using Visual Studio Code, hereby VSCode, a popular code editor by Microsoft. However, you can use any code editor you'd like. @@ -303,5 +303,5 @@ In your server console, `refresh; restart mymode` (yeah you can split stuff with ## Server scripts You'll probably also want to write scripts that interact with the server. This section is still to be written. :-( -[runtime-javascript]: /docs/scripting-manual/runtimes/javascript/ +[runtime-javascript]: /docs/developers/scripting-manual/runtimes/javascript/ [basic-understanding-js]: https://developer.mozilla.org/en-US/docs/Web/JavaScript diff --git a/content/docs/scripting-manual/introduction/creating-your-first-script.md b/content/docs/developers/scripting-manual/introduction/creating-your-first-script.md similarity index 99% rename from content/docs/scripting-manual/introduction/creating-your-first-script.md rename to content/docs/developers/scripting-manual/introduction/creating-your-first-script.md index 18206cbf0..34a94b732 100644 --- a/content/docs/scripting-manual/introduction/creating-your-first-script.md +++ b/content/docs/developers/scripting-manual/introduction/creating-your-first-script.md @@ -284,4 +284,4 @@ In your server console, `refresh; restart mymode` (yeah you can split stuff with You'll probably also want to write scripts that interact with the server. This section is still to be written. :-( -[manifest-reference]: /docs/scripting-reference/resource-manifest/resource-manifest/ +[manifest-reference]: /docs/developers/scripting-reference/resource-manifest/resource-manifest/ diff --git a/content/docs/scripting-manual/introduction/fact-sheet.md b/content/docs/developers/scripting-manual/introduction/fact-sheet.md similarity index 60% rename from content/docs/scripting-manual/introduction/fact-sheet.md rename to content/docs/developers/scripting-manual/introduction/fact-sheet.md index fe9c631c0..e87ff1ea0 100644 --- a/content/docs/scripting-manual/introduction/fact-sheet.md +++ b/content/docs/developers/scripting-manual/introduction/fact-sheet.md @@ -9,23 +9,23 @@ Here's a quick informative sheet to get you up to speed with FiveM development. _ScRT_ means _Scripting Runtime_ or _Script Runtime_. FiveM has three different scripting runtimes available (Lua, C# and JavaScript), and they are mentioned down below. # How do I get started with scripting? -The scripting manual can be found [here](/docs/scripting-manual/) and it features the following articles: - -- [Introduction to resources](/docs/scripting-manual/introduction/introduction-to-resources) - - [Creating your first script](/docs/scripting-manual/introduction/creating-your-first-script) -- [Scripting runtimes](/docs/scripting-manual/runtimes) - - [Scripting in Lua](/docs/scripting-manual/runtimes/lua) - - [Scripting in JavaScript](/docs/scripting-manual/runtimes/javascript) - - [Scripting in C#](/docs/scripting-manual/runtimes/csharp) -- [Migrating from deprecated methods](/docs/scripting-manual/migrating-from-deprecated) - - [Chat Messages](/docs/scripting-manual/migrating-from-deprecated/chat-messages) -- [Working with events](/docs/scripting-manual/working-with-events) - - [Listening for events](/docs/scripting-manual/working-with-events/listening-for-events) - - [Triggering events](/docs/scripting-manual/working-with-events/triggering-events) -- [NUI](/docs/scripting-manual/nui-development) -- [Using Scaleform](/docs/scripting-manual/using-scaleform) -- [Voice](/docs/scripting-manual/voice) -- [Using new game features](/docs/scripting-manual/using-new-game-features) +The scripting manual can be found [here](/docs/developers/scripting-manual/) and it features the following articles: + +- [Introduction to resources](/docs/developers/scripting-manual/introduction/introduction-to-resources) + - [Creating your first script](/docs/developers/scripting-manual/introduction/creating-your-first-script) +- [Scripting runtimes](/docs/developers/scripting-manual/runtimes) + - [Scripting in Lua](/docs/developers/scripting-manual/runtimes/lua) + - [Scripting in JavaScript](/docs/developers/scripting-manual/runtimes/javascript) + - [Scripting in C#](/docs/developers/scripting-manual/runtimes/csharp) +- [Migrating from deprecated methods](/docs/developers/scripting-manual/migrating-from-deprecated) + - [Chat Messages](/docs/developers/scripting-manual/migrating-from-deprecated/chat-messages) +- [Working with events](/docs/developers/scripting-manual/working-with-events) + - [Listening for events](/docs/developers/scripting-manual/working-with-events/listening-for-events) + - [Triggering events](/docs/developers/scripting-manual/working-with-events/triggering-events) +- [NUI](/docs/developers/scripting-manual/nui-development) +- [Using Scaleform](/docs/developers/scripting-manual/using-scaleform) +- [Voice](/docs/developers/scripting-manual/voice) +- [Using new game features](/docs/developers/scripting-manual/using-new-game-features) You can refer to the page mentioned above to see the scripting manual in full detail. @@ -53,7 +53,7 @@ These are named _Game references_, and they can be found over [here](/docs/game- Hitch warnings indicate that one of your resources is not performing as it should and you should look into the affected resource to _figure out why, using the profiler can help diagnosing this._ Things such as these, can sometimes be caused by writing underperforming SQL queries that take a long time to execute, as well as unoptimized loops that end up halting the script execution. ## Profiler -The profiler can be used to diagnose _why_ a resource is taking a long time to execute, there's a [guide](/docs/scripting-manual/debugging/using-profiler) explaining how to use it, it can be used both on the server and client. +The profiler can be used to diagnose _why_ a resource is taking a long time to execute, there's a [guide](/docs/developers/scripting-manual/debugging/using-profiler) explaining how to use it, it can be used both on the server and client. ## Resource Monitor (Resmon) The resource monitor can be used on the client to diagnose which resource is taking a long time to execute, it shows certain things such as cpu usage (msec) and memory usage for each resource. diff --git a/content/docs/scripting-manual/introduction/introduction-to-resources.md b/content/docs/developers/scripting-manual/introduction/introduction-to-resources.md similarity index 96% rename from content/docs/scripting-manual/introduction/introduction-to-resources.md rename to content/docs/developers/scripting-manual/introduction/introduction-to-resources.md index 9a1f63eb5..25b207f41 100644 --- a/content/docs/scripting-manual/introduction/introduction-to-resources.md +++ b/content/docs/developers/scripting-manual/introduction/introduction-to-resources.md @@ -82,5 +82,5 @@ these resources provide useful functionality to your server. More information about the standard resources can be found in the [resource catalog][resource-catalog]. -[manifest-reference]: /docs/scripting-reference/resource-manifest/resource-manifest/ +[manifest-reference]: /docs/developers/scripting-reference/resource-manifest/resource-manifest/ [resource-catalog]: /docs/resources diff --git a/content/docs/scripting-manual/migrating-from-deprecated/_index.md b/content/docs/developers/scripting-manual/migrating-from-deprecated/_index.md similarity index 62% rename from content/docs/scripting-manual/migrating-from-deprecated/_index.md rename to content/docs/developers/scripting-manual/migrating-from-deprecated/_index.md index 3cbbf72e0..aae17e896 100644 --- a/content/docs/scripting-manual/migrating-from-deprecated/_index.md +++ b/content/docs/developers/scripting-manual/migrating-from-deprecated/_index.md @@ -5,6 +5,6 @@ weight: 430 In the past few years, FiveM has developed and advanced vastly. As a result of this, many tutorials and scripts have been left behind with methods and whatnot. This section will provide instructions on how to change from methods that have been deprecated. -- [Chat Messages](/docs/scripting-manual/migrating-from-deprecated/chat-messages) -- [Creating Commands](/docs/scripting-manual/migrating-from-deprecated/creating-commands) +- [Chat Messages](/docs/developers/scripting-manual/migrating-from-deprecated/chat-messages) +- [Creating Commands](/docs/developers/scripting-manual/migrating-from-deprecated/creating-commands) \ No newline at end of file diff --git a/content/docs/scripting-manual/migrating-from-deprecated/chat-messages.md b/content/docs/developers/scripting-manual/migrating-from-deprecated/chat-messages.md similarity index 93% rename from content/docs/scripting-manual/migrating-from-deprecated/chat-messages.md rename to content/docs/developers/scripting-manual/migrating-from-deprecated/chat-messages.md index 427c2b696..5c75fc395 100644 --- a/content/docs/scripting-manual/migrating-from-deprecated/chat-messages.md +++ b/content/docs/developers/scripting-manual/migrating-from-deprecated/chat-messages.md @@ -25,4 +25,4 @@ TriggerEvent("chat:addMessage", { }) ``` -For further documentation of this event, see the [`chat:addMessage` section](../../../resources/chat/events/chat-addMessage). +For further documentation of this event, see the [`chat:addMessage` section](../../../../resources/chat/events/chat-addMessage). diff --git a/content/docs/scripting-manual/migrating-from-deprecated/creating-commands.md b/content/docs/developers/scripting-manual/migrating-from-deprecated/creating-commands.md similarity index 100% rename from content/docs/scripting-manual/migrating-from-deprecated/creating-commands.md rename to content/docs/developers/scripting-manual/migrating-from-deprecated/creating-commands.md diff --git a/content/docs/scripting-manual/networking/_index.md b/content/docs/developers/scripting-manual/networking/_index.md similarity index 100% rename from content/docs/scripting-manual/networking/_index.md rename to content/docs/developers/scripting-manual/networking/_index.md diff --git a/content/docs/scripting-manual/networking/ids.md b/content/docs/developers/scripting-manual/networking/ids.md similarity index 100% rename from content/docs/scripting-manual/networking/ids.md rename to content/docs/developers/scripting-manual/networking/ids.md diff --git a/content/docs/scripting-manual/networking/state-bags.md b/content/docs/developers/scripting-manual/networking/state-bags.md similarity index 100% rename from content/docs/scripting-manual/networking/state-bags.md rename to content/docs/developers/scripting-manual/networking/state-bags.md diff --git a/content/docs/developers/scripting-manual/nui-development/_index.md b/content/docs/developers/scripting-manual/nui-development/_index.md new file mode 100644 index 000000000..6332f1a88 --- /dev/null +++ b/content/docs/developers/scripting-manual/nui-development/_index.md @@ -0,0 +1,13 @@ +--- +title: User interfaces with NUI +weight: 440 +--- + +**NUI** (short for 'new UI') is the HTML-based user interface functionality in the CitizenFX framework. Currently using +the [Chromium Embedded Framework](https://github.com/chromiumembedded/cef), it offers an asynchronous, performant way of creating in-game UI using +web technologies (HTML/CSS/JS, including frameworks like React or Angular, and accelerated WebGL). + +- [Fullscreen NUI](/docs/developers/scripting-manual/nui-development/full-screen-nui) +- [Direct-rendered UI (DUI)](/docs/developers/scripting-manual/nui-development/dui) +- [NUI callbacks](/docs/developers/scripting-manual/nui-development/nui-callbacks) +- [Loading screens](/docs/developers/scripting-manual/nui-development/loading-screens) \ No newline at end of file diff --git a/content/docs/scripting-manual/nui-development/dui.md b/content/docs/developers/scripting-manual/nui-development/dui.md similarity index 100% rename from content/docs/scripting-manual/nui-development/dui.md rename to content/docs/developers/scripting-manual/nui-development/dui.md diff --git a/content/docs/scripting-manual/nui-development/full-screen-nui.md b/content/docs/developers/scripting-manual/nui-development/full-screen-nui.md similarity index 94% rename from content/docs/scripting-manual/nui-development/full-screen-nui.md rename to content/docs/developers/scripting-manual/nui-development/full-screen-nui.md index 83f413dff..6bade171c 100644 --- a/content/docs/scripting-manual/nui-development/full-screen-nui.md +++ b/content/docs/developers/scripting-manual/nui-development/full-screen-nui.md @@ -108,5 +108,5 @@ window.addEventListener('message', (event) => { ``` [mdn-messages]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#The_dispatched_event -[send-nui-message]: /docs/scripting-reference/runtimes/lua/functions/SendNUIMessage -[resource-manifest]: /docs/scripting-reference/resource-manifest/resource-manifest +[send-nui-message]: /docs/developers/scripting-reference/runtimes/lua/functions/SendNUIMessage +[resource-manifest]: /docs/developers/scripting-reference/resource-manifest/resource-manifest diff --git a/content/docs/scripting-manual/nui-development/loading-screens/_index.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/_index.md similarity index 97% rename from content/docs/scripting-manual/nui-development/loading-screens/_index.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/_index.md index a1b123e30..aa59749ff 100644 --- a/content/docs/scripting-manual/nui-development/loading-screens/_index.md +++ b/content/docs/developers/scripting-manual/nui-development/loading-screens/_index.md @@ -107,4 +107,4 @@ window.addEventListener('message', (event) => { - [initFunctionInvoked](./initFunctionInvoked) - [endInitFunction](./endInitFunction) -[resource-manifest]: /docs/scripting-reference/resource-manifest/resource-manifest \ No newline at end of file +[resource-manifest]: /docs/developers/scripting-reference/resource-manifest/resource-manifest \ No newline at end of file diff --git a/content/docs/scripting-manual/nui-development/loading-screens/endDataFileEntries.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/endDataFileEntries.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/endDataFileEntries.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/endDataFileEntries.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/endInitFunction.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/endInitFunction.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/endInitFunction.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/endInitFunction.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/initFunctionInvoked.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/initFunctionInvoked.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/initFunctionInvoked.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/initFunctionInvoked.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/initFunctionInvoking.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/initFunctionInvoking.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/initFunctionInvoking.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/initFunctionInvoking.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/loadProgress.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/loadProgress.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/loadProgress.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/loadProgress.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/onDataFileEntry.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/onDataFileEntry.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/onDataFileEntry.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/onDataFileEntry.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/onLogLine.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/onLogLine.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/onLogLine.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/onLogLine.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/performMapLoadFunction.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/performMapLoadFunction.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/performMapLoadFunction.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/performMapLoadFunction.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/startDataFileEntries.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/startDataFileEntries.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/startDataFileEntries.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/startDataFileEntries.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/startInitFunction.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/startInitFunction.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/startInitFunction.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/startInitFunction.md diff --git a/content/docs/scripting-manual/nui-development/loading-screens/startInitFunctionOrder.md b/content/docs/developers/scripting-manual/nui-development/loading-screens/startInitFunctionOrder.md similarity index 100% rename from content/docs/scripting-manual/nui-development/loading-screens/startInitFunctionOrder.md rename to content/docs/developers/scripting-manual/nui-development/loading-screens/startInitFunctionOrder.md diff --git a/content/docs/scripting-manual/nui-development/nui-callbacks.md b/content/docs/developers/scripting-manual/nui-development/nui-callbacks.md similarity index 96% rename from content/docs/scripting-manual/nui-development/nui-callbacks.md rename to content/docs/developers/scripting-manual/nui-development/nui-callbacks.md index 948f72d20..3c221c6d8 100644 --- a/content/docs/scripting-manual/nui-development/nui-callbacks.md +++ b/content/docs/developers/scripting-manual/nui-development/nui-callbacks.md @@ -102,5 +102,5 @@ fetch(`https://${GetParentResourceName()}/getItemInfo`, { To prevent requests from stalling, you **have to** return the callback at all times - even if containing just an empty object, or `{"ok":true}`, or similar. -[registernuicallback]: /docs/scripting-reference/runtimes/lua/functions/RegisterNUICallback/ +[registernuicallback]: /docs/developers/scripting-reference/runtimes/lua/functions/RegisterNUICallback/ [workaround]: https://github.com/citizenfx/fivem/blob/d911ecf638337c7c61fc6728110c92d84a217156/data/shared/citizen/scripting/lua/scheduler.lua#L958 diff --git a/content/docs/developers/scripting-manual/runtimes/_index.md b/content/docs/developers/scripting-manual/runtimes/_index.md new file mode 100644 index 000000000..787021153 --- /dev/null +++ b/content/docs/developers/scripting-manual/runtimes/_index.md @@ -0,0 +1,13 @@ +--- +title: Scripting runtimes +weight: 420 +layout: single +--- + +If you're new to scripting, read the [introduction](/docs/developers/scripting-manual/introduction) first. If you're unsure what language you should choose, remember that +no matter what you choose, it will get the job done. Pick something you're already comfortable with, or something which +you think is the most useful to you. There is no best practice. If you're still unsure, Lua is a safe choice. + +- [Scripting in Lua](/docs/developers/scripting-manual/runtimes/lua) +- [Scripting in JavaScript](/docs/developers/scripting-manual/runtimes/javascript) +- [Scripting in C#](/docs/developers/scripting-manual/runtimes/csharp) diff --git a/content/docs/scripting-manual/runtimes/csharp.md b/content/docs/developers/scripting-manual/runtimes/csharp.md similarity index 96% rename from content/docs/scripting-manual/runtimes/csharp.md rename to content/docs/developers/scripting-manual/runtimes/csharp.md index d9f6ee349..9dc89b6fe 100644 --- a/content/docs/scripting-manual/runtimes/csharp.md +++ b/content/docs/developers/scripting-manual/runtimes/csharp.md @@ -49,4 +49,4 @@ Afterwards, you can use `ensure MyResource` in your `server.cfg` or server conso Congratulations, you've created a resource using FiveM's C# templates! # Let's write some code -**[It's finally time to actually start writing some code! πŸŽ‰](/docs/scripting-manual/introduction/creating-your-first-script-csharp)** +**[It's finally time to actually start writing some code! πŸŽ‰](/docs/developers/scripting-manual/introduction/creating-your-first-script-csharp)** diff --git a/content/docs/scripting-manual/runtimes/javascript.md b/content/docs/developers/scripting-manual/runtimes/javascript.md similarity index 96% rename from content/docs/scripting-manual/runtimes/javascript.md rename to content/docs/developers/scripting-manual/runtimes/javascript.md index e4dc1138b..a80c37a8b 100644 --- a/content/docs/scripting-manual/runtimes/javascript.md +++ b/content/docs/developers/scripting-manual/runtimes/javascript.md @@ -153,8 +153,8 @@ Functions in JavaScript See [Scripting reference][scriptreflink] for example usage of these functions. -[scriptreflink]: /docs/scripting-reference/runtimes/javascript -[deplink]: /docs/scripting-reference/resource-manifest/resource-manifest#dependency +[scriptreflink]: /docs/developers/scripting-reference/runtimes/javascript +[deplink]: /docs/developers/scripting-reference/resource-manifest/resource-manifest#dependency [nodejs]: https://github.com/citizenfx/node [npmclient]: https://www.npmjs.com/package/@citizenfx/client [npmserver]: https://www.npmjs.com/package/@citizenfx/server diff --git a/content/docs/scripting-manual/runtimes/lua.md b/content/docs/developers/scripting-manual/runtimes/lua.md similarity index 84% rename from content/docs/scripting-manual/runtimes/lua.md rename to content/docs/developers/scripting-manual/runtimes/lua.md index 2076e8d61..6cdc11af3 100644 --- a/content/docs/scripting-manual/runtimes/lua.md +++ b/content/docs/developers/scripting-manual/runtimes/lua.md @@ -51,10 +51,10 @@ standard euler rotations, so use them whenever you can. More about there [here][ For usage and examples see their respective docs: -- [quat](/docs/scripting-reference/runtimes/lua/functions/quat) -- [vector2](/docs/scripting-reference/runtimes/lua/functions/vector2) -- [vector3](/docs/scripting-reference/runtimes/lua/functions/vector3) -- [vector4](/docs/scripting-reference/runtimes/lua/functions/vector4) +- [quat](/docs/developers/scripting-reference/runtimes/lua/functions/quat) +- [vector2](/docs/developers/scripting-reference/runtimes/lua/functions/vector2) +- [vector3](/docs/developers/scripting-reference/runtimes/lua/functions/vector3) +- [vector4](/docs/developers/scripting-reference/runtimes/lua/functions/vector4) Using exports ------------- @@ -123,11 +123,11 @@ The Lua runtime exposes some libraries on the global scope which you can use. Lua specific functions ---------------------- -- [Client functions](/docs/scripting-reference/runtimes/lua/client-functions) -- [Server functions](/docs/scripting-reference/runtimes/lua/server-functions) +- [Client functions](/docs/developers/scripting-reference/runtimes/lua/client-functions) +- [Server functions](/docs/developers/scripting-reference/runtimes/lua/server-functions) -[about-natives]: /docs/scripting-manual/introduction/about-native-functions -[resource-manifest]: /docs/scripting-reference/resource-manifest/resource-manifest/ +[about-natives]: /docs/developers/scripting-manual/introduction/about-native-functions +[resource-manifest]: /docs/developers/scripting-reference/resource-manifest/resource-manifest/ [grit]: http://gritengine.com [luadocs]: https://www.lua.org/manual/5.3/ [natives-doc]: https://runtime.fivem.net/doc/reference.html diff --git a/content/docs/scripting-manual/using-new-game-features/_index.md b/content/docs/developers/scripting-manual/using-new-game-features/_index.md similarity index 59% rename from content/docs/scripting-manual/using-new-game-features/_index.md rename to content/docs/developers/scripting-manual/using-new-game-features/_index.md index f742e5fd0..fd6e12f34 100644 --- a/content/docs/scripting-manual/using-new-game-features/_index.md +++ b/content/docs/developers/scripting-manual/using-new-game-features/_index.md @@ -5,5 +5,5 @@ weight: 420 FiveM adds new features to the original game. Documentation on how to utilize some of the latest ones in your game can be found in this section. -- [Fuel consumption](/docs/scripting-manual/using-new-game-features/fuel-consumption) -- [Work with drawable components and props using collections](/docs/scripting-manual/using-new-game-features/collection-based-natives) +- [Fuel consumption](/docs/developers/scripting-manual/using-new-game-features/fuel-consumption) +- [Work with drawable components and props using collections](/docs/developers/scripting-manual/using-new-game-features/collection-based-natives) diff --git a/content/docs/scripting-manual/using-new-game-features/collection-based-natives.md b/content/docs/developers/scripting-manual/using-new-game-features/collection-based-natives.md similarity index 100% rename from content/docs/scripting-manual/using-new-game-features/collection-based-natives.md rename to content/docs/developers/scripting-manual/using-new-game-features/collection-based-natives.md diff --git a/content/docs/scripting-manual/using-new-game-features/fuel-consumption.md b/content/docs/developers/scripting-manual/using-new-game-features/fuel-consumption.md similarity index 100% rename from content/docs/scripting-manual/using-new-game-features/fuel-consumption.md rename to content/docs/developers/scripting-manual/using-new-game-features/fuel-consumption.md diff --git a/content/docs/scripting-manual/using-scaleform/_index.md b/content/docs/developers/scripting-manual/using-scaleform/_index.md similarity index 100% rename from content/docs/scripting-manual/using-scaleform/_index.md rename to content/docs/developers/scripting-manual/using-scaleform/_index.md diff --git a/content/docs/scripting-manual/voice/_index.md b/content/docs/developers/scripting-manual/voice/_index.md similarity index 100% rename from content/docs/scripting-manual/voice/_index.md rename to content/docs/developers/scripting-manual/voice/_index.md diff --git a/content/docs/scripting-manual/working-with-events/_index.md b/content/docs/developers/scripting-manual/working-with-events/_index.md similarity index 62% rename from content/docs/scripting-manual/working-with-events/_index.md rename to content/docs/developers/scripting-manual/working-with-events/_index.md index 37a41e5f9..a0b7fe641 100644 --- a/content/docs/scripting-manual/working-with-events/_index.md +++ b/content/docs/developers/scripting-manual/working-with-events/_index.md @@ -17,12 +17,12 @@ You can also set an event as "canceled" from within an event handler as long as the network. The resource that triggered the event can check if it was canceled after being run. Canceling an event does **not** stop other event handlers from running. -- [Listening for events](/docs/scripting-manual/working-with-events/listening-for-events) -- [Triggering events](/docs/scripting-manual/working-with-events/triggering-events) -- [Event cancelation](/docs/scripting-manual/working-with-events/event-cancelation) +- [Listening for events](/docs/developers/scripting-manual/working-with-events/listening-for-events) +- [Triggering events](/docs/developers/scripting-manual/working-with-events/triggering-events) +- [Event cancelation](/docs/developers/scripting-manual/working-with-events/event-cancelation) diff --git a/content/docs/scripting-manual/working-with-events/event-cancelation.md b/content/docs/developers/scripting-manual/working-with-events/event-cancelation.md similarity index 100% rename from content/docs/scripting-manual/working-with-events/event-cancelation.md rename to content/docs/developers/scripting-manual/working-with-events/event-cancelation.md diff --git a/content/docs/scripting-manual/working-with-events/listening-for-events.md b/content/docs/developers/scripting-manual/working-with-events/listening-for-events.md similarity index 100% rename from content/docs/scripting-manual/working-with-events/listening-for-events.md rename to content/docs/developers/scripting-manual/working-with-events/listening-for-events.md diff --git a/content/docs/developers/server-security.md b/content/docs/developers/scripting-manual/working-with-events/server-security.md similarity index 97% rename from content/docs/developers/server-security.md rename to content/docs/developers/scripting-manual/working-with-events/server-security.md index 7b734ca84..246d28d8e 100644 --- a/content/docs/developers/server-security.md +++ b/content/docs/developers/scripting-manual/working-with-events/server-security.md @@ -1,5 +1,6 @@ --- title: Secure your events +weight: 433 --- The anti-cheat team is always trying to improve the anti-cheat, but sometimes things slip through. @@ -55,14 +56,14 @@ RegisterNetEvent("eventName", function(eventParam1, eventParam2) end) ``` -You can learn more [on this guide](/docs/scripting-manual/working-with-events/listening-for-events/). +You can learn more [on this guide](/docs/developers/scripting-manual/working-with-events/listening-for-events/). ### Add Checks Even if you build a strong anti-cheat, adding checks on **server** events makes them more secure. This is a good practice, although it doesn't prevent everything. Below, we will share some good tips. When using networked events, make sure to add some checks like: - Player money -- Player [state bags](/docs/scripting-manual/networking/state-bags/) +- Player [state bags](/docs/developers/scripting-manual/networking/state-bags/) - Player inventory items - Player [position](https://docs.fivem.net/natives/?_0x1647F1CB) - Player experience and level diff --git a/content/docs/scripting-manual/working-with-events/triggering-events.md b/content/docs/developers/scripting-manual/working-with-events/triggering-events.md similarity index 100% rename from content/docs/scripting-manual/working-with-events/triggering-events.md rename to content/docs/developers/scripting-manual/working-with-events/triggering-events.md diff --git a/content/docs/developers/scripting-reference/_index.md b/content/docs/developers/scripting-reference/_index.md new file mode 100644 index 000000000..100b8d668 --- /dev/null +++ b/content/docs/developers/scripting-reference/_index.md @@ -0,0 +1,32 @@ +--- +title: Scripting reference +weight: 1220 +description: > + All the things referencing scripting +layout: single +--- + +## Open To All Levels ✨ + +FiveM is a fantastic platform for developers of all skill levels to learn and grow. This page will provide comprehensive references for all things related to scripting. + +## Tools for Server Owners + +We offer a variety of excellent tools to help you get started with your server. Here's a list of some key resources: + +- [Convars](/docs/developers/scripting-reference/convars) +- [OneSync](/docs/developers/scripting-reference/onesync) +- [State Bags](/docs/developers/scripting-manual/networking/state-bags) +- [Resource Manifest](/docs/developers/scripting-reference/resource-manifest/resource-manifest) + +### Develop Scripts + +FiveM supports C#, Lua, and JavaScript, allowing you the flexibility to create and modify your scripts. Here are some useful links to get you started: + +- [Create Your First Script](/docs/developers/scripting-manual/introduction/creating-your-first-script) +- [Client Events](/docs/developers/scripting-reference/events/client-events) +- [Server Events](/docs/developers/scripting-reference/events/server-events) +- [Native Functions](https://docs.fivem.net/natives/) +- [Client Functions](/docs/developers/scripting-reference/client-functions) +- [Server Functions](/docs/developers/scripting-reference/server-functions) + diff --git a/content/docs/scripting-reference/client-functions/_index.md b/content/docs/developers/scripting-reference/client-functions/_index.md similarity index 69% rename from content/docs/scripting-reference/client-functions/_index.md rename to content/docs/developers/scripting-reference/client-functions/_index.md index 293b1511f..b570d7090 100644 --- a/content/docs/scripting-reference/client-functions/_index.md +++ b/content/docs/developers/scripting-reference/client-functions/_index.md @@ -16,6 +16,6 @@ Runtime specific functions Some functions are exclusive to the scripting runtime you're using, and are **not** documented in the [FiveM Native Reference List](/natives). Refer to their docs for more detail. -- [Client-side functions in Lua](/docs/scripting-reference/runtimes/lua/client-functions) -- [Client-side functions in JavaScript](/docs/scripting-reference/runtimes/javascript/client-functions) -- [Client-side functions in C#](/docs/scripting-reference/runtimes/csharp/client-functions) +- [Client-side functions in Lua](/docs/developers/scripting-reference/runtimes/lua/client-functions) +- [Client-side functions in JavaScript](/docs/developers/scripting-reference/runtimes/javascript/client-functions) +- [Client-side functions in C#](/docs/developers/scripting-reference/runtimes/csharp/client-functions) diff --git a/content/docs/scripting-reference/convars/_index.md b/content/docs/developers/scripting-reference/convars/_index.md similarity index 100% rename from content/docs/scripting-reference/convars/_index.md rename to content/docs/developers/scripting-reference/convars/_index.md diff --git a/content/docs/developers/scripting-reference/events/_index.md b/content/docs/developers/scripting-reference/events/_index.md new file mode 100644 index 000000000..c646ab938 --- /dev/null +++ b/content/docs/developers/scripting-reference/events/_index.md @@ -0,0 +1,9 @@ +--- +title: Events +weight: 540 +hidden: false +--- + +- [Client events](/docs/developers/scripting-reference/events/client-events/) +- [Server events](/docs/developers/scripting-reference/events/server-events/) +- [List of events](/docs/developers/scripting-reference/events/list/) diff --git a/content/docs/scripting-reference/events/client-events/_index.md b/content/docs/developers/scripting-reference/events/client-events/_index.md similarity index 100% rename from content/docs/scripting-reference/events/client-events/_index.md rename to content/docs/developers/scripting-reference/events/client-events/_index.md diff --git a/content/docs/scripting-reference/events/list/_index.md b/content/docs/developers/scripting-reference/events/list/_index.md similarity index 100% rename from content/docs/scripting-reference/events/list/_index.md rename to content/docs/developers/scripting-reference/events/list/_index.md diff --git a/content/docs/scripting-reference/events/list/gameEventTriggered.md b/content/docs/developers/scripting-reference/events/list/gameEventTriggered.md similarity index 100% rename from content/docs/scripting-reference/events/list/gameEventTriggered.md rename to content/docs/developers/scripting-reference/events/list/gameEventTriggered.md diff --git a/content/docs/scripting-reference/events/list/onClientResourceStart.md b/content/docs/developers/scripting-reference/events/list/onClientResourceStart.md similarity index 100% rename from content/docs/scripting-reference/events/list/onClientResourceStart.md rename to content/docs/developers/scripting-reference/events/list/onClientResourceStart.md diff --git a/content/docs/scripting-reference/events/list/onClientResourceStop.md b/content/docs/developers/scripting-reference/events/list/onClientResourceStop.md similarity index 100% rename from content/docs/scripting-reference/events/list/onClientResourceStop.md rename to content/docs/developers/scripting-reference/events/list/onClientResourceStop.md diff --git a/content/docs/scripting-reference/events/list/onResourceStart.md b/content/docs/developers/scripting-reference/events/list/onResourceStart.md similarity index 100% rename from content/docs/scripting-reference/events/list/onResourceStart.md rename to content/docs/developers/scripting-reference/events/list/onResourceStart.md diff --git a/content/docs/scripting-reference/events/list/onResourceStarting.md b/content/docs/developers/scripting-reference/events/list/onResourceStarting.md similarity index 100% rename from content/docs/scripting-reference/events/list/onResourceStarting.md rename to content/docs/developers/scripting-reference/events/list/onResourceStarting.md diff --git a/content/docs/scripting-reference/events/list/onResourceStop.md b/content/docs/developers/scripting-reference/events/list/onResourceStop.md similarity index 100% rename from content/docs/scripting-reference/events/list/onResourceStop.md rename to content/docs/developers/scripting-reference/events/list/onResourceStop.md diff --git a/content/docs/scripting-reference/events/list/playerConnecting.md b/content/docs/developers/scripting-reference/events/list/playerConnecting.md similarity index 100% rename from content/docs/scripting-reference/events/list/playerConnecting.md rename to content/docs/developers/scripting-reference/events/list/playerConnecting.md diff --git a/content/docs/scripting-reference/events/list/playerDropped.md b/content/docs/developers/scripting-reference/events/list/playerDropped.md similarity index 100% rename from content/docs/scripting-reference/events/list/playerDropped.md rename to content/docs/developers/scripting-reference/events/list/playerDropped.md diff --git a/content/docs/scripting-reference/events/list/populationPedCreating.md b/content/docs/developers/scripting-reference/events/list/populationPedCreating.md similarity index 100% rename from content/docs/scripting-reference/events/list/populationPedCreating.md rename to content/docs/developers/scripting-reference/events/list/populationPedCreating.md diff --git a/content/docs/scripting-reference/events/list/rconCommand.md b/content/docs/developers/scripting-reference/events/list/rconCommand.md similarity index 100% rename from content/docs/scripting-reference/events/list/rconCommand.md rename to content/docs/developers/scripting-reference/events/list/rconCommand.md diff --git a/content/docs/scripting-reference/events/list/respawnPlayerPedEvent.md b/content/docs/developers/scripting-reference/events/list/respawnPlayerPedEvent.md similarity index 100% rename from content/docs/scripting-reference/events/list/respawnPlayerPedEvent.md rename to content/docs/developers/scripting-reference/events/list/respawnPlayerPedEvent.md diff --git a/content/docs/scripting-reference/events/list/vehicleComponentControlEvent.md b/content/docs/developers/scripting-reference/events/list/vehicleComponentControlEvent.md similarity index 100% rename from content/docs/scripting-reference/events/list/vehicleComponentControlEvent.md rename to content/docs/developers/scripting-reference/events/list/vehicleComponentControlEvent.md diff --git a/content/docs/scripting-reference/events/server-events/_index.md b/content/docs/developers/scripting-reference/events/server-events/_index.md similarity index 100% rename from content/docs/scripting-reference/events/server-events/_index.md rename to content/docs/developers/scripting-reference/events/server-events/_index.md diff --git a/content/docs/scripting-reference/onesync/_index.md b/content/docs/developers/scripting-reference/onesync/_index.md similarity index 98% rename from content/docs/scripting-reference/onesync/_index.md rename to content/docs/developers/scripting-reference/onesync/_index.md index 750c45ee8..588451432 100644 --- a/content/docs/scripting-reference/onesync/_index.md +++ b/content/docs/developers/scripting-reference/onesync/_index.md @@ -207,10 +207,10 @@ SetPlayerRoutingBucket(source, 1) -- Now the given player (source) won't be able ``` ## Use state bags -State bags allow you to set attributes to entities and allow other clients to access those, you can read more about state bags [here](/docs/scripting-manual/networking/state-bags). +State bags allow you to set attributes to entities and allow other clients to access those, you can read more about state bags [here](/docs/developers/scripting-manual/networking/state-bags). [vmturl]: https://en.wikipedia.org/wiki/Virtual_method_table [fivem-codebase]: https://github.com/citizenfx/fivem -[server-events]: https://docs.fivem.net/docs/scripting-reference/events/server-events +[server-events]: https://docs.fivem.net/docs/developers/scripting-reference/events/server-events [original-scope-post]: https://forum.cfx.re/t/onesync-playerenteredscope-and-playerleftscope-events diff --git a/content/docs/scripting-reference/resource-manifest/resource-manifest.md b/content/docs/developers/scripting-reference/resource-manifest/resource-manifest.md similarity index 97% rename from content/docs/scripting-reference/resource-manifest/resource-manifest.md rename to content/docs/developers/scripting-reference/resource-manifest/resource-manifest.md index c3f7bf1f1..1c6f51b9f 100644 --- a/content/docs/scripting-reference/resource-manifest/resource-manifest.md +++ b/content/docs/developers/scripting-reference/resource-manifest/resource-manifest.md @@ -3,7 +3,7 @@ title: Resource manifest weight: 505 --- -The **resource manifest** is a file named `fxmanifest.lua` (or previously, `__resource.lua`), placed in a [resource folder](/docs/scripting-manual/introduction/introduction-to-resources) on the server. +The **resource manifest** is a file named `fxmanifest.lua` (or previously, `__resource.lua`), placed in a [resource folder](/docs/developers/scripting-manual/introduction/introduction-to-resources) on the server. It is a Lua file, ran in a separate runtime from any Lua scripts in the resource, set up with a semi-declarative syntax to be used for defining metadata. @@ -151,7 +151,7 @@ Defines a global function to be [exported](#export "wikilink") by a server scrip ### ui_page -Sets the resource's [NUI]({{% ref "/docs/scripting-manual/nui-development/full-screen-nui.md" %}}) page to the defined file or URL. If specifying a a file, the file (along with its dependencies) has to be referenced using [files](#file "wikilink"). +Sets the resource's [NUI]({{% ref "/docs/developers/scripting-manual/nui-development/full-screen-nui.md" %}}) page to the defined file or URL. If specifying a a file, the file (along with its dependencies) has to be referenced using [files](#file "wikilink"). ```lua ui_page 'html/index.html' diff --git a/content/docs/developers/scripting-reference/runtimes/_index.md b/content/docs/developers/scripting-reference/runtimes/_index.md new file mode 100644 index 000000000..3aff1c396 --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/_index.md @@ -0,0 +1,9 @@ +--- +title: Runtime-specific references +weight: 506 +layout: single +--- + +- [Functions in Lua](/docs/developers/scripting-reference/runtimes/lua) +- [Functions in JavaScript](/docs/developers/scripting-reference/runtimes/javascript) +- [Functions in C#](/docs/developers/scripting-reference/runtimes/csharp) diff --git a/content/docs/developers/scripting-reference/runtimes/csharp/_index.md b/content/docs/developers/scripting-reference/runtimes/csharp/_index.md new file mode 100644 index 000000000..c9a0237e3 --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/csharp/_index.md @@ -0,0 +1,9 @@ +--- +title: C# function reference +weight: 507 +hidden: false +layout: single +--- + +- [Client side functions](/docs/developers/scripting-reference/runtimes/csharp/client-functions) +- [Server side functions](/docs/developers/scripting-reference/runtimes/csharp/server-functions) \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/csharp/client-functions.md b/content/docs/developers/scripting-reference/runtimes/csharp/client-functions.md similarity index 100% rename from content/docs/scripting-reference/runtimes/csharp/client-functions.md rename to content/docs/developers/scripting-reference/runtimes/csharp/client-functions.md diff --git a/content/docs/scripting-reference/runtimes/csharp/server-functions.md b/content/docs/developers/scripting-reference/runtimes/csharp/server-functions.md similarity index 100% rename from content/docs/scripting-reference/runtimes/csharp/server-functions.md rename to content/docs/developers/scripting-reference/runtimes/csharp/server-functions.md diff --git a/content/docs/developers/scripting-reference/runtimes/javascript/_index.md b/content/docs/developers/scripting-reference/runtimes/javascript/_index.md new file mode 100644 index 000000000..451e7432c --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/javascript/_index.md @@ -0,0 +1,9 @@ +--- +title: JavaScript function reference +weight: 510 +hidden: false +layout: single +--- + +- [Client side functions](/docs/developers/scripting-reference/runtimes/javascript/client-functions) +- [Server side functions](/docs/developers/scripting-reference/runtimes/javascript/server-functions) \ No newline at end of file diff --git a/content/docs/developers/scripting-reference/runtimes/javascript/client-functions.md b/content/docs/developers/scripting-reference/runtimes/javascript/client-functions.md new file mode 100644 index 000000000..ba7eb0f56 --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/javascript/client-functions.md @@ -0,0 +1,15 @@ +--- +title: Client-side functions in JavaScript +weight: 511 +--- + +## Runtime-specific functions +- [emit](/docs/developers/scripting-reference/runtimes/javascript/functions/emit-client) +- [emitNet](/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-client) +- [onNet](/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-client) +- [on](/docs/developers/scripting-reference/runtimes/javascript/functions/on-client) +- [setTick](/docs/developers/scripting-reference/runtimes/javascript/functions/setTick) +- [clearTick](/docs/developers/scripting-reference/runtimes/javascript/functions/clearTick) + +## Native functions +Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/RegisterNetEvent.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/RegisterNetEvent.md similarity index 100% rename from content/docs/scripting-reference/runtimes/javascript/functions/RegisterNetEvent.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/RegisterNetEvent.md diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/_index.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/_index.md similarity index 100% rename from content/docs/scripting-reference/runtimes/javascript/functions/_index.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/_index.md diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/addRawEventListener.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/addRawEventListener.md similarity index 100% rename from content/docs/scripting-reference/runtimes/javascript/functions/addRawEventListener.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/addRawEventListener.md diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/clearTick.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/clearTick.md similarity index 86% rename from content/docs/scripting-reference/runtimes/javascript/functions/clearTick.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/clearTick.md index b722400ae..1b303225b 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/clearTick.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/clearTick.md @@ -31,4 +31,4 @@ setTimeout(() => { ``` -[setTick]: /docs/scripting-reference/runtimes/javascript/functions/setTick \ No newline at end of file +[setTick]: /docs/developers/scripting-reference/runtimes/javascript/functions/setTick \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/emit-client.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emit-client.md similarity index 66% rename from content/docs/scripting-reference/runtimes/javascript/functions/emit-client.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/emit-client.md index e79629ba3..00273c67b 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/emit-client.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emit-client.md @@ -3,7 +3,7 @@ title: Emit - client --- Use `emit` function when you want to trigger an event on the same client.\ -You need to declare the event on the client with [on](/docs/scripting-reference/runtimes/javascript/functions/on-client) or [onNet](/docs/scripting-reference/runtimes/javascript/functions/onNet-client) first. +You need to declare the event on the client with [on](/docs/developers/scripting-reference/runtimes/javascript/functions/on-client) or [onNet](/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-client) first. ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/emit-server.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emit-server.md similarity index 67% rename from content/docs/scripting-reference/runtimes/javascript/functions/emit-server.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/emit-server.md index f1c3604f9..e4cf3d0e9 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/emit-server.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emit-server.md @@ -3,7 +3,7 @@ title: Emit - server --- Use `emit` function when you want to trigger an event from the server to the server.\ -You need to declare the event on the server with [on](/docs/scripting-reference/runtimes/javascript/functions/on-server) or [onNet](/docs/scripting-reference/runtimes/javascript/functions/onNet-server) first. +You need to declare the event on the server with [on](/docs/developers/scripting-reference/runtimes/javascript/functions/on-server) or [onNet](/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-server) first. ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/emitNet-client.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-client.md similarity index 76% rename from content/docs/scripting-reference/runtimes/javascript/functions/emitNet-client.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-client.md index be0ba5355..0090a12e5 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/emitNet-client.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-client.md @@ -3,7 +3,7 @@ title: EmitNet - client --- Use `emitNet` function when you want to trigger an event from the client to the server.\ -You need to declare the event on the server with [onNet](/docs/scripting-reference/runtimes/javascript/functions/onNet-server) first. +You need to declare the event on the server with [onNet](/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-server) first. ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/emitNet-server.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-server.md similarity index 83% rename from content/docs/scripting-reference/runtimes/javascript/functions/emitNet-server.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-server.md index 41e77bd41..678dff973 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/emitNet-server.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-server.md @@ -3,7 +3,7 @@ title: EmitNet - server --- Use `emitNet` function when you want to trigger an event from the server to a client or to all clients.\ -You need to declare the event on the client with [onNet](/docs/scripting-reference/runtimes/javascript/functions/onNet-client) first. +You need to declare the event on the client with [onNet](/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-client) first. ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/exports.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/exports.md similarity index 100% rename from content/docs/scripting-reference/runtimes/javascript/functions/exports.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/exports.md diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/on-client.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/on-client.md similarity index 79% rename from content/docs/scripting-reference/runtimes/javascript/functions/on-client.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/on-client.md index 662d853b3..92352d547 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/on-client.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/on-client.md @@ -3,7 +3,7 @@ title: On - client --- Use `on` function when you want to listen from client only.\ -This declares an event which gets triggered with [emit](/docs/scripting-reference/runtimes/javascript/functions/emit-client) from the client. +This declares an event which gets triggered with [emit](/docs/developers/scripting-reference/runtimes/javascript/functions/emit-client) from the client. ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/on-server.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/on-server.md similarity index 77% rename from content/docs/scripting-reference/runtimes/javascript/functions/on-server.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/on-server.md index 95fe05b5b..a3d2c9496 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/on-server.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/on-server.md @@ -3,7 +3,7 @@ title: On - server --- Use `on` function when you want to listen from server only.\ -This declares an event which gets triggered with [emit](/docs/scripting-reference/runtimes/javascript/functions/emit-server) from the server. +This declares an event which gets triggered with [emit](/docs/developers/scripting-reference/runtimes/javascript/functions/emit-server) from the server. ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/onNet-client.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-client.md similarity index 70% rename from content/docs/scripting-reference/runtimes/javascript/functions/onNet-client.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-client.md index d04ec02ea..ed18244be 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/onNet-client.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-client.md @@ -3,7 +3,7 @@ title: onNet - client --- Use `onNet` function when you want to listen from client **AND** from server.\ -This declares an event which gets triggered with [emit](/docs/scripting-reference/runtimes/javascript/functions/emit-client) (from client) or [emitNet](/docs/scripting-reference/runtimes/javascript/functions/emitNet-server) (from server). +This declares an event which gets triggered with [emit](/docs/developers/scripting-reference/runtimes/javascript/functions/emit-client) (from client) or [emitNet](/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-server) (from server). ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/onNet-server.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-server.md similarity index 71% rename from content/docs/scripting-reference/runtimes/javascript/functions/onNet-server.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-server.md index 08a42b168..7476c2fd9 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/onNet-server.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-server.md @@ -3,7 +3,7 @@ title: onNet - server --- Use `onNet` function when you want to listen from server **AND** from client.\ -This declares an event which gets triggered with [emit](/docs/scripting-reference/runtimes/javascript/functions/emit-server) (from server) or [emitNet](/docs/scripting-reference/runtimes/javascript/functions/emitNet-client) (from client). +This declares an event which gets triggered with [emit](/docs/developers/scripting-reference/runtimes/javascript/functions/emit-server) (from server) or [emitNet](/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-client) (from client). ## Signature diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/removeEventListener.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/removeEventListener.md similarity index 100% rename from content/docs/scripting-reference/runtimes/javascript/functions/removeEventListener.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/removeEventListener.md diff --git a/content/docs/scripting-reference/runtimes/javascript/functions/setTick.md b/content/docs/developers/scripting-reference/runtimes/javascript/functions/setTick.md similarity index 79% rename from content/docs/scripting-reference/runtimes/javascript/functions/setTick.md rename to content/docs/developers/scripting-reference/runtimes/javascript/functions/setTick.md index 565ca4f45..fce05b8df 100644 --- a/content/docs/scripting-reference/runtimes/javascript/functions/setTick.md +++ b/content/docs/developers/scripting-reference/runtimes/javascript/functions/setTick.md @@ -19,4 +19,4 @@ setTick(() => { }); ``` -[clearTick]: /docs/scripting-reference/runtimes/javascript/functions/clearTick \ No newline at end of file +[clearTick]: /docs/developers/scripting-reference/runtimes/javascript/functions/clearTick \ No newline at end of file diff --git a/content/docs/developers/scripting-reference/runtimes/javascript/server-functions.md b/content/docs/developers/scripting-reference/runtimes/javascript/server-functions.md new file mode 100644 index 000000000..03ecebda2 --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/javascript/server-functions.md @@ -0,0 +1,16 @@ +--- +title: Server-side functions in JavaScript +weight: 512 +--- + +## Runtime-specific functions +- [exports](/docs/developers/scripting-reference/runtimes/javascript/functions/exports) +- [emit](/docs/developers/scripting-reference/runtimes/javascript/functions/emit-server) +- [emitNet](/docs/developers/scripting-reference/runtimes/javascript/functions/emitNet-server) +- [onNet](/docs/developers/scripting-reference/runtimes/javascript/functions/onNet-server) +- [on](/docs/developers/scripting-reference/runtimes/javascript/functions/on-server) +- [setTick](/docs/developers/scripting-reference/runtimes/javascript/functions/setTick) +- [clearTick](/docs/developers/scripting-reference/runtimes/javascript/functions/clearTick) + +## Native functions +Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/developers/scripting-reference/runtimes/lua/_index.md b/content/docs/developers/scripting-reference/runtimes/lua/_index.md new file mode 100644 index 000000000..97e970101 --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/lua/_index.md @@ -0,0 +1,9 @@ +--- +title: Lua function reference +weight: 513 +hidden: false +layout: single +--- + +- [Client side functions](/docs/developers/scripting-reference/runtimes/lua/client-functions) +- [Server side functions](/docs/developers/scripting-reference/runtimes/lua/server-functions) \ No newline at end of file diff --git a/content/docs/developers/scripting-reference/runtimes/lua/client-functions.md b/content/docs/developers/scripting-reference/runtimes/lua/client-functions.md new file mode 100644 index 000000000..efbc78bc9 --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/lua/client-functions.md @@ -0,0 +1,26 @@ +--- +title: Client-side functions in Lua +weight: 514 +--- + +## Runtime-specific functions +- [AddEventHandler](/docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler) +- [Citizen.Await](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Await) +- [Citizen.Wait](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Wait) +- [Citizen.CreateThread](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThread) +- [Citizen.SetTimeout](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout) +- [Citizen.Trace](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Trace) +- [quat](/docs/developers/scripting-reference/runtimes/lua/functions/quat) +- [RegisterNetEvent](/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent) +- [RegisterNUICallback](/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNUICallback) +- [RemoveEventHandler](/docs/developers/scripting-reference/runtimes/lua/functions/RemoveEventHandler) +- [SendNUIMessage](/docs/developers/scripting-reference/runtimes/lua/functions/SendNUIMessage) +- [TriggerEvent](/docs/developers/scripting-reference/runtimes/lua/functions/TriggerEvent) +- [TriggerServerEvent](/docs/developers/scripting-reference/runtimes/lua/functions/TriggerServerEvent) +- [vec](/docs/developers/scripting-reference/runtimes/lua/functions/vec) +- [vector2](/docs/developers/scripting-reference/runtimes/lua/functions/vector2) +- [vector3](/docs/developers/scripting-reference/runtimes/lua/functions/vector3) +- [vector4](/docs/developers/scripting-reference/runtimes/lua/functions/vector4) + +## Native functions +Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/lua/functions/AddEventHandler.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler.md similarity index 78% rename from content/docs/scripting-reference/runtimes/lua/functions/AddEventHandler.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler.md index 323121c73..5548c6a50 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/AddEventHandler.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler.md @@ -31,5 +31,5 @@ end) ```lua TriggerServerEvent('eventName', 'Hello world!') ``` -[listening-for-events]: /docs/scripting-manual/working-with-events/listening-for-events/ -[RegisterNetEvent]: /docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent/ +[listening-for-events]: /docs/developers/scripting-manual/working-with-events/listening-for-events/ +[RegisterNetEvent]: /docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent/ diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.Await.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Await.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.Await.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Await.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.CanonicalizeRef.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CanonicalizeRef.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.CanonicalizeRef.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CanonicalizeRef.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThread.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThread.md similarity index 92% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThread.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThread.md index 2ffc3c78c..f6fbf2266 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThread.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThread.md @@ -34,4 +34,4 @@ end) print("Can you see me?") ``` -[wait]: /docs/scripting-reference/runtimes/lua/functions/Citizen.Wait +[wait]: /docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Wait diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThreadNow.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThreadNow.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThreadNow.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThreadNow.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.GetFunctionReference.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.GetFunctionReference.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.GetFunctionReference.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.GetFunctionReference.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.InvokeFunctionReference.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.InvokeFunctionReference.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.InvokeFunctionReference.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.InvokeFunctionReference.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.InvokeNative.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.InvokeNative.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.InvokeNative.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.InvokeNative.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloat.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloat.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloat.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloat.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloatInitialized.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloatInitialized.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloatInitialized.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueFloatInitialized.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueInt.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueInt.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueInt.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueInt.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueIntInitialized.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueIntInitialized.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueIntInitialized.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueIntInitialized.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueVector.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueVector.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.PointerValueVector.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.PointerValueVector.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsFloat.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsFloat.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsFloat.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsFloat.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsInteger.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsInteger.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsInteger.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsInteger.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsLong.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsLong.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsLong.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsLong.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsObject.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsObject.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsObject.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsObject.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsString.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsString.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsString.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsString.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsVector.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsVector.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.ResultAsVector.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ResultAsVector.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.ReturnResultAnyway.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ReturnResultAnyway.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.ReturnResultAnyway.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.ReturnResultAnyway.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetCallRefRoutine.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetCallRefRoutine.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetCallRefRoutine.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetCallRefRoutine.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetDeleteRefRoutine.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetDeleteRefRoutine.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetDeleteRefRoutine.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetDeleteRefRoutine.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetDuplicateRefRoutine.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetDuplicateRefRoutine.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetDuplicateRefRoutine.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetDuplicateRefRoutine.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetEventRoutine.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetEventRoutine.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetEventRoutine.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetEventRoutine.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTickRoutine.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetTickRoutine.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTickRoutine.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetTickRoutine.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.Trace.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Trace.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.Trace.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Trace.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/Citizen.Wait.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Wait.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/Citizen.Wait.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Wait.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/GetPlayers.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/GetPlayers.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/GetPlayers.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/GetPlayers.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequest.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequest.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequest.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequest.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait.md similarity index 82% rename from content/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait.md index 13d4fa0de..305622e31 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait.md @@ -2,7 +2,7 @@ title: PerformHttpRequestAwait --- -This function is an synchronous wrapper around [PerformHttpRequest](/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequest) which will await the data internally, preventing the need for callbacks. **It's available on server build 9515 and newer** +This function is an synchronous wrapper around [PerformHttpRequest](/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequest) which will await the data internally, preventing the need for callbacks. **It's available on server build 9515 and newer** Syntax ------ diff --git a/content/docs/scripting-reference/runtimes/lua/functions/RegisterNUICallback.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNUICallback.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/RegisterNUICallback.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNUICallback.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent.md similarity index 89% rename from content/docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent.md index f3056a691..80a974151 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent.md @@ -38,4 +38,4 @@ AddEventHandler('eventName', function(...) end) ``` -[AddEventHandler]: /docs/scripting-reference/runtimes/lua/functions/AddEventHandler +[AddEventHandler]: /docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler diff --git a/content/docs/scripting-reference/runtimes/lua/functions/RemoveEventHandler.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/RemoveEventHandler.md similarity index 81% rename from content/docs/scripting-reference/runtimes/lua/functions/RemoveEventHandler.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/RemoveEventHandler.md index f4b0d81fb..f114e0f61 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/RemoveEventHandler.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/RemoveEventHandler.md @@ -27,4 +27,4 @@ TriggerEvent("someEvent") RemoveEventHandler(eventA) ``` -[AddEventHandler]: /docs/scripting-reference/runtimes/lua/functions/AddEventHandler +[AddEventHandler]: /docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler diff --git a/content/docs/scripting-reference/runtimes/lua/functions/SendNUIMessage.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/SendNUIMessage.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/SendNUIMessage.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/SendNUIMessage.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/TriggerClientEvent.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/TriggerClientEvent.md similarity index 84% rename from content/docs/scripting-reference/runtimes/lua/functions/TriggerClientEvent.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/TriggerClientEvent.md index c724e02a9..359a3e5d8 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/TriggerClientEvent.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/TriggerClientEvent.md @@ -44,5 +44,5 @@ end) TriggerClientEvent('eventName', playerId, 'Hello world!') ``` -[AddEventHandler]: /docs/scripting-reference/runtimes/lua/functions/AddEventHandler/ -[RegisterNetEvent]: /docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent/ +[AddEventHandler]: /docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler/ +[RegisterNetEvent]: /docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent/ diff --git a/content/docs/scripting-reference/runtimes/lua/functions/TriggerEvent.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/TriggerEvent.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/TriggerEvent.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/TriggerEvent.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/TriggerServerEvent.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/TriggerServerEvent.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/TriggerServerEvent.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/TriggerServerEvent.md diff --git a/content/docs/developers/scripting-reference/runtimes/lua/functions/_index.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/_index.md new file mode 100644 index 000000000..e37afb6c3 --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/_index.md @@ -0,0 +1,23 @@ +--- +title: List of functions in Lua +toc_hide: true +layout: single +--- + +- [AddEventHandler](/docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler) +- [Citizen.Await](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Await) +- [Citizen.Wait](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Wait) +- [Citizen.CreateThread](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThread) +- [Citizen.SetTimeout](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout) +- [Citizen.Trace](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Trace) +- [quat](/docs/developers/scripting-reference/runtimes/lua/functions/quat) +- [RegisterNetEvent](/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent) +- [RegisterNUICallback](/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNUICallback) +- [RemoveEventHandler](/docs/developers/scripting-reference/runtimes/lua/functions/RemoveEventHandler) +- [SendNUIMessage](/docs/developers/scripting-reference/runtimes/lua/functions/SendNUIMessage) +- [TriggerEvent](/docs/developers/scripting-reference/runtimes/lua/functions/TriggerEvent) +- [TriggerServerEvent](/docs/developers/scripting-reference/runtimes/lua/functions/TriggerServerEvent) +- [vec](/docs/developers/scripting-reference/runtimes/lua/functions/vec) +- [vector2](/docs/developers/scripting-reference/runtimes/lua/functions/vector2) +- [vector3](/docs/developers/scripting-reference/runtimes/lua/functions/vector3) +- [vector4](/docs/developers/scripting-reference/runtimes/lua/functions/vector4) \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/lua/functions/cross.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/cross.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/cross.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/cross.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/dot.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/dot.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/dot.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/dot.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/inv.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/inv.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/inv.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/inv.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/norm.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/norm.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/norm.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/norm.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/promise.all.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/promise.all.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/promise.all.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/promise.all.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/promise.first.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/promise.first.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/promise.first.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/promise.first.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/promise.map.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/promise.map.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/promise.map.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/promise.map.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/promise.new.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/promise.new.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/promise.new.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/promise.new.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/quat.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/quat.md similarity index 96% rename from content/docs/scripting-reference/runtimes/lua/functions/quat.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/quat.md index 75843b855..5ade4839b 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/quat.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/quat.md @@ -133,8 +133,8 @@ local q = quat(w, x, y, z) print(q) ``` -[lua-runtime]: /docs/scripting-manual/runtimes/lua -[vec3]: /docs/scripting-reference/runtimes/lua/functions/vector3 +[lua-runtime]: /docs/developers/scripting-manual/runtimes/lua +[vec3]: /docs/developers/scripting-reference/runtimes/lua/functions/vector3 [wiki-euler]: https://en.wikipedia.org/wiki/Euler_angles [wiki-quats]: https://en.wikipedia.org/wiki/Quaternion [wiki-gimbal]: https://en.wikipedia.org/wiki/Gimbal_lock diff --git a/content/docs/scripting-reference/runtimes/lua/functions/slerp.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/slerp.md similarity index 100% rename from content/docs/scripting-reference/runtimes/lua/functions/slerp.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/slerp.md diff --git a/content/docs/scripting-reference/runtimes/lua/functions/vec.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/vec.md similarity index 86% rename from content/docs/scripting-reference/runtimes/lua/functions/vec.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/vec.md index b153d373d..2ac5a0145 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/vec.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/vec.md @@ -60,6 +60,6 @@ function vec_alt(...) end ``` -[vec2]: /docs/scripting-reference/runtimes/lua/functions/vector2 -[vec3]: /docs/scripting-reference/runtimes/lua/functions/vector3 -[vec4]: /docs/scripting-reference/runtimes/lua/functions/vector4 +[vec2]: /docs/developers/scripting-reference/runtimes/lua/functions/vector2 +[vec3]: /docs/developers/scripting-reference/runtimes/lua/functions/vector3 +[vec4]: /docs/developers/scripting-reference/runtimes/lua/functions/vector4 diff --git a/content/docs/scripting-reference/runtimes/lua/functions/vector2.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/vector2.md similarity index 97% rename from content/docs/scripting-reference/runtimes/lua/functions/vector2.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/vector2.md index fc44e4f17..b80de4f7d 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/vector2.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/vector2.md @@ -83,4 +83,4 @@ print(v.xyx) -- prints `vector3(1, 2, 1)` print(v.yxyx) -- prints `vector4(2, 1, 2, 1)` ``` -[lua-runtime]: /docs/scripting-manual/runtimes/lua +[lua-runtime]: /docs/developers/scripting-manual/runtimes/lua diff --git a/content/docs/scripting-reference/runtimes/lua/functions/vector3.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/vector3.md similarity index 95% rename from content/docs/scripting-reference/runtimes/lua/functions/vector3.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/vector3.md index e1d95b26a..ababb7355 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/vector3.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/vector3.md @@ -108,5 +108,5 @@ local newPosition = (forwardVector * 5) + position SetEntityCoords(vehicle, newPosition) ``` -[lua-runtime]: /docs/scripting-manual/runtimes/lua -[natives-manual]: /docs/scripting-manual/introduction/about-native-functions +[lua-runtime]: /docs/developers/scripting-manual/runtimes/lua +[natives-manual]: /docs/developers/scripting-manual/introduction/about-native-functions diff --git a/content/docs/scripting-reference/runtimes/lua/functions/vector4.md b/content/docs/developers/scripting-reference/runtimes/lua/functions/vector4.md similarity index 97% rename from content/docs/scripting-reference/runtimes/lua/functions/vector4.md rename to content/docs/developers/scripting-reference/runtimes/lua/functions/vector4.md index 112eb55dd..50d2a0261 100644 --- a/content/docs/scripting-reference/runtimes/lua/functions/vector4.md +++ b/content/docs/developers/scripting-reference/runtimes/lua/functions/vector4.md @@ -89,4 +89,4 @@ print(v.yxyx) -- prints `vector4(2, 1, 2, 1)` print(v.zxwy) -- prints `vector4(3, 1, 4, 2)` ``` -[lua-runtime]: /docs/scripting-manual/runtimes/lua +[lua-runtime]: /docs/developers/scripting-manual/runtimes/lua diff --git a/content/docs/developers/scripting-reference/runtimes/lua/server-functions.md b/content/docs/developers/scripting-reference/runtimes/lua/server-functions.md new file mode 100644 index 000000000..0823923ad --- /dev/null +++ b/content/docs/developers/scripting-reference/runtimes/lua/server-functions.md @@ -0,0 +1,23 @@ +--- +title: Server-side functions in Lua +weight: 515 +--- + +## Runtime-specific functions +- [AddEventHandler](/docs/developers/scripting-reference/runtimes/lua/functions/AddEventHandler) +- [Citizen.Await](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Await) +- [Citizen.CreateThread](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.CreateThread) +- [Citizen.SetTimeout](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout) +- [Citizen.Trace](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Trace) +- [Citizen.Wait](/docs/developers/scripting-reference/runtimes/lua/functions/Citizen.Wait) +- [GetPlayerIdentifiers](/docs/developers/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers) +- [GetPlayers](/docs/developers/scripting-reference/runtimes/lua/functions/GetPlayers) +- [PerformHttpRequest](/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequest) +- [PerformHttpRequestAwait](/docs/developers/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait) +- [RegisterNetEvent](/docs/developers/scripting-reference/runtimes/lua/functions/RegisterNetEvent) +- [RemoveEventHandler](/docs/developers/scripting-reference/runtimes/lua/functions/RemoveEventHandler) +- [TriggerClientEvent](/docs/developers/scripting-reference/runtimes/lua/functions/TriggerClientEvent) +- [TriggerEvent](/docs/developers/scripting-reference/runtimes/lua/functions/TriggerEvent) + +## Native functions +Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/scripting-reference/server-functions/_index.md b/content/docs/developers/scripting-reference/server-functions/_index.md similarity index 68% rename from content/docs/scripting-reference/server-functions/_index.md rename to content/docs/developers/scripting-reference/server-functions/_index.md index 0f3d27da2..ccf6e55d5 100644 --- a/content/docs/scripting-reference/server-functions/_index.md +++ b/content/docs/developers/scripting-reference/server-functions/_index.md @@ -16,6 +16,6 @@ Runtime specific functions Some functions are exclusive to the scripting runtime you're using, and are **not** documented in the [FiveM Native Reference List](https://runtime.fivem.net/doc/reference.html). Refer to their docs for more detail. -- [Server-side functions in Lua](/docs/scripting-reference/runtimes/lua/server-functions) -- [Server-side functions in JavaScript](/docs/scripting-reference/runtimes/javascript/server-functions) -- [Server-side functions in C#](/docs/scripting-reference/runtimes/csharp/server-functions) +- [Server-side functions in Lua](/docs/developers/scripting-reference/runtimes/lua/server-functions) +- [Server-side functions in JavaScript](/docs/developers/scripting-reference/runtimes/javascript/server-functions) +- [Server-side functions in C#](/docs/developers/scripting-reference/runtimes/csharp/server-functions) diff --git a/content/docs/fxdk/resources.md b/content/docs/fxdk/resources.md index 060c95763..28d5826e6 100644 --- a/content/docs/fxdk/resources.md +++ b/content/docs/fxdk/resources.md @@ -32,7 +32,7 @@ This feature can be toggled on/off as well, in project explorer you'll notice th ## Convars -Resource can declaratively tell FxDK what [convars](/docs/scripting-reference/convars/) it is able to consume, they'll appear in project settings under `Variables` section with matching UI for each convar kind. +Resource can declaratively tell FxDK what [convars](/docs/developers/scripting-reference/convars/) it is able to consume, they'll appear in project settings under `Variables` section with matching UI for each convar kind. Definitions take place in `fxmanifest.lua` of resource, you can specify as many categories as you need: @@ -92,9 +92,9 @@ General schema for convar entry: Convar of any kind can be of 3 types: - - [`Server only`](/docs/scripting-reference/convars/#standard-convars) - - [`Information`](/docs/scripting-reference/convars/#server-information-convars) - name starts with `#` symbol, `#my_resource_info` convar from example above. - - [`Replicated`](/docs/scripting-reference/convars/#server-replicated-convars) - name starts with `$` symbol, `$my_resource_repl` convar from example above. + - [`Server only`](/docs/developers/scripting-reference/convars/#standard-convars) + - [`Information`](/docs/developers/scripting-reference/convars/#server-information-convars) - name starts with `#` symbol, `#my_resource_info` convar from example above. + - [`Replicated`](/docs/developers/scripting-reference/convars/#server-replicated-convars) - name starts with `$` symbol, `$my_resource_repl` convar from example above. ### Kinds diff --git a/content/docs/game-references/data-files.md b/content/docs/game-references/data-files.md index 4e32b8235..1e2659fc3 100644 --- a/content/docs/game-references/data-files.md +++ b/content/docs/game-references/data-files.md @@ -3,7 +3,7 @@ title: Data files weight: 740 --- -A **data file** is an entry in the [resource manifest](/docs/scripting-manual/introduction/introduction-to-resources#the-resource-manifest) that references a file to load in the game extra content mounting system. +A **data file** is an entry in the [resource manifest](/docs/developers/scripting-manual/introduction/introduction-to-resources#the-resource-manifest) that references a file to load in the game extra content mounting system. Data file types --------------- diff --git a/content/docs/game-references/game-events.md b/content/docs/game-references/game-events.md index d17b0b8dd..7cb604389 100644 --- a/content/docs/game-references/game-events.md +++ b/content/docs/game-references/game-events.md @@ -280,5 +280,5 @@ useful information to share, please [add it to this doc][contributing]. Any help | CEventVehicleOnFire | | | CEventWrithe | | -[event-ref]: /docs/scripting-reference/events/list/gameEventTriggered +[event-ref]: /docs/developers/scripting-reference/events/list/gameEventTriggered [contributing]: /contributing diff --git a/content/docs/resources/chat/events/chat-addSuggestions.md b/content/docs/resources/chat/events/chat-addSuggestions.md index cbfed90db..6d6cdd7d9 100644 --- a/content/docs/resources/chat/events/chat-addSuggestions.md +++ b/content/docs/resources/chat/events/chat-addSuggestions.md @@ -18,7 +18,7 @@ Parameters array suggestions ``` -- **suggestions**: an array containing multiple [suggestion](../chat-addSuggestion) objects. +- **suggestions**: an array containing multiple [suggestion](./chat-addSuggestion) objects. Examples -------- diff --git a/content/docs/resources/chat/events/chat-removeSuggestion.md b/content/docs/resources/chat/events/chat-removeSuggestion.md index 09baee38b..7c2c13256 100644 --- a/content/docs/resources/chat/events/chat-removeSuggestion.md +++ b/content/docs/resources/chat/events/chat-removeSuggestion.md @@ -19,7 +19,7 @@ string commandName Examples -------- -This example removes the suggestion that was created with the example of [chat:addSuggestion](../chat-addSuggestion). +This example removes the suggestion that was created with the example of [chat:addSuggestion](./chat-addSuggestion). ##### Lua Example: ```lua diff --git a/content/docs/resources/chat/events/chatMessage.md b/content/docs/resources/chat/events/chatMessage.md index c65e602e7..75ed757e3 100644 --- a/content/docs/resources/chat/events/chatMessage.md +++ b/content/docs/resources/chat/events/chatMessage.md @@ -4,7 +4,7 @@ title: chatMessage ## About This event is available both in the client and in the server. -In the client this event is **deprecated**! Use [chat:addMessage](../chat-addMessage) instead. +In the client this event is **deprecated**! Use [chat:addMessage](./chat-addMessage) instead. Triggering this event in the client allows you to send a chat message to this client. Listening for this event in the server allows you to read/log/reply the message. diff --git a/content/docs/resources/spawnmanager/functions/setAutoSpawn.md b/content/docs/resources/spawnmanager/functions/setAutoSpawn.md index 0e4c41acb..2da63f83a 100644 --- a/content/docs/resources/spawnmanager/functions/setAutoSpawn.md +++ b/content/docs/resources/spawnmanager/functions/setAutoSpawn.md @@ -5,11 +5,11 @@ title: setAutoSpawn ## About This export allows you to change the auto-spawning flag. -When this is enabled, players will be automatically spawned upon joining the server at a random spawnpoint. After dying, they will also be respawned after 2 seconds. To instantly and forcefully respawn the player without the cooldown, use [forceRespawn](./functions/forceRespawn). +When this is enabled, players will be automatically spawned upon joining the server at a random spawnpoint. After dying, they will also be respawned after 2 seconds. To instantly and forcefully respawn the player without the cooldown, use [forceRespawn](./forceRespawn). -To determine which spawn point to use in auto-spawning, use [setAutoSpawnCallback](./functions/setAutoSpawnCallback). +To determine which spawn point to use in auto-spawning, use [setAutoSpawnCallback](./setAutoSpawnCallback). -If auto-spawning is disabled, you have to manually call [spawnPlayer](./functions/spawnPlayer). +If auto-spawning is disabled, you have to manually call [spawnPlayer](./spawnPlayer). ## Name ``` diff --git a/content/docs/resources/spawnmanager/functions/spawnPlayer.md b/content/docs/resources/spawnmanager/functions/spawnPlayer.md index 9c7156b6f..3eb395f7a 100644 --- a/content/docs/resources/spawnmanager/functions/spawnPlayer.md +++ b/content/docs/resources/spawnmanager/functions/spawnPlayer.md @@ -3,7 +3,7 @@ title: spawnPlayer --- ## About -This export allows you to choose specifically when or where to spawn a player. You'll most likely want to use this if you've turned off the auto-spawn flag with [setAutoSpawn](./functions/setAutoSpawn). +This export allows you to choose specifically when or where to spawn a player. You'll most likely want to use this if you've turned off the auto-spawn flag with [setAutoSpawn](./setAutoSpawn). Once the player has spawned, the [playerSpawned](../../events/playerSpawned) event will be triggered. @@ -21,7 +21,7 @@ spawnIdx, function callback(object spawn) ### Optional Arguments - - `spawnIdx` this can be a spawn point from a map resource registered by [mapmanager](../../../mapmanager), or can be added with [addSpawnPoint](./functions/addSpawnPoint). Instead of an integer, you can pass a table defining a spawn point. If this isn't specified, a random spawn point will be picked out of the already registered spawn points (if any). + - `spawnIdx` this can be a spawn point from a map resource registered by [mapmanager](../../../mapmanager), or can be added with [addSpawnPoint](./addSpawnPoint). Instead of an integer, you can pass a table defining a spawn point. If this isn't specified, a random spawn point will be picked out of the already registered spawn points (if any). - `callback` is executed once the player has successfully spawned and passes a `spawn` object as specified in [playerSpawned](../../events/playerSpawned). diff --git a/content/docs/scripting-manual/_index.md b/content/docs/scripting-manual/_index.md deleted file mode 100644 index 78d1402ee..000000000 --- a/content/docs/scripting-manual/_index.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Guides for scripting -weight: 400 -layout: single ---- - -- [Scripting introduction](/docs/scripting-manual/introduction) - - [Introduction to resources](/docs/scripting-manual/introduction/introduction-to-resources) - - [Creating your first script](/docs/scripting-manual/introduction/creating-your-first-script) - - [About native functions](/docs/scripting-manual/introduction/about-native-functions) -- [Scripting runtimes](/docs/scripting-manual/runtimes) - - [Scripting in Lua](/docs/scripting-manual/runtimes/lua) - - [Scripting in JavaScript](/docs/scripting-manual/runtimes/javascript) - - [Scripting in C#](/docs/scripting-manual/runtimes/csharp) -- [Migrating from deprecated methods](/docs/scripting-manual/migrating-from-deprecated) - - [Chat Messages](/docs/scripting-manual/migrating-from-deprecated/chat-messages) -- [Working with events](/docs/scripting-manual/working-with-events) - - [Listening for events](/docs/scripting-manual/working-with-events/listening-for-events) - - [Triggering events](/docs/scripting-manual/working-with-events/triggering-events) - - - -- [User interfaces with NUI](/docs/scripting-manual/nui-development) - - [Fullscreen NUI](/docs/scripting-manual/nui-development/full-screen-nui) - - [Direct-rendered UI (DUI)](/docs/scripting-manual/nui-development/dui) - - [NUI callbacks](/docs/scripting-manual/nui-development/nui-callbacks) - - [Loading screens](/docs/scripting-manual/nui-development/loading-screens) -- [Using Scaleform](/docs/scripting-manual/using-scaleform) -- [Voice](/docs/scripting-manual/voice) -- [Using new game features](/docs/scripting-manual/using-new-game-features) - - [Fuel consumption](/docs/scripting-manual/using-new-game-features/fuel-consumption) - - [Collection-based natives](/docs/scripting-manual/using-new-game-features/collection-based-natives) diff --git a/content/docs/scripting-manual/introduction/_index.md b/content/docs/scripting-manual/introduction/_index.md deleted file mode 100644 index 2840c932a..000000000 --- a/content/docs/scripting-manual/introduction/_index.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Scripting introduction -weight: 410 -layout: single ---- - -- [Introduction to resources](/docs/scripting-manual/introduction/introduction-to-resources) -- [Creating your first script in Lua](/docs/scripting-manual/introduction/creating-your-first-script) -- [Creating your first script in C#](/docs/scripting-manual/introduction/creating-your-first-script-csharp) -- [Creating your first script in JavaScript](/docs/scripting-manual/introduction/creating-your-first-script-javascript) -- [About native functions](/docs/scripting-manual/introduction/about-native-functions) diff --git a/content/docs/scripting-manual/nui-development/_index.md b/content/docs/scripting-manual/nui-development/_index.md deleted file mode 100644 index 03e9f49f7..000000000 --- a/content/docs/scripting-manual/nui-development/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: User interfaces with NUI -weight: 440 ---- - -**NUI** (short for 'new UI') is the HTML-based user interface functionality in the CitizenFX framework. Currently using -the [Chromium Embedded Framework](cef), it offers an asynchronous, performant way of creating in-game UI using -web technologies (HTML/CSS/JS, including frameworks like React or Angular, and accelerated WebGL). - -- [Fullscreen NUI](/docs/scripting-manual/nui-development/full-screen-nui) -- [Direct-rendered UI (DUI)](/docs/scripting-manual/nui-development/dui) -- [NUI callbacks](/docs/scripting-manual/nui-development/nui-callbacks) -- [Loading screens](/docs/scripting-manual/nui-development/loading-screens) \ No newline at end of file diff --git a/content/docs/scripting-manual/runtimes/_index.md b/content/docs/scripting-manual/runtimes/_index.md deleted file mode 100644 index 8d6ddff6b..000000000 --- a/content/docs/scripting-manual/runtimes/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Scripting runtimes -weight: 420 -layout: single ---- - -If you're new to scripting, read the introduction first. If you're unsure what language you should choose, remember that -no matter what you choose, it will get the job done. Pick something you're already comfortable with, or something which -you think is the most useful to you. There is no best practice. If you're still unsure, Lua is a safe choice. - -- [Scripting in Lua](/docs/scripting-manual/runtimes/lua) -- [Scripting in JavaScript](/docs/scripting-manual/runtimes/javascript) -- [Scripting in C#](/docs/scripting-manual/runtimes/csharp) diff --git a/content/docs/scripting-reference/_index.md b/content/docs/scripting-reference/_index.md deleted file mode 100644 index f7baf610b..000000000 --- a/content/docs/scripting-reference/_index.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Scripting reference -weight: 1220 -description: > - All the things referencing scripting -layout: single ---- - -## Open To All Levels ✨ - -FiveM is a fantastic platform for developers of all skill levels to learn and grow. This page will provide comprehensive references for all things related to scripting. - -## Tools for Server Owners - -We offer a variety of excellent tools to help you get started with your server. Here's a list of some key resources: - -- [Convars](/docs/scripting-reference/convars) -- [OneSync](/docs/scripting-reference/onesync) -- [State Bags](/docs/scripting-manual/networking/state-bags.md) -- [Resource Manifest](/docs/scripting-reference/resource-manifest/resource-manifest) - -### Develop Scripts - -FiveM supports C#, Lua, and JavaScript, allowing you the flexibility to create and modify your scripts. Here are some useful links to get you started: - -- [Create Your First Script](/docs/scripting-manual/introduction/creating-your-first-script) -- [Client Events](/docs/scripting-reference/events/client-events) -- [Server Events](/docs/scripting-reference/events/server-events) -- [Native Functions](https://docs.fivem.net/natives/) -- [Client Functions](/docs/scripting-reference/client-functions) -- [Server Functions](/docs/scripting-reference/server-functions) - diff --git a/content/docs/scripting-reference/events/_index.md b/content/docs/scripting-reference/events/_index.md deleted file mode 100644 index cbaaec51c..000000000 --- a/content/docs/scripting-reference/events/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Events -weight: 540 -hidden: false ---- - -- [Client events](/docs/scripting-reference/events/client-events/) -- [Server events](/docs/scripting-reference/events/server-events/) -- [List of events](/docs/scripting-reference/events/list/) diff --git a/content/docs/scripting-reference/runtimes/_index.md b/content/docs/scripting-reference/runtimes/_index.md deleted file mode 100644 index b767def4d..000000000 --- a/content/docs/scripting-reference/runtimes/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Runtime-specific references -weight: 506 -layout: single ---- - -- [Functions in Lua](/docs/scripting-reference/runtimes/lua) -- [Functions in JavaScript](/docs/scripting-reference/runtimes/javascript) -- [Functions in C#](/docs/scripting-reference/runtimes/csharp) diff --git a/content/docs/scripting-reference/runtimes/csharp/_index.md b/content/docs/scripting-reference/runtimes/csharp/_index.md deleted file mode 100644 index 54424eadd..000000000 --- a/content/docs/scripting-reference/runtimes/csharp/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: C# function reference -weight: 507 -hidden: false -layout: single ---- - -- [Client side functions](/docs/scripting-reference/runtimes/csharp/client-functions) -- [Server side functions](/docs/scripting-reference/runtimes/csharp/server-functions) \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/javascript/_index.md b/content/docs/scripting-reference/runtimes/javascript/_index.md deleted file mode 100644 index 2b55039d5..000000000 --- a/content/docs/scripting-reference/runtimes/javascript/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: JavaScript function reference -weight: 510 -hidden: false -layout: single ---- - -- [Client side functions](/docs/scripting-reference/runtimes/javascript/client-functions) -- [Server side functions](/docs/scripting-reference/runtimes/javascript/server-functions) \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/javascript/client-functions.md b/content/docs/scripting-reference/runtimes/javascript/client-functions.md deleted file mode 100644 index e31f4510c..000000000 --- a/content/docs/scripting-reference/runtimes/javascript/client-functions.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Client-side functions in JavaScript -weight: 511 ---- - -## Runtime-specific functions -- [emit](/docs/scripting-reference/runtimes/javascript/functions/emit-client) -- [emitNet](/docs/scripting-reference/runtimes/javascript/functions/emitNet-client) -- [onNet](/docs/scripting-reference/runtimes/javascript/functions/onNet-client) -- [on](/docs/scripting-reference/runtimes/javascript/functions/on-client) -- [setTick](/docs/scripting-reference/runtimes/javascript/functions/setTick) -- [clearTick](/docs/scripting-reference/runtimes/javascript/functions/clearTick) - -## Native functions -Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/javascript/server-functions.md b/content/docs/scripting-reference/runtimes/javascript/server-functions.md deleted file mode 100644 index 392baf1e2..000000000 --- a/content/docs/scripting-reference/runtimes/javascript/server-functions.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Server-side functions in JavaScript -weight: 512 ---- - -## Runtime-specific functions -- [exports](/docs/scripting-reference/runtimes/javascript/functions/exports) -- [emit](/docs/scripting-reference/runtimes/javascript/functions/emit-server) -- [emitNet](/docs/scripting-reference/runtimes/javascript/functions/emitNet-server) -- [onNet](/docs/scripting-reference/runtimes/javascript/functions/onNet-server) -- [on](/docs/scripting-reference/runtimes/javascript/functions/on-server) -- [setTick](/docs/scripting-reference/runtimes/javascript/functions/setTick) -- [clearTick](/docs/scripting-reference/runtimes/javascript/functions/clearTick) - -## Native functions -Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/lua/_index.md b/content/docs/scripting-reference/runtimes/lua/_index.md deleted file mode 100644 index 5a61d7a8d..000000000 --- a/content/docs/scripting-reference/runtimes/lua/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Lua function reference -weight: 513 -hidden: false -layout: single ---- - -- [Client side functions](/docs/scripting-reference/runtimes/lua/client-functions) -- [Server side functions](/docs/scripting-reference/runtimes/lua/server-functions) \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/lua/client-functions.md b/content/docs/scripting-reference/runtimes/lua/client-functions.md deleted file mode 100644 index 7aba3a087..000000000 --- a/content/docs/scripting-reference/runtimes/lua/client-functions.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Client-side functions in Lua -weight: 514 ---- - -## Runtime-specific functions -- [AddEventHandler](/docs/scripting-reference/runtimes/lua/functions/AddEventHandler) -- [Citizen.Await](/docs/scripting-reference/runtimes/lua/functions/Citizen.Await) -- [Citizen.Wait](/docs/scripting-reference/runtimes/lua/functions/Citizen.Wait) -- [Citizen.CreateThread](/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThread) -- [Citizen.SetTimeout](/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout) -- [Citizen.Trace](/docs/scripting-reference/runtimes/lua/functions/Citizen.Trace) -- [quat](/docs/scripting-reference/runtimes/lua/functions/quat) -- [RegisterNetEvent](/docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent) -- [RegisterNUICallback](/docs/scripting-reference/runtimes/lua/functions/RegisterNUICallback) -- [RemoveEventHandler](/docs/scripting-reference/runtimes/lua/functions/RemoveEventHandler) -- [SendNUIMessage](/docs/scripting-reference/runtimes/lua/functions/SendNUIMessage) -- [TriggerEvent](/docs/scripting-reference/runtimes/lua/functions/TriggerEvent) -- [TriggerServerEvent](/docs/scripting-reference/runtimes/lua/functions/TriggerServerEvent) -- [vec](/docs/scripting-reference/runtimes/lua/functions/vec) -- [vector2](/docs/scripting-reference/runtimes/lua/functions/vector2) -- [vector3](/docs/scripting-reference/runtimes/lua/functions/vector3) -- [vector4](/docs/scripting-reference/runtimes/lua/functions/vector4) - -## Native functions -Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/lua/functions/_index.md b/content/docs/scripting-reference/runtimes/lua/functions/_index.md deleted file mode 100644 index 35bf1f3ae..000000000 --- a/content/docs/scripting-reference/runtimes/lua/functions/_index.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: List of functions in Lua -toc_hide: true -layout: single ---- - -- [AddEventHandler](/docs/scripting-reference/runtimes/lua/functions/AddEventHandler) -- [Citizen.Await](/docs/scripting-reference/runtimes/lua/functions/Citizen.Await) -- [Citizen.Wait](/docs/scripting-reference/runtimes/lua/functions/Citizen.Wait) -- [Citizen.CreateThread](/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThread) -- [Citizen.SetTimeout](/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout) -- [Citizen.Trace](/docs/scripting-reference/runtimes/lua/functions/Citizen.Trace) -- [quat](/docs/scripting-reference/runtimes/lua/functions/quat) -- [RegisterNetEvent](/docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent) -- [RegisterNUICallback](/docs/scripting-reference/runtimes/lua/functions/RegisterNUICallback) -- [RemoveEventHandler](/docs/scripting-reference/runtimes/lua/functions/RemoveEventHandler) -- [SendNUIMessage](/docs/scripting-reference/runtimes/lua/functions/SendNUIMessage) -- [TriggerEvent](/docs/scripting-reference/runtimes/lua/functions/TriggerEvent) -- [TriggerServerEvent](/docs/scripting-reference/runtimes/lua/functions/TriggerServerEvent) -- [vec](/docs/scripting-reference/runtimes/lua/functions/vec) -- [vector2](/docs/scripting-reference/runtimes/lua/functions/vector2) -- [vector3](/docs/scripting-reference/runtimes/lua/functions/vector3) -- [vector4](/docs/scripting-reference/runtimes/lua/functions/vector4) \ No newline at end of file diff --git a/content/docs/scripting-reference/runtimes/lua/server-functions.md b/content/docs/scripting-reference/runtimes/lua/server-functions.md deleted file mode 100644 index ae58e444b..000000000 --- a/content/docs/scripting-reference/runtimes/lua/server-functions.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Server-side functions in Lua -weight: 515 ---- - -## Runtime-specific functions -- [AddEventHandler](/docs/scripting-reference/runtimes/lua/functions/AddEventHandler) -- [Citizen.Await](/docs/scripting-reference/runtimes/lua/functions/Citizen.Await) -- [Citizen.CreateThread](/docs/scripting-reference/runtimes/lua/functions/Citizen.CreateThread) -- [Citizen.SetTimeout](/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout) -- [Citizen.Trace](/docs/scripting-reference/runtimes/lua/functions/Citizen.Trace) -- [Citizen.Wait](/docs/scripting-reference/runtimes/lua/functions/Citizen.Wait) -- [GetPlayerIdentifiers](/docs/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers) -- [GetPlayers](/docs/scripting-reference/runtimes/lua/functions/GetPlayers) -- [PerformHttpRequest](/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequest) -- [PerformHttpRequestAwait](/docs/scripting-reference/runtimes/lua/functions/PerformHttpRequestAwait) -- [RegisterNetEvent](/docs/scripting-reference/runtimes/lua/functions/RegisterNetEvent) -- [RemoveEventHandler](/docs/scripting-reference/runtimes/lua/functions/RemoveEventHandler) -- [TriggerClientEvent](/docs/scripting-reference/runtimes/lua/functions/TriggerClientEvent) -- [TriggerEvent](/docs/scripting-reference/runtimes/lua/functions/TriggerEvent) - -## Native functions -Refer to the [FiveM Native Reference](/natives) for game functions. \ No newline at end of file diff --git a/content/docs/server-manual/setting-up-a-server.md b/content/docs/server-manual/setting-up-a-server.md index 7c50e509e..0395ff9b6 100644 --- a/content/docs/server-manual/setting-up-a-server.md +++ b/content/docs/server-manual/setting-up-a-server.md @@ -26,7 +26,7 @@ What's next? [server-issues]: /docs/support/server-issues [server-commands]: /docs/server-manual/server-commands -[scripting-introduction]: /docs/scripting-manual/introduction +[scripting-introduction]: /docs/developers/scripting-manual/introduction [fxserver-support]: https://discord.gg/fivem [fxserver-support-category]: https://forum.cfx.re/c/server-development/server-discussion