Exports (API Communication)
All Functions only accessible at server side
Functions
Send a notify
exports["RocketSoccer"]:Notify(source, message)source
int
message
string
Start a round
exports["RocketSoccer"]:StartRound(sourceOrange, sourceBlue)sourceOrange
int
sourceBlue
int
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)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)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] = truetrue or false
Add a player to the queue
exports["RocketSoccer"]:AddPlayerToQueue(source, team, force, player)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 / falsetrue or false
Check if player is in the queue of a team
source
int
Change the return of the function to change the logic:
true / false
true or false
Remove a player from the queue
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
Spawn a object
Events
OnExploit
Called when trying to tune up your vehicle using the internal trigger and it is not a Rocket Soccer vehicle.
playerPedId
int (Ped)
netID
int (Network ID)
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