Author Topic: Need help with making a command  (Read 1379 times)

hi
I wish to make a /meme command but i have to idea where to start
I want it to just put some customization text into the chat when someone types /meme

OR

It can open a link/play a sound client sided.

Your basic function will be

function serverCmdMeme(%cl)
{
       //code to be executed when you run the command
}

Announce("message"); will message the entire server, while messageClient(%cl,"","message"); will message the individual client. You can use <color:RRGGBB> to color the text, and <font:fontName:size> to size the font. Also escape codes (ie \c2, \c4) are supported

if you want to do audio you have to create a sound datablock and do something like serverPlay3D(datablock, loc)
« Last Edit: October 17, 2016, 10:32:54 PM by Hawt »

if you want to do audio you have to create a sound datablock and do something like serverPlay3D(datablock, loc)

He wants client-sided sound, so he can do %cl.play2d(datablock) instead. Not entirely sure about what arguments play2d accepts, but it can't be more than the sound datablock.

Also escape codes (ie \c2, \c4) are supported

These are called color codes. You're right on the other functions.

These are called color codes. You're right on the other functions.
Those ones are color codes but any other thing like \t, \", \', \r, \n are escape character/codes that do different stuff (except for the \" and \')

He wants client-sided sound, so he can do %cl.play2d(datablock) instead. Not entirely sure about what arguments play2d accepts, but it can't be more than the sound datablock.
oh im blind rip

if its clientsided you can define a clientcmd instead of a servercmd but a server can use that command against you so you'll need a way to see if you're doing the command or smth
« Last Edit: October 20, 2016, 12:09:13 AM by Hawt »

These are called color codes. You're right on the other functions.
Every time you correct me on something code-wise that holds no significance, I hate you a tad bit more

keep going. i'm chalking it up

Every time you correct me on something code-wise that holds no significance, I hate you a tad bit more

keep going. i'm chalking it up

Isn't it a good thing to help one another to not repeat mistakes? You can correct me whenever I am wrong, I assure you.

Though you seem to be a hate seeker so perhaps you don't mind.

Those ones are color codes but any other thing like \t, \", \', \r, \n are escape character/codes that do different stuff (except for the \" and \')

Oh. Makes sense.
« Last Edit: October 20, 2016, 04:41:52 AM by Marios »

Every time you correct me on something code-wise that holds no significance, I hate you a tad bit more

keep going. i'm chalking it up
dude chill lol

don't take things so personally. people here generally dont carry agendas when responding to posts

Isn't it a good thing to help one another to not repeat mistakes? You can correct me whenever I am wrong, I assure you.

Though you seem to be a hate seeker so perhaps you don't mind.
Theres a difference between making a mistake and being corrected, and being right and still being corrected on a nuance.

I could say "echo();" is a function that writes something to the console and you're the type of person to say "actually its a function that prints a message in the console"

I dont hate you, but its actually starting to get a little bit annoying. Just chill with it a bit okay? If i make a legit mistake feel free to correct me, but I dont need to be lectured on how i'm mostly right but wrong on the most insignificant level

dude chill lol

don't take things so personally. people here generally dont carry agendas when responding to posts
Sorry I didn't mean to come off as an starfish, im just a tad bit annoyed

I could say "echo();" is a function that writes something to the console and you're the type of person to say "actually its a function that prints a message in the console"

I didn't know escape codes were a thing until Kyuande cleared it up.

I didn't know escape codes were a thing until Kyuande cleared it up.
dont worry, just ignore me. im a richard sometimes