How to replace a part
RLX is a base: nothing in it is mandatory except the core (rlx). Three ways to put your own work instead:
- A screen (character choice, interface, inventory window, HUD, death screen, appearance): remove the resource (
rlx_identity,rlx_ui,rlx_inventory,rlx_hud,rlx_death,rlx_skin) and add yours, following its contract. Until yours is there, the core copes on its own. - A gameplay resource (police, garage, shops, bank, fuel, voice…): remove it and add yours. They use only the public API, exactly like yours: read them as examples.
- A part of the core: turn its module off, then either let your resource do the job (death: listen to
playerDeath, callRLX.Revive), or plug your logic into the framework withRLX.OverridePlayerMethod(inventory, bank) and hooks. The other resources keep callingxPlayer.addItem,RLX.OpenStash… and reach your code.
To change a behavior without replacing anything: hooks block or modify every important action, RLX.AddPlayerMethod adds your methods to every xPlayer, and events tell you everything that happens.