TM²C dedicated server methods and callbacks

Moderator: NADEO

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

TM²C dedicated server methods and callbacks

Post by Xymph » 17 Aug 2011, 15:30

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 » 20 Aug 2011, 20:15

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

Greetz Libero
Image

User avatar
Xymph
Posts: 1291
Joined: 15 Jun 2010, 20:35
Contact:

Re: TM²C dedicated server methods and callbacks

Post by Xymph » 20 Aug 2011, 21:33

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
ManiacTwister
Posts: 70
Joined: 10 Feb 2011, 22:37

Re: TM²C dedicated server methods and callbacks

Post by ManiacTwister » 23 Aug 2011, 14:55

Everytime i try to use the SendBill Methode, i get "Creator is not validated"

Code: Select all

    [2] => Array
        (
            [0] => TrackMania.BillUpdated
            [1] => Array
                (
                    [0] => 1
                    [1] => 6
                    [2] => Error: Transaction can not be created : creator is not validated.
                    [3] => 0
                )

        )
The Validation Key in dedicated_cfg.txt ist setted. Anyone know why it doesnt work? :?
TDRacer - TrackMania Dirt Clan since 2009 - http://www.tdracer.de/
Die Intelligenz in der Welt bleibt konstant. Nur dumm, dass die Bevölkerung wächst.

User avatar
Xymph
Posts: 1291
Joined: 15 Jun 2010, 20:35
Contact:

Re: TM²C dedicated server methods and callbacks

Post by Xymph » 05 Sep 2011, 21:14

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 2 guests