Events

This page describes server-side events

Gamemode start

start()

Remarks

Arguments

Server console

console(text)

Remarks

Executed on server console input.

Arguments

Unknown chat command

unknownCommand(pid, text)

Remarks

Arguments

Gamemode stop

stop()

Remarks

Happens when the server is shut down.

Arguments

Player connect

playerConnect(pid)

Remarks

Best place to spawn the player.

Arguments

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

Player death

playerDeath(pid)

Remarks

Arguments

Player hit

playerhit(pid, atkr, float)

Remarks

Happens when attacker lands a hit on another player.

Arguments

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

Player key

playerKey(pid, vkey, down)

Remarks

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

Arguments

Last updated