61
AoT General / Crate Counter - Count those crates!
« on: December 06, 2009, 02:59:57 PM »
Crate Counter is a new AoT mod that makes you say how much crates are in the server. You can do this by saying /countCrates.
The reason a function in this script has more than needed for this mod is for you being able to make your own mods with the function called countDTS. Here's how you can make your own mod with it:
Copy+paste the countDTS function into your own script. If you modify the function at all, you might as well change the function name. This function returns the amount of objects with the specified file name. You do not need to put directories (thanks to Rudyman's script). Here's an example use of the function:
Inspiration: I wanted to see how much crates were in the server.
Credits:
Rudyman - MoA scripts.
Jimmg - Released the MoA scripts.
JohnTron (Me) - Main scripter.
The reason a function in this script has more than needed for this mod is for you being able to make your own mods with the function called countDTS. Here's how you can make your own mod with it:
Copy+paste the countDTS function into your own script. If you modify the function at all, you might as well change the function name. This function returns the amount of objects with the specified file name. You do not need to put directories (thanks to Rudyman's script). Here's an example use of the function:
Code: [Select]
echo(countDTS("female.dts","Player")@" bots in the server.");
The first argument is the DTS name. The second is the class you would like to ignore (leave it blank if there are no classes you want to ignore).Inspiration: I wanted to see how much crates were in the server.
Credits:
Rudyman - MoA scripts.
Jimmg - Released the MoA scripts.
JohnTron (Me) - Main scripter.