TM²C dedicated server methods and callbacks

Moderator: NADEO

Post Reply
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

TM²C dedicated server methods and callbacks

Post by Xymph »

The dedicated server package contains static lists of the methods and callbacks (mirrored online here). The new callback is TrackMania.RulesScriptCallback, while the PlayerManialinkPageAnswer has changed: third parameter Answer is now a string instead of integer, and there's a new fourth parameter called Entries, an array of name/value pairs. Haven't experimented with these yet.

There are also eight new methods, GetServerPlanets plus seven related to scripts. GetServerPlanets does for planets what GetServerCoppers did for coppers in TMUF (and that one now returns the planets count too).

To easily see the new methods, check out the dynamic TM²C vs. TMF page on my methods comparison site.
For the seven new Script functions, select that option from the Show drop-down list.

The SendNotice methods had their 'max duration' parameter replaced by a 'variant' with value [0 = normal, 1 = Sad, 2 = Happy].
The Pay and SendBill methods now work on planets instead of coppers, obviously.

And most significantly, the game mode numbers used by GetGameMode and SetGameMode have changed (not just incremented for the old modes, as Cup remained the same):

Code: Select all

TMF:            TM2C:
0: Rounds       0: Script
1: TimeAttack   1: Rounds
2: Team         2: TimeAttack
3: Laps         3: Team
4: Stunts       4: Laps
5: Cup          5: Cup
                6: Stunts
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
User avatar
Libero
Posts: 69
Joined: 17 Jan 2011, 00:10

Re: TM²C dedicated server methods and callbacks

Post by Libero »

Hey Xymph
Did you know anything about the Donate Method ? Did it work ?

Greetz Libero
Image
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: TM²C dedicated server methods and callbacks

Post by Xymph »

Libero wrote:Did you know anything about the Donate Method ? Did it work ?
There is no Donate method, perhaps you mean the Pay method. I haven't tried it yet, but I expect it works the same as in TMF.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: TM²C dedicated server methods and callbacks

Post by Xymph »

Xymph wrote:To easily see the new methods, check out the dynamic TM²C vs. TMF page on my methods comparison site.
The TM²C vs. TMF page has been updated to use the latest dedicated server, so it shows all the new *Map* methods.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest