Events:
onConnect ( )
This event is triggered if connection to the server has been successfull.
onDisconnect ( int reason )
This event is triggered when the programm disconnects from the server.
Reasons:
0 - IP in use
1 - Banned
2 - Timed out
4 - Invalid Password
5 - Server Shutdown
6 - Incorrect version
10 - Bad nickname
11 - Admin+ disabled on the server
onAdminChat ( string text )
This event is triggered when an admin says something.
onAdminMessage ( string text )
This event is triggered when admin pm has been recieved by client.
onPlayerJoin ( int playerID )
This event is triggered when a player joins,
onPlayerPart ( int playerID, int reason )
This event is triggered when a player leaves.
Reasons:
0 - Parts
1 - Kicked
2 - Time out
3 - Flooding
4 - Trainer
5 - CRC Mismatch
6 - CRC Timeout
onPlayerChat ( int playerID, string text )
This event is triggered when a player talks.
onPlayerMessage ( int playerID, string text )
This event is triggered when a player sends a private message.
onPlayerKilled ( int playerID, int killerID, int weaponID )
This event is triggered when a player dies.
killerID = 100 - Admin
killerID = 255 - No killer
onPlayerHealthChange ( int playerID, float newHealth, float OldHealth )
This event is triggered when player health changes.
onPlayerPositionChange ( int playerID )
This event is triggered when player position changes.
onPlayerVehicleEnter ( int playerID, int vehicleID )
This event is triggered when player enters a vehicle.
onPlayerVehicleExit ( int playerID, int vehicleID )
This event is triggered when player exits a vehicle.
onPlayerVehicleHealthChange ( int vehicleID, float newHealth, float oldHealth )
This event is triggered when vehicle health is changed.
Functions:
void addEventHandler ( string event, string function )
Use this to assign event calls to functions so the events you want to use are called.
void removeEventHandler ( string event, string function )
Remove the event handlers
void gettok ( string text, int token, string separator )
Get a token from a string
void sendChat ( string text )
void sendMessage ( int playerID, string text )
string getAdminName ( )
string getAdminPassword ( )
bool isConnected ( )
string getServerIP ( )
int getServerPort ( )
string getServerName ( )
string getServerMOTD ( )
int getServerGame ( )
int getServerGameMode ( )
int getServerMaxPlayers ( )
string getPlayerName ( int playerID )
float getPlayerHealth ( int playerID )
int getPlayerKills ( int playerID )
int getPlayerDeaths ( int playerID )
int getPlayerMoney ( int playerID ) (Race only)
int getPlayerVehicle ( int playerID )
float, float, float getPlayerPosition ( int playerID )
void slapPlayer ( int playerID )
void kickPlayer ( int playerID )
void banPlayer ( int playerID )
string getVehicleName ( int vehicleID )
float getVehicleHealth ( int vehicleID )
float, float, float getVehiclePosition ( int vehicleID )
float, float, float getVehicleSpawnpoint ( int vehicleID )
int getVehicleDriver ( int vehicleID )
bool getVehicleIsPassenger ( int vehicleID, int playerID )