| Blockland Forums > Suggestions & Requests |
| /me |
| (1/3) > >> |
| Ladios:
a / me command would be nice |
| Packer:
Yeah using <Does some thing> is annoying. |
| Game master pro:
function serverCmdMe(%client,%text) { messageAll('', '%1 %2', %client.name, %text); } (Not tested); |
| Aloshi:
--- Quote from: Game master pro on June 13, 2007, 04:23:58 AM ---function serverCmdMe(%client,%text) { messageAll('', '%1 %2', %client.name, %text); } (Not tested); --- End quote --- 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. |
| Sticky:
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: ---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 } --- End code --- Voila! Now simply modify, cued by comments. So, using your code you'd want a function like this: --- Code: ---function serverCmdMe(%client, %met) { %me = strReplace(%met, "_", " "); %me = stripTrailingSpaces(%me); messageAll('', "\c1"@%client.netName@" "@%me); // Function by Sticky } --- End code --- 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. |
| Navigation |
| Message Index |
| Next page |