Dash Codes

Note: DashCodes where created by Dash. All credit goes to him.

Download Dash Codes
Download Link

What Does DashCodes Include?
DashCodes includes some easy-to-use server-side codes. With those codes you can control you're server.

Codes
Client-Side : admin login (/adm pass), tank changers (/tank), team changers (/team), observermode (/obs), projectile changers (/projectile), ping (/ping name), team chat (/tm message) private chat (/pm message)

Admin Only : centerprint (/cp message), silence (/s name), kick (/kick name), ban (/ban name), stats (/stats), rename (/r oldn newn), nuke (/nuke), kill (/kill name), list banned players (/listban) Client-Side : admin login (/adm pass), tank changers (/tank), team changers (/team), observermode (/obs), projectile changers (/projectile), ping (/ping name), team chat (/tm message) private chat (/pm message)

Admin Only : centerprint (/cp message), silence (/s name), kick (/kick name), ban (/ban name), stats (/stats), rename (/r oldn newn), nuke (/nuke), kill (/kill name), list banned players (/listban)

Extra's
TankDb.cs - Gives you the ability to create your own tanks or change tank's specs.

UberBots.cs - Makes you able to give your Bot's a more personal feeling (enstrenghten, ...)

Prefs.cs - Gives you the ability to give DashCodes your own personal feeling

Installation Instructions
1. Go to ThinkTanks/game/server

2. Create a new folder named 'dash' in it

3. Drag all files (from the download) to the folder 'dash'

4. Go to: game/server/dash/prefs.cs

5. Change the Adminpassword to your own wish

6. Go to ThinkTanks/main.cs (make sure that that file isn't main.cs.dso)

7. Open it. In case you can't find the file, go here

8. Add this line to the bottom of it (make sure you have everything)

exec("game/server/dash/main.cs");

9. Start up a dedicated server (to see if it all worked)

10. If you do not get any errors on the dedicated-window, then you've installed everything correctly!

11. Experiment with DashCodes. Have fun!

refs.cs
// Password used for logging in using /sadm or /adm

// YOU HAVE TO CHANGE YOUR PASSWORD!

 $pref::Server::AdminPassword = "PASSWORD";

// 1: players can change tanks; 0: players cannot change tanks

 $pref::Server::TankChangers = 0;

// 1: players can change teams; 0: players cannot change teams

 $pref::Server::TeamChangers = 0;

// 1: players can change projectiles; 0: players cannot change projectiles

 $pref::Server::ProjectileChangers = 0;

//Players can use the observer code

 $pref::Server::ObserverOn = 1;

// Message displayed to a player when they are banned from a server

 $pref::Server::BanMessage = "YOU HAVE BEEN BANNED FROM THIS SERVER. ";

// Message displayed to others when a player is banned from the server

 $pref::Server::BanAnnouncement = " HAS BEEN BANNED";

// Message displayed to others when a player is kicked from the server

<p style="border-style: initial; border-color: initial; "> $pref::Server::KickAnnouncment = " HAS BEEN KICKED";

<p style="border-style: initial; border-color: initial; ">// Message displayed to a player when is kicked from the server

<p style="border-style: initial; border-color: initial; "> $pref::Server::KickMessage = " YOU HAVE BEEN KICKED FOR BAD BEHAVIOR, YOU ARE WELCOME TO COME BACK IF YOU WILL PLAY NICELY";

<p style="border-style: initial; border-color: initial; ">// Message displayed to others when a player is silenced

<p style="border-style: initial; border-color: initial; "> $pref::Server::SilenceMessage = " HAS BEEN DEEMED UNWORTHY OF CHAT";

<p style="border-style: initial; border-color: initial; ">// Message displayed to others when a player is un-silenced

<p style="border-style: initial; border-color: initial; "> $pref::Server::UnSilenceMessage = " HAS BEEN GIVEN ANOTHER CHANCE TO USE CHAT";

<p style="border-style: initial; border-color: initial; ">// Message sent to a silenced player who tries to chat

<p style="border-style: initial; border-color: initial; "> $pref::Server::ChatDeniedMessage = "NO CHAT FOR YOU";

<p style="border-style: initial; border-color: initial; ">// Message sent to all players when a player is killed by the admin

<p style="border-style: initial; border-color: initial; "> $pref::Server::AdminKillMessage = " HAD HIS BRAIN POPPED BY AN ADMIN FOR BEING A PUNK";

<p style="border-style: initial; border-color: initial; ">// Message sent to all players when a player is kicked for an admin login attempt

$pref::Server::FailedAdminLogin = " HAS BEEN KICKED FOR A FAILED ADMIN LOGIN ATTEMPT"; P
// Message sent to all players when the nuke command is used

$pref::Server::NukeMessage = " NUKE 'EM ALL";

ConsoleUtilities.cs
The one that is with the download, is quite a outdated one;

Delete everything from that file, and add this:

function scrub_ip(%s) {

%ip_port = getSubStr(%s,strstr(%s,":")+1,100);

%ip = getSubStr(%ip_port,0,strstr(%ip_port,":"));

return %ip;

}

// console command: users;

// list all users in server.

// display format: NAME, IP ADDRESS, PING, CADD

function users

{

$len = clientgroup.getCount;

for($i=0;$i<$len;$i++)

{

%u = clientgroup.getObject($i);

%cadd = %u.getId;

%name = %u.nameBase;

%ip = scrub_ip(%u.getAddress);

%ping = %u.getPing;

%team = %u.team;

if(%u.isAdmin)

%admin = "Admin";

else if(%u.issAdmin)

%admin = "sAdmin";

else

%admin = "No";

echo(%name SPC "["@%cadd@"]: IP=" SPC %ip@", PING=" SPC %ping@", TEAM=" SPC %team@" ADMIN="SPC %admin@" TYPE= Human");

}

$len = botclientgroup.getCount;

for($i=0;$i<$len;$i++)

{

%u = botclientgroup.getObject($i);

%cadd = %u.getId;

%name = %u.nameBase;

%team = %u.team;

echo(%name SPC "["@%cadd@"]: TEAM=" SPC %team@" TYPE= Bot");

}

}

function unlockserver

{

$Pref::Server::Password = "";

echo("The Server Has Been Unlocked");

}

function lockserver(%password)

{

$Pref::Server::Password = %password;

echo("The Server Has Been Locked With The Pass: "@%password);

}

function servernamechanger(%newname)

{

$Pref::Server::Name = %newname;

echo("The Server Name Has Been Changed To: "@%newname);

}

function servertype(%newtype)

{

$Server::MissionType = %newtype;

echo("The Server Type Has Been Changed To: "@%newtype);

}

You can type these functions (eg. servernamechanger("NewServerName");) into the dedicated-console.

Banlist.cs
This is one of the most important things in this AdminScript.

The banlist, the name says it, is the list of all people that can't/may not enter your server.

It works like this: Tanker_Name:IP_Address (eg. ThinkTanker:357.66.54.85)

You can add people to the banlist by using the /ban NAME code in-game, or add his/her name and IP manually.

Warfare's MultiPlatform Chatlogger
Download, Instructions & Features: Linky!