How do you add scripts to a RedM server?
Par Benjamin D. · PDG
· Lecture 5 min
Contents
Adding a script to a RedM server is bringing your world to life: opening a new activity, a bounty hunter job, a gang system. But every resource (the exact word on the CitizenFX side) always follows the same circuit. Once you understand that circuit, you add any script without stress. Let's follow one, from download to the first in-game test.
First: VORP compatibility
On RedM, nearly all scripts depend on the VORP framework. Before downloading anything (the cfx.re forum, VORP stores, well-known GitHub repos), check that it fits your VORP version and your RDR2 gamebuild. A script meant for another version won't load, or will throw silent errors.
The folder in /resources
Drop the resource's folder into resources/, via the WebFTP or the panel's explorer. Respect to the letter the folder name expected by the script: it's the #1 cause of a "resource couldn't be started".
The database, when it exists
Many RedM scripts store data (bank accounts, inventories, properties). If a SQL file is provided, import it into your MySQL database before launching the resource. Forgetting this import gives you a script that starts but crashes at the first interaction.
The declaration with ensure
Add ensure resource-name in server.cfg, after its dependencies (VORP core, oxmysql). The order is crucial: to organize the whole file properly, lean on our server.cfg guide.
The final tuning and the test
- Open the
config.luato adapt prices, positions and permissions to your server. - Reload with
ensureorrestartfrom the txAdmin console. - Test in game, eyes on the console to catch the slightest error.
Add only one script at a time, then test. If the server refuses to start, the culprit is almost always the last ensure: remove it, restart, and you've isolated the problem in a single move.
The circuit without a command line
The FlyPanel panel and txAdmin on our RedM servers bring file upload, server.cfg editing and restart together in one place, enough to chain additions without FTP. No server yet to test all this? Create your own at Fly-Serv from 1,99 €/month, and start by choosing the right RedM host.