Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>RSG Core - Development KitNew to Visual Studio Code? Get it now.
RSG Core - Development Kit

RSG Core - Development Kit

RSG Framework

|
24 installs
| (1) | Free
Essential extension for RSG Framework: 80+ snippets, intelligent IntelliSense, comprehensive hover docs, and smart diagnostics. Save hours, prevent errors, learn RedM development.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RSG Core - RedM Framework Extension

Version License

The essential VSCode extension for RSG Framework development in RedM. Save hours of typing, prevent common errors, and learn RedM development with intelligent IntelliSense, comprehensive snippets, and accurate hover documentation.


✨ Features

🚀 80+ Smart Snippets

Production-ready code in 3 keystrokes. Type natural prefixes like init, npc, notify, additem, target and get complete code blocks instantly. Auto-fills resource names from your filename.

📚 Comprehensive Hover Documentation

Hover over any RSG function for instant documentation with full signatures, parameter types, descriptions, return values, and code examples. Covers all RSGCore.Functions, Player.Functions, inventory exports, ox_lib, PlayerData.metadata, and RedM natives.

🎯 Intelligent IntelliSense

Auto-complete suggestions for RSGCore.Functions, Player.Functions, exports['rsg-inventory'], RSGCore.Shared, and lib.callback. Get the right function instantly as you type.

⚠️ Smart Diagnostics

Catch errors before testing. Warns about Wait(0) in loops, missing local keywords, unvalidated GetPlayer() calls, bad server event practices, deprecated patterns, and common Lua mistakes.


🎬 Quick Start

Installation

  1. Download the .vsix file
  2. In VSCode: Extensions → ... → Install from VSIX
  3. Open any .lua file in an RSG resource
  4. Start typing!

Your First Snippet

Create a new file myshop.lua (client side):

  1. Type init + Tab

    local RSGCore = exports['rsg-core']:GetCoreObject()
    lib.locale()
    
  2. Type npc + Tab

    local model = 'a_m_m_skp_farmer_01'
    lib.requestModel(model, 5000)
    
    local npc = CreatePed(model, coords.x, coords.y, coords.z - 1, coords.w, false, false, false, false)
    SetRandomOutfitVariation(npc, true)
    SetEntityCanBeDamaged(npc, false)
    SetEntityInvincible(npc, true)
    SetBlockingOfNonTemporaryEvents(npc, true)
    FreezeEntityPosition(npc, true)
    
  3. Type target + Tab

    exports.ox_target:addLocalEntity(entity, {
        {
            name = 'option_name',
            label = 'Label',
            icon = 'fa-solid fa-hand',
            distance = 3.0,
            onSelect = function()
                -- Your code here
            end
        }
    })
    

That's it! You just created a fully configured NPC with interaction in seconds.


📖 Popular Snippets

Events & Callbacks

Prefix Description
init Initialize file with RSGCore + lib.locale()
serverevent Register server event (auto-fills resource name)
clientevent Register client event (auto-fills resource name)
libcallback Register ox_lib server callback
libawait Call ox_lib callback from client
callback Create RSGCore server callback
triggercb Trigger RSGCore callback

Inventory & Items

Prefix Description
additem Add item to player via Player.Functions
removeitem Remove item with if-check wrapper
itemcount Get total count of item
canadditem Check if player can receive item
createshop Create inventory shop
openshop Open shop for player

UI & Notifications

Prefix Description
notify Full ox_lib notification with all options
progress Progress bar with cancel handling
context Context menu with event/serverEvent
input Input dialog with validation
alert Alert/confirmation dialog

Player & Money

Prefix Description
getplayer Get player with nil check
addmoney Add money (cash/bank/gold)
removemoney Remove money with if-check
hasmoney Check money with notification

RedM Specifics

Prefix Description
npc Spawn NPC with full configuration
blip Create blip with sprite and scale
prompt Create RSG prompt interaction
promptnative Create native RedM prompt
target Add ox_target to entity
targetzone Create ox_target box zone

Common Patterns

Prefix Description
distance Distance check with conditional
loop While true loop with Wait
thread CreateThread wrapper
config Config file template
manifest FXManifest template

🎓 Learning Features

PlayerData Documentation

Hover over any PlayerData field for instant documentation:

  • PlayerData.metadata.hunger → "Hunger level (0-100, clamped)"
  • PlayerData.metadata.isdead → "Whether player is dead or alive"
  • PlayerData.job.name → "Job identifier (e.g., 'police')"
  • PlayerData.money.cash → "Cash money on player"

All 30+ metadata fields documented!

RedM Natives Explained

Stop searching documentation - hover for instant help:

  • SetRandomOutfitVariation → "Apply random outfit to ped. ESSENTIAL for NPCs."
  • BlipAddForCoords → "Create blip at coordinates. Returns blip handle."
  • UiPromptHasHoldModeCompleted → "Check if native prompt hold completed."

Framework Best Practices

