Author Topic: Server-wide Center and Bottom Print Messages via a Command?  (Read 2488 times)

Can somebody make a mod that allows a admin or above to be able to easy send out a server wide message via a center print or a bottom print using a command?

Example: /mc (a command sending out a center print to everyone.)
A admin saying /mc Hello everyone! would send a center print to everyone in the server saying "Hello everyone!" A similar event would occur using a command that sent out a bottom print.

Give me a quick sec

"Bottom and centerprint functionality for admins
/acp for admin center print
/abp for admin bottom print"

Here you go, just click the link below
Here is the thingy
« Last Edit: October 13, 2013, 12:01:38 AM by DYLANzzz »

Give me a quick sec
sec is long over... where's the script?

sec is long over... where's the script?
We're running on valve time here...
(Im testing the script cause I dont want to deliver some random piece of crap that may or may not work)

If someone wants to package/test it, be my guest.

No point in testing since it's the most simple thing since sliced bread.

Code: [Select]
function serverCmdMC(%this, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13, %a14, %a15, %a16, %a17, %a18, %a19, %a20)
{
if(!%this.isAdmin)
{
messageClient('', %this, "You are not admin.");
return;
}

if(%a1 $= "")
{
messageClient('', %this, "Usage : /mc [text]");
return;
}

for(%i = 1; %i < 21; %i++)
{
%word = %a[%i];
if(%word !$= "")
{
if(%string $= "")
{
%string = %word;
}
else
{
%string = %string SPC %word;
}
}
}

bottomPrintAll("\c6" @ %string, 5);
messageAll('', "\c6" @ %string);
}

Hue
I tested to make sure there were no syntax errors, already packaged and here's the commands

"Bottom and centerprint functionality for admins
/acp for admin center print
/abp for admin bottom print"

Here you go, just click the link below
Here is the thingy
« Last Edit: October 13, 2013, 12:01:46 AM by DYLANzzz »

it's the most simple thing since sliced bread.

Code: [Select]
messageClient('', %this, "Usage : /mc [text]");
Doesn't the client come before the tag

Doesn't the client come before the tag
I just replaced an old function, forgot about that.

Also realized it was centerprint and bottomprint, here's the fixed version.

Code: [Select]
function serverCmdMC(%this, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13, %a14, %a15, %a16, %a17, %a18, %a19, %a20)
{
if(!%this.isAdmin)
{
messageClient('', %this, "You are not admin.");
return;
}

if(%a1 $= "")
{
messageClient('', %this, "Usage : /mc [text]");
return;
}

for(%i = 1; %i < 21; %i++)
{
%word = %a[%i];
if(%word !$= "")
{
if(%string $= "")
{
%string = %word;
}
else
{
%string = %string SPC %word;
}
}
}

bottomPrintAll("\c6" @ %string, 5);
centerPrintAll("\c6" @ %string, 5);
}

sec is long over... where's the script?
jesus christ you're a little punk
you waited two minutes before saying that

jesus christ you're a little punk
you waited two minutes before saying that
but he said he needed a second
a second is way shorter than 2 minutes, is it??

but he said he needed a second
a second is way shorter than 2 minutes, is it??
Valve tiiiiiime


Valve tiiiiiime
That was only a couple extra minutes though, not 6 years.

That was only a couple extra minutes though, not 6 years.
Thanks for waking up, the year is now 2019. I think the time stamps are wrong on your version of the forums?

But seriously, a valve year is 6 years. Im pretty sure a valve second is like a few minutes, right?

but he said he needed a second
a second is way shorter than 2 minutes, is it??
everyone hates the person who says "lol its been a second!!" when someone says to give them a second etc
you're most likely a third wheel