XAseco - Tournament Plugin v0.2.5
XAseco - Tournament Plugin v0.2.5
I just recently started php about a few weeks ago, and was thinking about what to make as my first plugin, thats around the same time i was planning on hosting a tournament for my server,and thought,why must i waste time making a website with all the details about the tournament? and so decided to make a tournament plugin - where the users can view all details in relation to the tournament on the server with the "/tournament" chat command and can register in-game while playing in the server with the "/tour_reg" command which gets saved to the database.
1.)Open your phpMyAdmin through your browser by typing 127.0.0.1
and login with "root" username and your password.
2.)There open your xaseco database from the column on the left and then find "Create new table on database xaseco" and there type in "tour" and no. of fields - 1 and click GO.
3.)In field type in "Login",Type choose "VARCHAR" and in Length type 100 and click SAVE and set it to UNIQUE to prevent duplicates.
4.) Download "vineeth.plugin.php" from
http://www.hotlinkfiles.com/files/27084 ... plugin.zip
and copy it to your "plugin/ " folder and in the plugins.xml file add <plugin>vineeth.plugin.php</plugin.php>
You can change the pop up messages in the php file itself .
Available commands from the plugin :
/tournament - To view all commands
/tour_details -- Details of the race type
/tour_tracks -- To view the names of the 5 tracks and authors
/tour_register -- Details on how to register
/tour_dat -- details on Date and Time(dat)
/tour_prizes -- details on the prizes
/tour_contact -- Server admins/masteradmin contact
/tour_del -- to delete your entry from the tournament
And your good to go!
To see the plugin in action visit my server with trackmania url
tmtp://#join=vineeth_server
or just paste $ltmtp://#join=vineeth_server in the chatbox in any trackmania server,and then click the link.
Updates in v0.2:
I have added two very important features which i thought were.....well....important!! And a third one,which seems important now, asked to be added by scg-flighthigh.
New Feature
#1:/tour_list - To view a list of all registered users so far. Can be accesed by all players - Helpful for the MasterAdmin as well to see who all have registered so far.
#2:/tour_kick - Only to be used once the tournament is about to start - Can be accesed only by the MasterAdmin - It will KICK all unregistered players, so only the registered players remain on the server - because someone might leak the server password,and unregistered players will show up ,so once the tournament starts you can use the command and kick them.
#3: When the player types "/tour_reg" to register, his/her Nickname is also registered to the table along with his LoginId.
For the #3 feature to work, in addition to my earlier post on steps for making the table "tour" you will have to add one more FIELD AFTER Login and name it 'Nickname' and set the TYPE to VARCHAR and LENGTH to 100 and click GO.
UPDATE v.0.2.5:
Updated the REGISTERED PLAYERS manialink which can be viewed by the command ,"/tour_list"
Previously it was a fixed page which could show limited no. of registered players.
Now changed it to a multi page manialink ,which displays 10 registered players/page and you can go through the other pages to see all the registered players.
So download and replace the vineeth.plugin.php with the new one.
http://www.hotlinkfiles.com/files/27084 ... plugin.zip
1.)Open your phpMyAdmin through your browser by typing 127.0.0.1
and login with "root" username and your password.
2.)There open your xaseco database from the column on the left and then find "Create new table on database xaseco" and there type in "tour" and no. of fields - 1 and click GO.
3.)In field type in "Login",Type choose "VARCHAR" and in Length type 100 and click SAVE and set it to UNIQUE to prevent duplicates.
4.) Download "vineeth.plugin.php" from
http://www.hotlinkfiles.com/files/27084 ... plugin.zip
and copy it to your "plugin/ " folder and in the plugins.xml file add <plugin>vineeth.plugin.php</plugin.php>
You can change the pop up messages in the php file itself .
Available commands from the plugin :
/tournament - To view all commands
/tour_details -- Details of the race type
/tour_tracks -- To view the names of the 5 tracks and authors
/tour_register -- Details on how to register
/tour_dat -- details on Date and Time(dat)
/tour_prizes -- details on the prizes
/tour_contact -- Server admins/masteradmin contact
/tour_del -- to delete your entry from the tournament
And your good to go!
To see the plugin in action visit my server with trackmania url
tmtp://#join=vineeth_server
or just paste $ltmtp://#join=vineeth_server in the chatbox in any trackmania server,and then click the link.
Updates in v0.2:
I have added two very important features which i thought were.....well....important!! And a third one,which seems important now, asked to be added by scg-flighthigh.
New Feature
#1:/tour_list - To view a list of all registered users so far. Can be accesed by all players - Helpful for the MasterAdmin as well to see who all have registered so far.
#2:/tour_kick - Only to be used once the tournament is about to start - Can be accesed only by the MasterAdmin - It will KICK all unregistered players, so only the registered players remain on the server - because someone might leak the server password,and unregistered players will show up ,so once the tournament starts you can use the command and kick them.
#3: When the player types "/tour_reg" to register, his/her Nickname is also registered to the table along with his LoginId.
For the #3 feature to work, in addition to my earlier post on steps for making the table "tour" you will have to add one more FIELD AFTER Login and name it 'Nickname' and set the TYPE to VARCHAR and LENGTH to 100 and click GO.
UPDATE v.0.2.5:
Updated the REGISTERED PLAYERS manialink which can be viewed by the command ,"/tour_list"
Previously it was a fixed page which could show limited no. of registered players.
Now changed it to a multi page manialink ,which displays 10 registered players/page and you can go through the other pages to see all the registered players.
So download and replace the vineeth.plugin.php with the new one.
http://www.hotlinkfiles.com/files/27084 ... plugin.zip
Last edited by vineeth.h on 31 Jul 2009 07:06, edited 11 times in total.
- TheM
- Pit Crew
- Posts: 286
- Joined: 25 Feb 2009 16:43
- Owned TM-games: TMU(F), TMN(F), TM2
- Location: Brabant, Netherlands
- Contact:
Re: XAseco - Tournament Plugin
Looks good, but here is a suggestion:
I think it would be better to use a chat message for the registered/unregisterd commands.
With those changes your file will be like this: http://files.klaversma.eu/vineeth.2.plugin.zip 
I think it would be better to use a chat message for the registered/unregisterd commands.
And make an comment at the top of your plugin, like:Registered/Unregistered wrote:will be:Code: Select all
if ($aseco->server->getGame() == 'TMF') { $header = '{#welcome}Unregistered'; $data=array(); $data[] = array('You have been unregistered'); display_manialink($command['author']->login, $header, array('Icons64x64_1', 'TrackInfo', -0.01), $data, array(0.9), 'OK'); }
andCode: Select all
$data = "You have been unregistered"; $aseco->client->query('ChatSendServerMessageToLogin', $data, $command['author']->login);
will be:Code: Select all
if ($aseco->server->getGame() == 'TMF') { $header = '{#welcome}Registered'; $data=array(); $data[] = array('You have been registered'); display_manialink($command['author']->login, $header, array('Icons64x64_1', 'TrackInfo', -0.01), $data, array(0.9), 'OK'); }
Code: Select all
$data = "You have been registered"; $aseco->client->query('ChatSendServerMessageToLogin', $data, $command['author']->login);
Code: Select all
/**
* Tournement plugin
* Made by vineeth.h
* Version: XX.X
* Contributors: people who helped you... (changed some stuff for example)
*/