Snippets include proper patterns:

  • ✅ Nil checks for GetPlayer()
  • ✅ If-wrappers for RemoveItem() / RemoveMoney()
  • ✅ Source validation in server events
  • ✅ Proper entity cleanup with DeleteEntity()
  • ✅ Wait times in loops (no Wait(0) by default)

⚙️ Configuration

Access settings via: File → Preferences → Settings → Search "RSG Core"

Setting Default Description
rsgCore.enableDiagnostics true Enable all diagnostics and linting
rsgCore.warnWaitZero true Warn about Wait(0) in loops
rsgCore.warnMissingLocal true Warn about missing local keyword
rsgCore.warnUnvalidatedSource true Warn about unvalidated source in events

🎯 Why This Extension?

Stop wasting time. Most RSG developers spend hours typing boilerplate, searching docs, and debugging preventable errors. This extension eliminates that friction.

Built by RSG developers, for RSG developers. Not a lazy FiveM port. Every snippet, every doc, every completion is tested against the actual RSG Framework. RedM natives work differently than FiveM - we know that, and we documented it correctly.

Write code faster than you can think. init + Tab = instant file setup. npc + Tab = fully configured NPC spawn with proper RedM natives. libcallback + Tab = complete callback that auto-fills your resource name. That's 50+ lines of code in under 10 seconds.

Stop making stupid mistakes. The extension yells at you before you waste 20 minutes debugging Wait(0) lag, nil errors from missing player checks, or unvalidated server events. It's like having a senior developer looking over your shoulder, except it doesn't judge you.

Learn RedM while you code. Hover over SetRandomOutfitVariation and instantly know why NPCs look like clones without it. Hover over PlayerData.metadata.hunger and see the exact value range. No alt-tabbing to docs. No guessing. Just code.


📚 Examples

Create a Shop Interaction

-- Type: init
local RSGCore = exports['rsg-core']:GetCoreObject()
lib.locale()

-- Type: npc
local model = 'a_m_m_skp_farmer_01'
lib.requestModel(model, 5000)
local npc = CreatePed(model, coords.x, coords.y, coords.z - 1, coords.w, false, false, false, false)
SetRandomOutfitVariation(npc, true)
-- ... full setup

-- Type: target
exports.ox_target:addLocalEntity(npc, {
    {
        name = 'open_shop',
        label = 'Open Shop',
        icon = 'fa-solid fa-shop',
        distance = 3.0,
        onSelect = function()
            -- Type: libawait
            local result = lib.callback.await('myshop:server:getStock', false)
        end
    }
})

Server-Side Shop Handler

-- Type: init
local RSGCore = exports['rsg-core']:GetCoreObject()
lib.locale()

-- Type: libcallback
lib.callback.register('myshop:server:getStock', function(source)
    local src = source
    local Player = RSGCore.Functions.GetPlayer(src)
    if not Player then return end

    return Config.ShopItems
end)

-- Type: serverevent
RegisterNetEvent('myshop:server:purchase', function(itemName, amount)
    local src = source
    local Player = RSGCore.Functions.GetPlayer(src)
    if not Player then return end

    -- Type: hasmoney
    if Player.PlayerData.money.cash < price then
        lib.notify({
            title = 'Insufficient Funds',
            description = 'You do not have enough money',
            type = 'error',
            duration = 5000
        })
        return
    end

    -- Type: canadditem
    if not exports['rsg-inventory']:CanAddItem(src, itemName, amount) then
        lib.notify({
            title = 'Inventory Full',
            description = 'You cannot carry any more items',
            type = 'error',
            duration = 5000
        })
        return
    end

    -- Complete the transaction
    Player.Functions.RemoveMoney('cash', price)
    exports['rsg-inventory']:AddItem(src, itemName, amount, nil, nil, 'shop-purchase')
end)

That entire shop system? Less than 2 minutes with snippets.


🔧 Requirements

  • Visual Studio Code 1.74.0 or higher
  • RSG Framework (RedM)
  • Basic Lua syntax highlighting (built-in to VSCode)

🤝 Contributing

Found an issue or have a suggestion?

  • Report bugs on GitHub Issues
  • Suggest features or improvements
  • Share your feedback

📝 License

MIT License - See LICENSE file for details


🙏 Acknowledgments

  • RSG Framework Team for the amazing framework
  • ox_lib for modern RedM development tools
  • RedM Community for testing and feedback

📊 Stats

  • 80+ Snippets covering every common RSG pattern
  • 200+ Hover Docs for functions, natives, and PlayerData
  • 60+ Completions for IntelliSense
  • 10+ Diagnostics catching common errors
  • 100% Accurate - Matches actual framework implementation

🚀 Get Started Now!

  1. Install the extension
  2. Open any .lua file
  3. Type init and press Tab
  4. Start building amazing RedM resources!

Happy coding! 🎉


Made with ❤️ for the RSG Framework community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft