User Tools

Site Tools


dev:plugin:database

Database

Provides Player and map information for Trackmania2 & ShootMania servers.

Depends on : Core and needs Database support enabled for Manialive.

Plugin Information

Keeps information about each player that connects to the server as well as information about every map added to the server.

About players it will not just store information sent by the dedicated it will also store number of wins and the total time the player spend on the server

Lastly the plugin will provide a bases to allow any plugin to know how to update the existing database tables if needed.

Registering & Updating Database Tables

You can easily set a database table version to check later if any updates where done.

public function setDatabaseVersion($tableName, $version)

Will get the version of the table. If the table doesen't exists it retuns false.

public function getDatabaseVersion($tableName)

Database Tables

Database Version Table

# Name Type Null Other
1 database_id INT No PRIMARY KEY
2 database_table VARCHAR No KEY
3 database_version INT No

Player Table

# Name Type Null Other
1 player_login VARCHAR No PRIMARY KEY
2 player_nickname VARCHAR No
3 player_nicknameStripped VARCHAR No
4 player_updated INT No
5 player_wins INT No
6 player_timeplayed INT No
7 player_onlinerights VARCHAR No
8 player_ip VARCHAR No
9 player_nation VARCHAR No

Maps Table

# Name Type Null Other
1 challenge_id INT No PRIMARY KEY
2 challenge_uid VARCHAR No
3 challenge_name VARCHAR No
4 challenge_nameStripped VARCHAR No
5 challenge_file VARCHAR No
6 challenge_author VARCHAR No
7 challenge_environment VARCHAR No
8 challenge_mood VARCHAR No
9 challenge_bronzeTime INT No
10 challenge_silverTime INT No
11 challenge_goldTime INT No
12 challenge_copperPrice INT No
13 challenge_lapRace INT No
14 challenge_nbLaps INT No
15 challenge_nbCheckpoints INT No
16 challenge_addedby VARCHAR No
17 challenge_addtime INT No
dev/plugin/database.txt · Last modified: 2013/07/17 10:08 (external edit)