Re: XAseco - Tournament Plugin
Oh yes,thank you for updating that and good idea!
But after reading your idea,i thought it would be better if the message - "Player $player->login registered for the tournament" would be sent to all players currently playing on the server at that time, so everyone will read it and will know about the tournament!
I've updated my link, check it out.
http://www.hotlinkfiles.com/files/26973 ... plugin.zip
But after reading your idea,i thought it would be better if the message - "Player $player->login registered for the tournament" would be sent to all players currently playing on the server at that time, so everyone will read it and will know about the tournament!

I've updated my link, check it out.
http://www.hotlinkfiles.com/files/26973 ... plugin.zip
Last edited by vineeth.h on 27 Jul 2009 11:15, edited 1 time in total.
- TheM
- Pit Crew
- Posts: 286
- Joined: 25 Feb 2009 16:43
- Owned TM-games: TMU(F), TMN(F), TM2
- Location: Brabant, Netherlands
- Contact:
Re: XAseco - Tournament Plugin
Instead of sending everyone a message with the SendServerMessageToLogin function, you can better send everyone a message once...
will be:

Code: Select all
foreach ($aseco->server->players->player_list as $playa)
{
//if ($playa->login != $player->login)
{
$aseco->addCall('ChatSendServerMessageToLogin', array($data, $playa->login));
}
}
Code: Select all
$aseco->client->query('ChatSendServerMessage', $data);

-
- smooth traffic navigator
- Posts: 199
- Joined: 05 May 2009 15:52
- Owned TM-games: TM2
Re: XAseco - Tournament Plugin
Hello
very nice Tool. I put it on one of our Servers and make some test. It work fine.
Is it possbile that you make a second row into the Database for the gamenick. I think thats it what i need for my next Tournament. There i want make a Quali over two Days and then i want too look for the best 30 Players of this Days for the Mainevent. And this Players i want to put in a Guestlist so they can join the Server without a Passwordrequest.
My Problem is, that i have the Gamenicks in the TopRanklist and not the Loginname. In the Database i have the Loginname but not the Gamenick.
I hope you understood my Question.
very nice Tool. I put it on one of our Servers and make some test. It work fine.

