Author Topic: Slash Commands  (Read 947 times)

Hey guys,

I need some help on a simple command, I need to know 2 things. I need to know how to make a slash command make a sound, for example; I say "/cry" and it plays a sound. Also how would I make a slash command go like; "/cry" and it plays a sound and says a client message like "You Cried".

-Thanks

I don't know if this is what you mean but...

function serverCmdScared(%client)
{
     serverCmdAlarm(%client);
     commandToClient(%client, 'centerPrint', "\c6You got scared.", 3);
}

function servercmdcry(%client)

I don't know if this is what you mean but...

function serverCmdScared(%client)
{
     serverCmdAlarm(%client);
     commandToClient(%client, 'centerPrint', "\c6You got scared.", 3);
}

Thanks a lot.

I don't know if this is what you mean but...

function serverCmdScared(%client)
{
     serverCmdAlarm(%client);
     commandToClient(%client, 'centerPrint', "\c6You got scared.", 3);
}

How would I make the text display as a chat message only to that one player, so instead of centerPrint i put in ChatMessage and that did not work...

messageClient(%client,'',"\c6You got scared!");


messageClient(%client,'',"\c6You got scared!");

Im so sorry that I suck at scripting but, 2 more things. One, do you know what all the colors are (So \c1 is something, \c2 is something.) and two, how can I make a line, would I have to add another message cleint?

« Last Edit: February 09, 2010, 05:09:33 PM by joey888joey »

function serverCmdHelpCoins(%client)
{
     messageClient(%client,'',"\c6You can see your money at the bottom of the screen, you can put your money in the bank and also transfer money there. Your money is automatically saved. To give someone money you must face them, look up (at about a 45 degree angle) and say "/drop [amount]"");
}

function serverCmdHelpTools(%client)
{
     messageClient(%client,'',"\c6To get tools you have to have money and go to a tool store (one in each city and other locations) and find the item you want. To find out the price press "?" and to buy it press "O", if you do not have enough money you will not be able to buy it.");
}

function serverCmdHelpWeapons(%client)
{
     messageClient(%client,'',"\c6To get weapons you have to have money and go to a armory or archery store (one in each city and other locations) and find the weapon you want. The price is found on top of the weapon (except in small stores, you would press "?") and to buy it press the red button (except in small stores, you would press "O"), if you do not have enough money you will not be able to buy it.");
}

Here is the problem. You cannot use "s in the middle of a string. It'll cause syntax errors.
If you want to use "s in the middle of a string, use \"
Example
messageClient(%client,'',"The dog says \"Moo.\"");

Here is the problem. You cannot use "s in the middle of a string. It'll cause syntax errors.
If you want to use "s in the middle of a string, use \"
Example
messageClient(%client,'',"The dog says \"Moo.\"");

Ok thanks a lot... Helped me a lot...

« Last Edit: February 10, 2010, 01:30:53 PM by joey888joey »