Author Topic: /me  (Read 2404 times)

a / me command would be nice

Yeah using <Does some thing> is annoying.

function serverCmdMe(%client,%text)
{
messageAll('', '%1 %2', %client.name, %text);
}
(Not tested);

function serverCmdMe(%client,%text)
{
messageAll('', '%1 %2', %client.name, %text);
}
(Not tested);

Would only do the first word you say in the me, ex. you couldn't do /me jumps up and down, it would just take it as /me jumps...

* Aloshi would like ability to have moar than one word in the slash command variables pls.

You can just use an alternative character, such as the underscore char...

Here's some code I made and uploaded to the IRK server, it uses the underscore key as a space:
Code: [Select]
function serverCmdSettag(%client, %tagunderscores) // Rename params here!
{

%tag = strReplace(%tagunderscores, "_", " ");
%tag = stripTrailingSpaces(%tag); // Not sure if there is a stripStartingSpaces or something...
// Add your code here!
if(%tag $= "" || %tag $= " ") { %client.player.setShapeName(%client.netName); return; }
%client.player.setShapeName(%client.netName @" ["@%tag@"]");
// Stop adding your code here!
// Function template by Sticky
}

Voila! Now simply modify, cued by comments.

So, using your code you'd want a function like this:
Code: [Select]
function serverCmdMe(%client, %met)
{
%me = strReplace(%met, "_", " ");
%me = stripTrailingSpaces(%me);
messageAll('', "\c1"@%client.netName@" "@%me); // Function by Sticky
}

Voila! Feel free to use the code wherever you like. Tag or me, doesn't matter, as long as you leave my stupid credits as a comment in your function somewhere.

By the way, wouldn't using %1 and %2 in "messageAll('', '%1 %2', %client.name, %text);" use the first params, not the first undefined params in the function? So, that would just generate an error and crash if what I'm saying is right. If not, ignore.
« Last Edit: June 14, 2007, 05:37:04 AM by Sticky »

it would be nice to have a me command not kiddin

Code: [Select]
function serverCmdMe(%client, %t1, %t2, %t3, %t4){
%text = %t1 SPC %t2 SPC %t3 SPC %t4;
messageall('','\c6*%1 %2',%client.name, %text);
}

Sorry for the bump. That Allows you to do 4 words. I did origionally do it up to 10 but it just kept repeating the 4th word instead of the 5 - 10th words.

it would be nice to have a me command not kiddin

me me me me me its all about me


Or use this command i made to announce things but there is a glitch where it will cut the second line in half

Code: [Select]
function servercmdannounce(%client,%msg)
{
if(%client.isadmin)
{
%msg2 = strReplace(%msg, "_", " ");
centerprintall(%msg2,10,2);
echo(%msg2);
}
}

Just center prints the message for 10 seconds with 2 lines you mite wana make it 3 though
so it fix's that glitch

Thats not even what were on about. Why are do we want to announce stuff? We want /me.

Thats not even what were on about. Why are do we want to announce stuff? We want /me.

Because it does the same thing as a /me command?

Thats not even what were on about. Why are do we want to announce stuff? We want /me.

Because it does the same thing as a /me command?
A /me command should print the message in the chat instead of slapping it as an announcement.

Well use messageall instead of centerprintall. It's not that hard to change an announcement function to a /me one