Is it possbile that you make a second row into the Database for the gamenick. I think thats it what i need for my next Tournament. There i want make a Quali over two Days and then i want too look for the best 30 Players of this Days for the Mainevent. And this Players i want to put in a Guestlist so they can join the Server without a Passwordrequest.
My Problem is, that i have the Gamenicks in the TopRanklist and not the Loginname. In the Database i have the Loginname but not the Gamenick.
I hope you understood my Question.
Re: XAseco - Tournament Plugin
Thank you for that 'TheM' - i've changed it,much better now!
Updates in v0.2:
http://www.hotlinkfiles.com/files/26973 ... plugin.zip
I have added two very important features which i thought were.....well....important!! And a third one,which seems important now, asked to be added by scg-flighthigh.
New Feature
#1:/tour_list - To view a list of all registered users so far. Can be accesed by all players - Helpful for the MasterAdmin as well to see who all have registered so far.
#2:/tour_kick - Only to be used once the tournament is about to start - Can be accesed only by the MasterAdmin - It will KICK all unregistered players, so only the registered players remain on the server - because someone might leak the server password,and unregistered players will show up ,so once the tournament starts you can use the command and kick them.
#3: When the player types "/tour_reg" to register, his/her Nickname is also registered to the table along with his LoginId.
For the #3 feature to work, in addition to my earlier post on steps for making the table "tour" you will have to add one more FIELD AFTER Login and name it 'Nickname' and set the TYPE to VARCHAR and LENGTH to 100 and click GO.
Thats it,you're good to go.
Have fun !
I have added what you asked me to,now when the player registers his nickname will also get registered.My Problem is, that i have the Gamenicks in the TopRanklist and not the Loginname. In the Database i have the Loginname but not the Gamenick.
Updates in v0.2:
http://www.hotlinkfiles.com/files/26973 ... plugin.zip
I have added two very important features which i thought were.....well....important!! And a third one,which seems important now, asked to be added by scg-flighthigh.
New Feature
#1:/tour_list - To view a list of all registered users so far. Can be accesed by all players - Helpful for the MasterAdmin as well to see who all have registered so far.
#2:/tour_kick - Only to be used once the tournament is about to start - Can be accesed only by the MasterAdmin - It will KICK all unregistered players, so only the registered players remain on the server - because someone might leak the server password,and unregistered players will show up ,so once the tournament starts you can use the command and kick them.
#3: When the player types "/tour_reg" to register, his/her Nickname is also registered to the table along with his LoginId.
For the #3 feature to work, in addition to my earlier post on steps for making the table "tour" you will have to add one more FIELD AFTER Login and name it 'Nickname' and set the TYPE to VARCHAR and LENGTH to 100 and click GO.
Thats it,you're good to go.
Have fun !

Last edited by vineeth.h on 27 Jul 2009 12:49, edited 1 time in total.
- TheM
- Pit Crew
- Posts: 286
- Joined: 25 Feb 2009 16:43
- Owned TM-games: TMU(F), TMN(F), TM2
- Location: Brabant, Netherlands
- Contact:
Re: XAseco - Tournament Plugin
I think it would be better if you use commands like /tour list instead of /tour_list ...
-
- smooth traffic navigator
- Posts: 199
- Joined: 05 May 2009 15:52
- Owned TM-games: TM2
Re: XAseco - Tournament Plugin
vineeth.h
I makt the second Row into the Database und load the File into the Pluginfolder and restart the Xaseco.
Nice thats it what i looking for. So i have a List of all Gamenicks wiht Loginnames and can make my Guestlist.
You got 10 of 10 Points

Nice thats it what i looking for. So i have a List of all Gamenicks wiht Loginnames and can make my Guestlist.
You got 10 of 10 Points

Re: XAseco - Tournament Plugin v0.2
Ty scg! Glad to know that you like it!
Re: XAseco - Tournament Plugin v0.2
UPDATE v.0.2.5:
Updated the REGISTERED PLAYERS manialink which can be viewed by the command ,"/tour_list"
Previously it was a fixed page which could show limited no. of registered players.
Now changed it to a multi page manialink ,which displays 10 registered playeys/page and you can go through the other pages to see all the registered players.
So download and replace the vineeth.plugin.php with the new one.
http://www.hotlinkfiles.com/files/27084 ... plugin.zip
Updated the REGISTERED PLAYERS manialink which can be viewed by the command ,"/tour_list"
Previously it was a fixed page which could show limited no. of registered players.
Now changed it to a multi page manialink ,which displays 10 registered playeys/page and you can go through the other pages to see all the registered players.
So download and replace the vineeth.plugin.php with the new one.
http://www.hotlinkfiles.com/files/27084 ... plugin.zip
-
- road tourist
- Posts: 102
- Joined: 25 Oct 2006 07:59
- Location: MARSEILLE
Re: XAseco - Tournament Plugin v0.2
Lol - I just saw your id exit my server a few seconds ago - So instead of the screenshots you can check out the plugin directly from there again?
-
- road tourist
- Posts: 102
- Joined: 25 Oct 2006 07:59
- Location: MARSEILLE
Re: XAseco - Tournament Plugin v0.2
yes actually I just saw your server, or I have
... anything
.
He would practice in the next release there have clickable buttons on a bit as fast, this would be much more convenient.
Good work so far gg


He would practice in the next release there have clickable buttons on a bit as fast, this would be much more convenient.
Good work so far gg

-
- smooth traffic navigator
- Posts: 199
- Joined: 05 May 2009 15:52
- Owned TM-games: TM2