For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exports (API Communication)

All Functions only accessible at server side

Good to know: You can use all functions as event or manupulation of the logic

Functions

Send a notify

exports["RocketSoccer"]:Notify(source, message)
Name
Type

source

int

message

string

Start a round

exports["RocketSoccer"]:StartRound(sourceOrange, sourceBlue)
Name
Type

sourceOrange

int

sourceBlue

int

If the return of the function is false, the round will not start, but if it is true, it will.

Stop a round

exports["RocketSoccer"]:StopRound()

If the return of the function is false, the round will not stop, but if it is true, it will.

Get a player name

exports["RocketSoccer"]:GetPlayerName(source)
Name
Type

source

int

Change the return of the function to a different name (this will be displayed in the DUI)

The respective player name (Changeable by "Manipulation")

Check if player is allowed to join the queue

exports["RocketSoccer"]:IsPlayerAllowed(source)
Name
Type

source

int

If true is returned, the player can be added to the respective queue.

Note that you have to add the player to the queue yourself:

queue[team][source] = true

true or false

Add a player to the queue

exports["RocketSoccer"]:AddPlayerToQueue(source, team, force, player)
Name
Type

source

int

team

string (blue or orange)

force

boolean

player

int (discord user id)

The return is only relevant for further processing of the function.

The actual logic is:

queue[team][source] = true / false

true or false

Check if player is in the queue of a team

Name
Type

source

int

Change the return of the function to change the logic:

true / false

true or false

Remove a player from the queue

Name
Type

source

int

player

int (discord user id)

The following line is the deciding logic which a player removes.

Modify these lines to detect manipulation

Get the current round

If no round is started, the return value is nil

Otherwise the round model is returned

Spawn a vehicle

Name
Type

model

int / string

vector

table (vector3)

Change the following line to return a different variable on return.

This can help if there are problems with an anticheat.

Note that the correct data type must be returned (see Return Tab).

An entity of the type Vehicle is returned

Spawn a object

Name
Type

model

int / string

vector

table (vector3)

Change the following line to return a different variable on return.

This can help if there are problems with an anticheat.

Note that the correct data type must be returned (see Return Tab).

An entity of the type Object is returned

Events

OnExploit

Called when trying to tune up your vehicle using the internal trigger and it is not a Rocket Soccer vehicle.

Name
Type

playerPedId

int (Ped)

netID

OnWinning

Called when the round ends.

Reasons:

  • Time expired

  • A team leaves the server

team

string (blue or orange)

OnGoal

Called when a team scores a goal

team

string (blue or orange)

Last updated