Volleyball Script Courts & the Builder

8 min read

View Volleyball Script in the WXMAPS store

Courts & the Builder

Courts are not hard-coded and there is no coordinates file to edit. You build them in game, and they live in the database.

Everything on this page needs the vsvb.admin permission. See Admin & commands. Nothing here is behind a server-wide switch, so there is nothing to remember to turn off before you open the server.

A new court

/volleyballcreator+ New court → pick a floor: 1v1 / 2v2 / 3v3, each in sand or concrete.

The editor opens on that floor with the net and poles previewed on it, and it measures the mesh to set the play area, so the drawn lines land on the painted ones without you typing a number. That is a starting point, not a cage: you still put the court exactly where you want it, and what you save is what plays.

Key
GSwitch between walk mode and the gizmo
Left mouseDrag the gizmo
F / RGizmo move / rotate
YWorld or local space
ShiftSnap rotation to 15°
HDrop it to the ground
BNet and poles off, for a spot that already has them
ENTERName and save
ESCLeave without saving

On-screen the panel only ever lists the keys that do something in the state you are in, so walk mode and the gizmo show different sets. A court built on one of the floor models takes its play area from the mesh, so the size keys are not offered there; a court you marked out yourself is sized with the arrow keys and its net height with the mouse wheel.

A court is three props (floor, net and poles) and all three go down together the moment you save. Editing a court re-places them for everyone; deleting it takes them away. There is no second placement step and nothing to line up by hand.

In a hurry? /vb_court_here <id> drops a default court where you stand.

Measuring a floor mesh

The painted court is not the whole slab. The floor meshes carry an apron past the lines, so seeding the play area from the model's bounding box would draw a court around the outside of the paint. /vb_mark measures where the paint actually is, once per model, and the answer becomes a row in Config.Courts.floors that every court on that model then gets right.

It opens a noclip session: the same freecam the builder flies, with a crosshair, a live dot on the surface under it, and the court it has worked out so far drawn on the floor as you go.

In the session
WASD · Space/Ctrl · ShiftFly; the mouse looks
EMark a point on the painted boundary: four corners is enough
QMark a point on the net line (usually unnecessary)
X · G · BackspaceUndo · gizmo · leave the gizmo, then finish and print

/vb_mark spawn <model> [lift] stands a whole court up (floor, net and poles) a metre off the ground to measure it, or skip that and fly to a court you already placed. print, undo, clear and despawn do what they say.

Numbers come out in the mesh's own local space, so one measurement holds for every court on that model at any position and heading.

Do you have to mark the net? Almost never. A volleyball court is symmetric about its net, so the net line is the midline of the painted rectangle and four corner marks give it for free. The session draws that derived line in yellow: if it lies on the painted one, the script has understood your court. Mark it with Q only when the paint is not centred in its slab, which the report flags for you.

A court the map already has

For the volleyball courts GTA already paints into the world: Courts → Custom court…. Nothing is placed and nothing is sized; you tell the script where the existing lines are.

  1. E on each of the four corners. Their two side lengths are the play area, and which way it plays comes from them too.
  2. Q twice for the net height: once at the foot of the net, once at its top. Only the difference is read, so their horizontal position does not matter.
  3. X undoes the last mark. ENTER opens the name dialog: id, label, players per side and the measured net height to confirm, and saves. Press it with the marks wrong and it says exactly what is wrong.

The rectangle and the net are drawn live on the ground as you mark, at the height you measured, so what you see is what gets saved. It arrives with no props at all, no floor, no net, no poles, because the world is already supplying every one of them. Everything else works normally: the lines, the physics, the referee desk, the blip.

Decorate it: the build overlay

Pick the court in the sidebar, open its Builder tab and press Build in the world. The window goes away and you are standing on the court with the overlay up: the court's name and the object-limit plate top right, and the catalogue along the bottom with every key that is live right now on the line above it.

The catalogue holds 80 props (benches, bleachers, parasols, palms, speakers, floodlights, spectators and more), each shown as a photograph of the actual model, so you pick by sight rather than by model name.

Key
TABPut the cursor on the catalogue, or take it off
typingSearches by label or model name: bench finds Park Bench, fnclink finds the chain-link fence
Left mouse on a tileTakes that prop into your hand and hands the world straight back
EPlaces it, and keeps it in your hand: ten cones is one pick and ten presses
Ctrl+ZUndoes the last thing that changed the world
ESCSteps back one level, wherever you are, never opens anything new

Selecting a placed prop closes the catalogue, because everything on screen is then about that one object. E saves the move, ESC puts it back where it was, TAB brings the catalogue back once you have let go.

The cursor is a trade. Clicking a tile needs a mouse pointer, a pointer needs NUI focus, and NUI focus takes the keyboard and the left mouse button, which are the gizmo's. So the strip is scenery until TAB, and TAB again gives the world back.

Object limits are Config.Builder.objectLimit: 150 by default, and per court rather than per server, because what costs a player frames is the pile of props around the court they are standing on. Spectators count against it; the referee desk does not. Past 80% the plate goes amber; at the limit it goes red and the next placement is refused, by the client on screen and by the server regardless of what the client thinks. Lowering the number never deletes anything already placed.

Clear the spot first: removing world objects

There is usually something already standing where a court has to go. Pick the court, open its Props tab, turn on Delete mode and press Start deleting…

  • In removal mode the map object under the crosshair is outlined in red; E takes it away, permanently and for everyone. Backspace leaves the mode.
  • The Props tab then lists everything the court has placed and every piece of map it has taken away, nearest first. A prop gets a Delete; a piece of map gets a Put it back, so you undo the one you mean rather than the nearest one to where you are standing.
  • /vb_unhide and /vb_unhide <id> do the same from chat; /vb_hidden lists every removal with its id.

"Permanent" does not mean edited. A removal is written to the database and applied by every client on join, so it is the same world for everybody, but it never touches a .ymap. Stop the resource and the map comes back whole.

A removal is a description, not an entity: objects of this model, within a radius of this point. GTA gives a map object no id a script can keep, so that is the only form that survives a restart, and the cost is that two identical props standing closer than the radius go together. Both static and physics props are handled. Peds, vehicles and props belonging to another script are refused at the crosshair, with the reason, rather than recorded as a removal that could never work.

The referee desk

Place one from the court's Referee tab. It is bound to that court, and a court without one refuses every join while Config.RequireReferee is on, so it is not optional decoration. Deleting a court takes its desk with it.

Where it all lives

Courts, the props and peds on them, and the map objects removed for them are all rows in the database, created on first boot. A court authored before the floor models existed simply has none and plays on whatever the world already has there.