Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
server_callbacks.h
Go to the documentation of this file.
1
2 // =================================================== //
3 // THIS IS NOT A C++ HEADER! Only a dummy for Doxygen. //
4 // =================================================== //
5
6namespace Server2Script {
7
19void main();
20
24void frameStep(float dt_millis);
25
29void playerAdded(int uid);
30
34void playerDeleted(int uid, int crashed);
35
39int streamAdded(int uid, StreamRegister@ reg);
40
44int playerChat(int uid, const string &in msg);
45
49void gameCmd(int uid, const string &in cmd);
50
55void curlStatus(Script2Server::CurlStatusType type, int n1, int n2, string displayname, string message);
56
//addtogroup Server2Script //addtogroup ScriptSideAPIs
59
60} // namespace Server2Script
int playerChat(int uid, const string &in msg)
ONLY ONE AT A TIME ~ executed when player sends a chat message; Returns `broadcastType` which determi...
void frameStep(float dt_millis)
executed periodically, the parameter is delta time (time since last execution) in milliseconds.
void playerDeleted(int uid, int crashed)
executed when player leaves.
void gameCmd(int uid, const string &in cmd)
ONLY ONE AT A TIME ~ invoked when a script running on client calls `game.sendGameCmd()`.
void main()
Required; Script setup function - invoked once when script is loaded.
void playerAdded(int uid)
executed when player joins.
void curlStatus(Script2Server::CurlStatusType type, int n1, int n2, string displayname, string message)
Reports status of background CURL request - use `server.curlRequestAsync()` to invoke one.
int streamAdded(int uid, StreamRegister@ reg)
executed when player spawns an actor; Returns `broadcastType` which determines how the message is tre...
CurlStatusType
Used with `curlStatus()` callback.
Definition globals.h:57
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.