Events

This page describes server-side events

Gamemode start

start()

Remarks

Arguments

Type

Description

Server console

console(text)

Remarks

Executed on server console input.

Arguments

Type

Description

string

Text

Unknown chat command

unknownCommand(pid, text)

Remarks

Arguments

Type

Description

player

Player ID

string

Command Used

Gamemode stop

stop()

Remarks

Happens when the server is shut down.

Arguments

Type

Description

Player connect

playerConnect(pid)

Remarks

Best place to spawn the player.

Arguments

Type

Description

player

Player ID

Player disconnect

playerDisconnect(pid)

Remarks

Happens when the player disconnects or times out.

There's no way to find out if the player timed out as of right now. This will be added later on.

Arguments

Type

Description

player

Player ID

Player death

playerDeath(pid)

Remarks

Arguments

Type

Description

player

Player ID

Player hit

playerhit(pid, atkr, float)

Remarks

Happens when attacker lands a hit on another player.

Arguments

Type

Description

player

Player ID

player

Attacker ID

float

Damage Dealt

Vehicle player use

vehicleUse(veh, pid, success, seatId, enterOrLeave)

Remarks

Success is true if car is unlocked, we can also provide which seat he wants to enter or whether he wants to enter or leave the vehicle.

Arguments

Type

Description

vehicle

Vehicle ID

player

Player ID

int

Success State

int

Seat ID

int

Enter or Leave State

Player key

playerKey(pid, vkey, down)

Remarks

Executed on player key press. The key codes are documented at MSDN page.

Arguments

Type

Description

player

Player ID

int

Virtual Key

int

Is Key Down

Last updated