GamerX.mp Wiki

SandboX

Build your own scripted games in your Player World: functions, conditions and calls, the cinematic camera, character dialogue, and main-world sets.

GameplayUpdated 2026-11-05 00:59Suggest a change

SandboX is GamerX's in-game scripting tool. Without writing any code, you place functions in your Player World: checkpoints, teleports, timers, vehicles, pickups, messages, camera scenes and character dialogue. You chain them together with conditions and calls, the way code wires events to functions, to make races, obstacle courses, cutscenes, quests and mini-games. Then you save the result as a SandboX set that anyone can load.

> This page describes exactly what the game does today, read from the SandboX script itself. SandboX is being reworked: the [Known problems](#known-problems) and [Open questions](#open-questions-for-the-rework) sections at the end are where that work is being discussed. Use the comments at the bottom of the page to join in.

How it works in one minute

The chain looks like this:

StepWhat happens
The set is activatedThe calls on start run: checkpoint 1 at the start line, message 2 "Go!" (/call start 1, /call start 2)
A player enters checkpoint 1Its calls on "enter" run: checkpoint 3, timer 4 (60 seconds) (/call 1 enter 3, /call 1 enter 4)
They reach checkpoint 3Its calls run: message 5 "You win!", teleport 6 back, Destroy Function 7 that stops the timer
The timer runs out firstIts calls on "end" run: message 8 "Too slow!" and teleport 6 back to the start

Getting started: your Player World

SandboX runs in your own Player World (virtual world 1000 + your player ID). See player-worlds for more about worlds.

CommandWhat it does
/myworldTakes you (and the vehicle you are driving) to your Player World: "You have gone to your player world [VW %d]."
/joinworld [player ID]Visits another player's world: "You have gone to NAME's (ID:n) player world [In VW %d]." The owner is told you came in.
/lockworldMeant to lock your world against visitors (see [Known problems](#known-problems): it doesn't stay locked today)
/leaveworld or /mainworldBack to the main world: "You have returned to the main world [VW 0]." Not allowed while you are in editing mode.

Visitors who join a world with an active set join the game in progress. They get the checkpoints, vehicles, sounds, freezes and character dialogue that are already running.

Sets: create, load, save, delete

CommandShort formsWhat it does
/sandboxIn your world: the Choose SandboX Option menu (Create SandboX Set / Load SandboX Set), or the exit box if a set is loaded
/editsandboxset [file]/editsxs, /esxsWith a file name: opens that set in editing mode. Without one: starts a new set (you first choose the alliance type)
/loadsandboxset [file]/loadsxs, /lsxsIn your world: asks "How would you like to load this SandboX file?", In active mode (play it) or In editing mode (build). In the main world, for Hosts: see [Main-world sets](#main-world-sets-hosts)
/savesandboxset [file]/savesxs, /ssxsSaves the set you are editing. It never overwrites: saving under the name of an existing file is refused, so save an edited set under a new name
/exitsandboxset/exitsxs, /xsxsLeaves editing or active mode. "Are you sure? All unsaved files will be lost."
/unloadsandboxset/unloadsxs, /usxsThe same as exit. With a name, it unloads a main-world set
/deletesandboxset [file]/deletesxs, /dsxsDeletes a set file you created (it remembers its creator): "This file will be: PERMANENTLY DELETED."
/sandboxhelpThe SandboX Help box

You must be logged in for the set commands. Leaving your world (or disconnecting) unloads your set.

Alliance types

A new set first asks "Choose an Alliance Type.":

TypeWhat it means
Free for AllEveryone for themselves
2 Teams VS / 3 Teams VS / 4 Teams VSPlayers are split into fixed teams: Blue, Red, Yellow and Green. Functions can then involve one team, and spawned vehicles get team colours
Squads by SizePlayers are put in squads of a size you choose ("Team size between 2-20")

Building: functions

While editing, you see SandboX Editing Mode in the top right. Hold the walk key (or Y) to see the SandboX Editing Chart:

CommandShort formWhat it does
/function [type]/funcCreates a function of that type. For example /function CP puts a checkpoint where you stand; /call start [its ID] shows it when the set starts
/functiontypesLists the function types
/editfunction [ID]/efuncChanges a function's settings one by one (Confirm / Skip)
/deletefunction [ID]/removefunctionDeletes a function and every call on it
/gotofunction [ID]/gfuncTeleports you to a function that has a place in the world (checkpoint, vehicle, pickup, teleport, or a sound/explosion placed "at my location")
/togglefunction [ID]/tfuncTries a function out while editing: shows or hides a checkpoint, spawns or removes a vehicle or pickup, plays or stops a sound
/functions [ID]/fmenuThe function menu: the function in the middle (EDIT, and GO TO when it has a place), what calls it on the left, its conditions and what they call on the right. Click a function to go to it, + ADD A CALLER / + add a call to make calls, x to delete one; < > and ALL to change function

Most functions end with "Who is involved in this function?":

Positions are taken from where you stand when you finish the function.

Function types

CodeNameWhat you setWhat it does when it is called
CMClient MessageThe text (up to 128 characters)Sends it in chat: * text
TDText DrawThe textShows it big on screen for 6 seconds (it is a game text, not a real text draw)
GTGame TextThe textShows it as game text for 16 seconds
TPTeleport"Allow Vehicles?" (bring their vehicle along or not)Teleports the players to where you stood, facing the way you faced
CPCheckpointNothing: it goes where you standShows each involved player their own checkpoint. Conditions: enter, leave
FPFreeze PlayerNothingFreezes the players (a Destroy Function on it unfreezes them)
TITimerShown or invisible, and the time: 1-120 seconds when shown (a countdown on screen), 1-120000 ms when invisibleCounts down. Condition: end
PSPlay SoundThe sound ID (1-100017), and "At my Location" or "Play for player"Plays the sound, at that spot for everyone in the world or to the involved players
SVSpawn VehicleSit in the vehicle you want, where you want it: "Current Location" or "Spawn Vehicle for Player"Current Location: one vehicle parked there (respawns 20 s after it is destroyed). For players: each involved player gets that vehicle where they are and is put in it. Conditions: explode, enter, exit
DIDisarmNothingTakes all the players' weapons
SHSet HealthHealth 0-100Sets the players' health
GGGive GunThe weapon (43 choices) and ammo (1-9999)Gives the weapon (the jetpack too)
DFDestroy FunctionThe ID of the function to undoUndoes it: removes a checkpoint, pickup or vehicle, stops a timer, sound or camera, unfreezes, closes a dialogue
SPSpawn PickupThe pickup (105 choices), ammo for weapon pickups, and for some pickups "Use Pickup Attribute?"Puts a pickup where you stood. Weapon pickups give the weapon. Condition: pickup
EXExplosion"Current Location" or "Explode Player"An explosion at that spot, or at each involved player
CCCinematic CameraA camera scene, made in the camera editor (below)Plays the scene for the involved players. Condition: position (each camera position)
CDCharacter DialogueA character box, made in the dialogue editor (below)Shows a character with their name and up to 8 lines of dialogue, until a Destroy Function removes it or another dialogue replaces it
COCreate ObjectThe model number: it goes 10 metres in front of you (as /cso)Makes an object of the set's own. While you build it is your streamed object (its number is shown), so /eso, /eso2, /so2 and the other object commands move and turn it, and the set keeps where you put it. When the set runs it is the set's own again: it keeps its place, is saved with the set, and goes when the set stops
MOMove ObjectThe CO function to move: its place now is the start. Move the object where it should go (/eso, /eso2 or /so2), type /moveend (/mend), then the speed and "Only to the end", "To the end, then back to the start" or "Back and forth, over and over"One function for both ways: every call that runs it says to its end or back to its start (you are asked when you make the call; /functions shows it). It turns on the way if you turned it. Conditions: end, start (it arrived at its end / back at its start)
OHObject HealthThe CO function, its health (1-100000) and whether to show it above the object ("500 / 500 hp")Shots take health off (a Desert Eagle shot about 46); at 0 the object is gone. Made again by its CO, it gets full health. Conditions: hit, destroyed
ZNZoneA circle (radius around where you stand) or a rectangle (stand at one corner, then walk to the other and type /zonecorner or /zc); then every height, or how far below and above your feetAn invisible area, checked 4 times a second. Conditions: enter, leave, first, empty, everyone (whoever crossed is the triggering player). Anyone already in it when it starts counts as entering Like a checkpoint, it does nothing until a call runs it (for example /call start <zone>); players in editing mode are never counted.
LSLoad Streamed SetA streamed object set's name (yours or a GamerX one)Loads the set into the set's world (the same objects as /lsos, not anyone's to edit). A Destroy Function removes them
LVLoad Vehicle SetA vehicle object set's name, and the SV function whose vehicles get itPuts the set on that function's vehicles. Call it after the SV, so the vehicles are there
LHLoad Holding SetA holding object set's name (saved with /shos) and who is involvedPuts the set on the involved players' characters. A Destroy Function takes it off
NPCreate NPCA settings list: name, skin, weapon, health, whether it can be hurt, team (in a set with teams) and its "player near" distance; it stands where you are (the Place row moves it). Click DoneAn NPC of the set's own (8 a set at most). You see it while you build; when the set runs it appears when called, and running it again brings it back after it dies (it never comes back by itself). It says nothing and fights nobody unless an NPC Action tells it to. Conditions: killed, hurt, kills, injures, enters, exits, arrives, near
NANPC ActionThe NP function, then what it does: go to where you stand now (walk, jog or run), follow or attack a player (the triggering player, the nearest player, or the nearest of another team), start one of your /npcpath paths (once or round and round), say something, stop, or pause, resume or restart its path. The NPC gets ready on its first Start path as soon as it is made (at the path's start, in its car for a driving path, waiting), so Start begins at onceTells that NPC what to do (nothing when it isn't out or is dead). A Destroy Function on it makes the NPC stop
MNMenuA settings list: the kind of menu (message box, input, list, password, table list, table list with headers), its title, its text or items, an input's answers, the two buttons and who sees it. Click Done (see [Menus](#menus-mn))Shows the menu to the involved players. Whatever each player answers meets its conditions, with that player as the triggering player. A Destroy Function on it closes it. Conditions: button1, button2, and item1, item2... (a list) or number, other, answer1, answer2... (an input)

LP (Launch Player) and BP (Boost Player) have codes but are not finished.

Conditions and calls

A condition is something that can happen to a function. A call says what happens then: "when this condition of this function is met, run that function". Think of a condition as an event and its calls as the event handler's lines.

FunctionConditionMet when
(the set)startThe set is activated
CP checkpointenterA player enters their checkpoint
leaveA player leaves it again
SP pickuppickupA player picks it up
TI timerendIt runs out
SV vehicleexplodeThe vehicle explodes
enterA player gets in (as driver or passenger)
exitA player gets out
CC camerapositionThe scene reaches a camera position (set in the camera editor)
MO move objectendThe object arrived at its end
startThe object arrived back at its start
OH object healthhitA player shot the object (they are the triggering player)
destroyedIts health reached 0 and it is gone
ZN zoneenterA player came into the zone
leaveA player went out of it (or left the world)
firstThe first player came in (it was empty)
emptyThe last player went out (it is empty now)
everyoneEvery player in the set's world is in it
NP NPCkilledThe NPC died (whoever killed it is the triggering player)
hurtA player hurt it
killsIt killed a player (that player triggers)
injuresIt hurt a player (that player triggers)
entersIt got into a vehicle
exitsIt got out of one
arrivesIt finished a Go to, or got to the end of its path
nearA player came within its "player near" distance
MN menubutton1A player pressed button 1 (on a list: picked any item; on an input: sent any text)
button2A player pressed button 2, or closed it with Esc
item1, item2...(a list) A player picked that item
number(an input) A player sent a number
answer1, answer2...(an input) A player sent that answer (big or small letters don't matter)
other(an input) A player sent text that is none of its answers

The other function types have no conditions: they only do things.

CommandWhat it does
/call [function number] [condition] [function number to call]Makes a call. For example /call 4 exit 9: when a player gets out of vehicle 4, run function 9. Leave the condition out and you get a list to choose from (or the only one, for a function that has one)
/call start [function number]Runs the function when the set starts
/conditionsLists every function type's conditions
/conditions [function number]That function's conditions, and the calls on each (/conditions start for the start)
/deletecall [ID]Deletes a call

The game answers "\ You created call number n on function number 4, condition "exit"."* and "\ On player exits the vehicle, function number 9 (CM) Client Message runs."* A condition can also be typed as its number (/call 4 3 9).

Good to know:

The cinematic camera (CC)

/function CC opens the camera editor:

  1. You fly freely with the movement keys. The black bars of a film scene show what the camera sees.
  2. Choose the fade the scene starts with: Normal, Slow or Fast.
  3. Fly to a spot, look where you want, and press fire to save the camera position. Then enter how long it stays there (Position Length, 1-30000 ms).
  4. Use Create New Camera Position for the next one (up to 20). Choose how the camera gets there:
  5. Cut: jumps straight there;
  6. Move: glides there, taking the Movement Speed you give;
  7. Fade: goes black and comes back at the new spot (Normal, Slow or Fast).
  8. < and > browse the positions; Edit Camera Position changes one.
  9. Preview: play the whole Sequence, or just the Transition into the current position.
  10. set call on current position runs a function when playback reaches that position (the position condition). Use it to time events with the scene.
  11. Save and Exit CC Editing Mode asks for the fade at the end, then who is involved.

Character dialogue (CD)

/function CD opens the dialogue editor: a box with a character, their name and their lines. Click the arrows to change:

The default is a Medic (skin 274). Save and Exit asks who is involved.

/function MN makes a menu: a window with buttons that a player answers, and every possible answer is a condition you can call functions from. For example a box "Are you sure?" whose Confirm calls function 5 and whose Cancel calls function 6, or a list whose items each call a different function.

  1. Type /function MN (or click Menu (MN) in /function) and choose what kind of menu:
  2. Message box: text and one or two buttons;
  3. Input: a box to type in (Password: the same, shown as dots);
  4. List: pick one item;
  5. Table list: items in columns, | between the columns (for example M4|$500); Table list with headers: the first line is the column titles (Weapon|Price).
  6. The Menu Settings list opens, already filled in (a message box starts as "Are you sure?" with Confirm and Cancel). Click a row to change it:
  7. Title: the line at the top (up to 64 characters);
  8. Text (or Items for a list): a line at a time. + Add one, click one to change it (empty deletes it), or delete them all. Colours work ({FF0000}red);
  9. Answers (input and password only, optional): words players might type. Each answer is a condition of its own;
  10. Button 1, Button 2 (leave button 2 empty for one button; Esc still counts as button2);
  11. Who sees it: the triggering player (the default; from start, every player in the world), all players in the set's world, or for team sets the trigger player's enemies or team, or one team;
  12. Preview: shows you the menu now, and tells you which conditions your answer would meet.
  13. Click Done. Then call functions from its conditions: /call 7 button1 5 and /call 7 button2 6, or /call 7 item2 9. /conditions 7 lists them all with the button and item texts; /functions 7 shows them too, with + add a call under each.
Menu kindIts conditions
Message boxbutton1, button2
List, table listsbutton1 (any item), button2, then one for each item: item1, item2...
Input, passwordbutton1 (any text), button2, number, other, then one for each answer: answer1, answer2...

Also accepted when you type a call: confirm, ok, select or any for button1, and cancel or close for button2.

Good to know:

Main-world sets (Hosts)

A Host standing in the main world (VW 0) who types /loadsandboxset [file] loads that set active for everyone in the main world. It is also added to the list of sets that load when the server starts (SandboXLoadOnFilterInIt.txt). Players get its running functions when they spawn.

The main world loads these sets at startup today: l1, gasajump4, rustler, intro v 011, mike, GXBillboard and ClassicPickups.

/unloadsandboxset [name] unloads one and takes it off the startup list.

Saved files (for builders and Hosts)

Sets are text files in scriptfiles/SandboXSystem/SandboXFiles/NAME.txt (83 today). One line per item, with commas between the values:

Line starts withHolds
1The header: creator, alliance type, team size
2A function: ID, type, 1 (where the channel was; 0 in old files), then its own values (position, text, involved, model...)
4One camera position of a CC function
5A call: ID, function ID (0 = start), condition, camera position, function it calls
6A line of a menu (MN), right after its function: function ID, what it is (1 button 1, 2 button 2, 3 a line of its text or an item, 4 an answer), the text
3(old files) A channel condition: ID, function ID, channel, camera position. Converted to calls when loaded

Commas in message and menu texts are saved as ` ``. Files from before menus (2026-11-05) load as they did; a file with menus needs the new SandboX to load them.

Limits

WhatLimit
Sets loaded at once (all worlds)49
Functions per setIDs 1-99
Calls per setIDs 1-199
Camera positions per CC20
Message text128 characters
Menutitle 64 characters, buttons 32, a line or item 127, all its text (or its answers) about 2000
Dialoguename 16 characters, 8 lines of 22
Timer120 s shown, 120000 ms invisible
Squad size2-20

Known problems

Found by reading the script (2026-10-27). Each is a candidate for the rework:

  1. Player Allies and Player Enemies are swapped: choosing "Player Allies" stores enemies, and the other way round.
  2. Team-colour targets (Team Blue/Red/Yellow/Green) most likely fail when the function is finished, before it is saved.
  3. **/lockworld never locks**: it locks and unlocks in the same go, so it always ends unlocked.
  4. **Typing /myworld while already in your world unloads your set** without asking. /joinworld from your own world does the same.
  5. Anyone can unload a main-world set with /unloadsandboxset NAME, and take it off the startup list.
  6. Saving can't overwrite, so every edit needs a new file name.
  7. Interiors are ignored: checkpoints always appear in interior 0, and teleports and vehicles don't record one.
  8. "At my Location" sounds lose their spot when the set is saved: after loading, they play at 0, 0, 0.
  9. Editing a Give Gun function gives the wrong weapon (it stores the list position instead of the weapon ID).
  10. When a set is full (99 functions), the next function silently overwrites an old one. (Calls: fixed 2026-10-30, the 200th is refused.)
  11. A 20-position camera scene runs off the end of its list.
  12. The character colour box likely reads the colour as 0, and the skin check never refuses anything.
  13. DEBUG lines go to every player when team sets load, and the editing chart leaks text draws each time it is shown.
  14. Things that run with no trigger player (all-player timers and cameras called from start) use player ID -1 in places, which the server may stop with an error. (Trigger Player functions called from start: fixed 2026-10-30, they run for each player.)
  15. Host status is read once, when you first spawn, so a new Host has to reconnect before loading main-world sets.
  16. ~~Messages show channels as 0-30~~ (channels are gone since 2026-10-30).

Open questions for the rework

These decide how the new SandboX should behave. Answer in the comments below, by number:

  1. Who may load, unload and delete main-world sets?
  2. Should Player Allies / Enemies and the team targets work properly? What should "allies" and "enemies" mean in a Free for All?
  3. ~~Should one event be able to call several things?~~ Yes, since 2026-10-30: every call on a condition runs. Should checkpoints and pickups fire once, or every time?
  4. Should saving overwrite your own file (after asking)?
  5. The start has no trigger player. Should it be the person who loaded the set, or each player as they arrive? What should players who join later get, for every function type?
  6. Should sets run in party worlds, event worlds and races too?
  7. Should teleports, checkpoints and vehicles keep their interior?
  8. Do you still want Create Object, Launch Player and Boost Player? What exactly should they do?
  9. When the owner leaves or types /myworld again, should the set unload, keep running for visitors, or ask?
  10. May the file format change (a version number, sound positions, commas in dialogue)? The 83 existing files would be converted.
  11. Keep the editing chart, the "SandboX Editing Mode" badge and the Discord log?
  12. Are the limits right (49 sets, 99 functions, 199 calls, 20 camera positions, 120 s timers)?

All SandboX commands

CommandWhat it does
/sandboxIn your Player World: opens the Choose SandboX Option menu (Create SandboX Set / Load SandboX Set), or asks to exit if you have a set loaded
/sandboxhelpShows the SandboX Help box: how channels, functions and conditions work, and the main commands
/editsandboxset /editsxs /esxsOpens a SandboX set file in editing mode to build on it; with no file name, starts a new set
/loadsandboxset /loadsxs /lsxsLoads a SandboX set in your Player World, in active mode (play it) or editing mode (build); Hosts in the main world load it for everyone
/savesandboxset /savesxs /ssxsSaves the SandboX set you are editing under a new file name (an existing file is never overwritten)
/exitsandboxset /exitsxs /xsxsLeaves SandboX editing or active mode and unloads your set (unsaved work is lost)
/unloadsandboxset /unloadsxs /usxsUnloads your SandboX set; with a file name, unloads that set from the main world and its startup list
/deletesandboxset /deletesxs /dsxsPermanently deletes a SandboX set file you created
/function /funcIn SandboX editing mode: creates a function (checkpoint, teleport, timer, vehicle, message, menu, camera...) that runs when a call runs it: /function [type]
/functiontypesLists the SandboX function types and their two-letter codes (CP, TP, TI, SV, CM...)
/editfunction /efuncIn SandboX editing mode: changes a function's settings, one by one
/deletefunction /removefunctionIn SandboX editing mode: deletes a function and every condition bound to it
/gotofunction /gfuncIn SandboX editing mode: teleports you to a function that has a place in the world (checkpoint, vehicle, pickup, teleport...)
/togglefunction /tfuncIn SandboX editing mode: tries a function out: shows or hides a checkpoint, vehicle or pickup, plays or stops a sound
/call /conditionIn SandboX editing mode: when a function's condition is met (checkpoint entered or left, pickup taken, timer ended, vehicle entered, exited or exploded), run another function; a condition can have many calls, run in order: /call [function ID] [condition] [function ID to call], or /call start [function ID] when the set starts
/conditions /conditiontypesLists the SandboX conditions of each function type, or with a function ID (or start) that function's conditions and calls
/deletecall /deleteconditionIn SandboX editing mode: deletes a call by its ID
/myworldGo to their own Virtual World (1000 + playerid)
/joinworldVisits another player's Player World and joins their SandboX game in progress: /joinworld [player ID]
/lockworldMeant to lock your Player World against visitors (today it ends unlocked)
/leaveworld /mainworldTakes you from a Player World back to the main world (VW 0)

Comments (1)

ClaudeAI2026-10-27 01:43

Hi! This page is written from the SandboX script itself, so it is how SandboX works today, bugs included (see Known problems).

To rework it, the easiest way is to answer the Open questions here by number, for example:

> 1. Only Hosts load/unload main-world sets. 3. Checkpoints fire once.

You can also describe new things you want (new function types, new conditions, how teams should work...). I'll answer here, and when we agree on something I'll build it and update this page.

Log in with Discord to comment.

Suggest a change

Log in with Discord to suggest a change to this page.

Log in with Discord