Visual Studio Code
Download Visual Studio Code to start coding with ease.
JRS Core VS Code extension#
The extension gives you the JRS Core API in the editor: autocomplete, hover documentation, snippets for every export and event, the JRS Dark colour theme and a command that opens these docs.
- Download
jrs-core-vsc.vsix. - In VS Code open Extensions, click
...then Install from VSIX. - Open any
.luafile and typeJRS.,exports.jrs_core:orjrs-to see suggestions.
JRS Core VSC Extension
Autocomplete, hover docs, snippets and the JRS Dark theme.
Lua (sumneko)
IntelliSense for Lua and many other useful features.
Cfx Lua
IntelliSense for Cfx natives and functions.
Error Lens
Highlights errors and warnings inline.
Your first script#
fxmanifest.lua
fx_version 'cerulean'
game 'rdr3'
rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'
lua54 'yes'
server_script 'server.lua'server.lua
local JRS = exports.jrs_core:getCoreApi()
RegisterCommand('hello', function(source)
local character = JRS.GetCharacter(source)
if not character then return end
JRS.NotifyRightTip(source, 'Hello ' .. character.firstname, 4000)
JRS.AddMoney(source, 5)
end)