Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Hacktank on November 03, 2010, 10:30:50 pm

Title: Team Chat
Post by: Hacktank on November 03, 2010, 10:30:50 pm
Script Name: Team Chat
Script Description: Sends silent messages to an entire team
Original Author(s): Hacktank
Core Version: 2.6.5
Main:

Team Chat allows players to send messages to their team without giving away their position/information to anyone else with floaty text over their heads. It also allows admins to send messages to whole teams.

Usage:

Players:
/team message: sends message to their entire team
/chat message: same as /team

Admin:
/sayteam teamid message: sends message to the team indicated by teamid, if the admin in inserver it will show their name, if they preform the command from ARSSE or something similar it will show Server

Each team's messages are colored for aesthetic value and can be changed by editing the top of the script.

Here are a few screenshots of Team Chat in action:
(http://img193.imageshack.us/img193/9306/chat1j.png)
(http://img64.imageshack.us/img64/5615/chat2x.png)


Version 1.0.1



(http://soldatcentral.com/images/download.gif) (http://forums.soldat.pl/index.php?action=dlattach;topic=39162.0;attach=26266)


Title: Re: Team Chat
Post by: dnmr on November 04, 2010, 12:25:23 am
http://forums.soldat.pl/index.php?topic=37940.0
http://forums.soldat.pl/index.php?topic=37934.0

Also, why are you even using dynamic arrays? :/
Title: Re: Team Chat
Post by: Hacktank on November 04, 2010, 01:11:44 am
I've had this script for about a year, I uploaded it out of pure boredom.

I suppose it would be more efficient(maybe) to use a static bool[32] array, but I am addicted to C++ and the use of stacks, linked lists, ect.
Title: Re: Team Chat
Post by: DorkeyDear on November 04, 2010, 08:37:24 am
Minor suggestion:
having a "smart split" thingy so it tries to find spaces, periods, commas, exclamation points, etc. and splits there (if possible); maybe add a hyphen if the line cannot be split using this "smart split" method.

Nice colors :D

Crazy suggestion:
per-player option to set how it looks.. for example..
'[%%PLAYER_NAME%%] %%MESSAGE%%'
maybe set color
but this would probably only work best with an account-based thing (SGAS FTW, but its still a WIP; global account system thingy thats supposed to make you able to store variables globally (among other things))

Already exists, as already explained, but still now people have choices what to use :P its called competition to make a better "product" (but for such a simple thing, I guess its not much of a competition :P)
Title: Re: Team Chat
Post by: dnmr on November 04, 2010, 09:09:42 am
well, dynamic arrays have been decreasing server stability from my experience. And from not only mine iirc.
Also, if you're addicted to C++ and stuff, you might want to optimize this code too by using simple copy() instead of the obviously slower getpiece()
Title: Re: Team Chat
Post by: Hacktank on November 04, 2010, 12:47:49 pm
Updated.

Removed use of arrays.
Added functionality for as many lines of text as entered (so arsse users can send a whole long paragraph if they desire)

I may add some kind of intelligent splitting later. :)
Title: Re: Team Chat
Post by: mascarado on November 04, 2010, 04:37:58 pm
Ha Ha, Very Very Good Hack.  ;D
Title: Re: Team Chat
Post by: Corporal Dunn on November 04, 2010, 04:44:25 pm
Ha Ha, Very Very Good Hack.  ;D

Wrong thread.

And wrong forum.
Title: Re: Team Chat
Post by: Hacktank on November 04, 2010, 05:03:45 pm
Ha Ha, Very Very Good Hack.  ;D

Wrong thread.

And wrong forum.
Is your post supposed to be a mindf*ck? Because it worked :S

@masc, thank you.
Title: Re: Team Chat
Post by: Bonecrusher on November 05, 2010, 01:34:03 pm
Quote from: Hacktank
Is your post supposed to be a mindf*ck? Because it worked :S

@masc, thank you.

Check his avatar its clearly visible he is using the well known internet meme 'The trollface' however his trolling level is below 0 so we dont have to worry about him.