[ASECO 2.X PLUGIN] Clan management

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, Assembler Maniac, f*ckfish, TM-Patrol

Post Reply
calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

[ASECO 2.X PLUGIN] Clan management

Post by calsmurf2904 » 20 Jul 2008 14:17

------------------------------------------------
How to install ?
------------------------------------------------
It is still very basic.....it only has the features add and remove....but i am out of ideas :P
paste this code in a file name plugin.clan.php

Code: Select all

<?php
class Clan extends Plugin {

function clanmember_commands($command){
$player = $command['author'];
$login = $player->login;
$commandp = explode(" ",$command['params']);
if ($commandp[0] == "add"){
if (isset($commandp[1])){
$query1 = "SELECT Id FROM players WHERE login = '".$commandp[1]."'";
$response = mysql_query($query1);
$fetch = mysql_fetch_object($response);
$query = "INSERT INTO clanmembers (PlayerID, Login) VALUES ('".$fetch->Id."','".$commandp[1]."')";
mysql_query($query) or $this->Aseco->client->query("ChatSendServerMessageToLogin","Error while inserting !".mysql_error(),$login);
$this->Aseco->client->query("ChatSendServerMessageToLogin","Succesfully added user !",$login);
}else{
$this->Aseco->client->query("ChatSendServerMessageToLogin","You didn't specify an user !",$login);
}
}else if ($commandp[0] == "remove"){
$query = "SELECT Id FROM players WHERE login = '".$commandp[1]."'";
$response = mysql_query($query); 
$fetch = mysql_fetch_object($response);
$query2 = "DELETE FROM clanmembers WHERE PlayerID = '".$fetch->Id."'";
mysql_query($query2);
$this->Aseco->client->query("ChatSendServerMessageToLogin","Succesfully deleted !",$login);
}
}

function show_clanmembers($command){
$player = $command['author'];
$login = $player->login;
$query = "SELECT * FROM clanmembers";
$response = mysql_query($query);
if(mysql_num_rows($response)>0){
$message = "";
$i=1;
while ($fetch = mysql_fetch_array($response,MYSQL_ASSOC)){
$query2 = "SELECT * FROM players WHERE login = '".$fetch['Login']."'";
$response2 = mysql_query($query2);
$fetch2 = mysql_fetch_array($response2,MYSQL_ASSOC);
$message .= "$ff0".$i.".".$fetch2['NickName']."\n";
$i++;
}
if ($message == ""){
$message = "There currently aren't any clan members !\n";
}
}else{
$message = "There currently aren't any clan members !\n";
}
$this->sendPopupWindowToPlayer($login,$message,"ClanMembers");
}

}
$_PLUGIN = new Clan();
$_PLUGIN->setAuthor("Calsmurf2904");
$_PLUGIN->setVersion(0.1);
$_PLUGIN->setDescription("This allows you to manage clan members");
$_PLUGIN->addChatCommand("admin clanmember","clanmember_commands","This adds an new clan member");
$_PLUGIN->addChatCommand("clanmembers","show_clanmembers","This shows the current clan members");
?>
You also have to create a new table in the sql database...
paste this in an file name clan.sql

Code: Select all

/*
MySQL Data Transfer
Source Host: localhost
Source Database: aseco121
Target Host: localhost
Target Database: aseco121
Date: 20-7-2008 16:16:09
*/

SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for clanmembers
-- ----------------------------
DROP TABLE IF EXISTS `clanmembers`;
CREATE TABLE `clanmembers` (
  `PlayerID` int(255) NOT NULL,
  `Login` varchar(255) NOT NULL,
  PRIMARY KEY  (`PlayerID`,`Login`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
and execute the batch file in you sql db.
Any new features ideas are welcome.
----------------------------------------------
How does it work ?
----------------------------------------------
Use /admin clanmember add playerlogin (not nickname) to add player
use /admin clanmember remove playerlogin (not nickname) to remove player
use /clanmembers to see who is currently in the clan.

Please report any bugs,suggestions or new features ideas in this topic !
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

Sopy22
cyclist
cyclist
Posts: 41
Joined: 21 Jul 2008 22:54
Owned TM-games: TMNF,TMN,TMU
Location: Cluj-Napoca (Klausenburg) Romania

Re: [ASECO 2.X PLUGIN] Clan management

Post by Sopy22 » 25 Aug 2008 01:51

Nice plugin:) installed on my server:D

blindgunner
highway camper
highway camper
Posts: 4
Joined: 03 Sep 2008 11:31
Owned TM-games: TMU

Re: [ASECO 2.X PLUGIN] Clan management

Post by blindgunner » 04 Sep 2008 13:14

I get this when i try and add a member

Code: Select all

mysql_query(): Access denied for user 'ODBC'@'localhost' (using pa
ssword: NO) on line 33 in file 

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: [ASECO 2.X PLUGIN] Clan management

Post by calsmurf2904 » 04 Sep 2008 13:47

blindgunner wrote:I get this when i try and add a member

Code: Select all

mysql_query(): Access denied for user 'ODBC'@'localhost' (using pa
ssword: NO) on line 33 in file 
do you have the localdatabase plugin enabled ?
if yes...did you add the plugin before or after the plugin ?
if before...try adding it after
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

blindgunner
highway camper
highway camper
Posts: 4
Joined: 03 Sep 2008 11:31
Owned TM-games: TMU

Re: [ASECO 2.X PLUGIN] Clan management

Post by blindgunner » 04 Sep 2008 15:43

cheers for the help mate it works now...does it have a panel or anything or do u just have to type in /clanmembers when u want to c it

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: [ASECO 2.X PLUGIN] Clan management

Post by calsmurf2904 » 04 Sep 2008 16:08

blindgunner wrote:cheers for the help mate it works now...does it have a panel or anything or do u just have to type in /clanmembers when u want to c it
maybe i will add a little panel later something like top-5 clanmembers
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

Sopy22
cyclist
cyclist
Posts: 41
Joined: 21 Jul 2008 22:54
Owned TM-games: TMNF,TMN,TMU
Location: Cluj-Napoca (Klausenburg) Romania

Re: [ASECO 2.X PLUGIN] Clan management

Post by Sopy22 » 04 Sep 2008 23:34

It would be awesome :D

Hach-Que
cyclist
cyclist
Posts: 38
Joined: 19 Dec 2006 08:23
Owned TM-games: TMUF
Manialink(s): hach-que
Contact:

Re: [ASECO 2.X PLUGIN] Clan management

Post by Hach-Que » 26 Sep 2008 12:58

What about a central server for storing clans, then at the end of a race, the plugin sends the winning statistics to the central server, where depending on what order members from different clans are in, the different clans gain score (imagine LP for clans).

Just an idea. :1
Image

jeffroselier
road tourist
road tourist
Posts: 102
Joined: 25 Oct 2006 07:59
Location: MARSEILLE

Re: [ASECO 2.X PLUGIN] Clan management

Post by jeffroselier » 01 Oct 2008 06:13

hello,

Does this plugin runs on xaseco 1.04?

Thank you

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: [ASECO 2.X PLUGIN] Clan management

Post by calsmurf2904 » 01 Oct 2008 07:35

Hach-Que wrote:What about a central server for storing clans, then at the end of a race, the plugin sends the winning statistics to the central server, where depending on what order members from different clans are in, the different clans gain score (imagine LP for clans).

Just an idea. :1
i was planning something like that....but i don't have time for it.
(and i don't have the resources and hosting for it neither)
jeffroselier wrote:hello,

Does this plugin runs on xaseco 1.04?

Thank you
No.The plugin uses aseco's plugin framework wich isn't in xaseco.
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets


Post Reply