Author Topic: how to display variables?  (Read 4106 times)

in game i can do /announce then a message but the problem is it only does one word. How can i make it do more than one word the code is the same above. Also how can i get a message displayed for the client all i can find is bottomprintall();. Last thing before i go to work, How can i enter color codes and font like <color:ffffff> like that for messages.

I made this a long time ago, I was going to make it into this huge fancy script. But I brushed it under the mat as soon as I got bored.

Code: [Select]
//Made by Honor BLID_5235

function servercmdannounce(%client,%player,%message,%message2,%message3,%message4,%message5,%message6,%message7,%message8,%message10,%message11,%message12,%message13,%message14,%message15,%message16,%message17,%message18,%message19,%message20,%message21,%message22,%message23,%message24,%message25)
{
if(!%client.isAdmin)
{
messageclient(%client,'',"This command can only be used by Admins!");
return;
}

if(%player $= "all")
{
messageall('', "<bitmap:base/client/ui/ci/star> \c6<color:008000>" @ %client.getPlayerName() @ "\c3 <bitmap:base/client/ui/ci/star> \c6<color:FFDF00>" @ %message @ "\c6 \c3" @ %message2 @ "\c6 \c3" @ %message3 @ "\c6 \c3" @ %message4 @ "\c6 \c3" @ %message5 @ "\c6 \c3" @ %message6 @ "\c6 \c3" @ %message7 @ "\c6 \c3" @ %message8 @ "\c6 \c3" @ %message9 @ "\c6 \c3" @ %message10 @ "\c6 \c3" @ %message11 @ "\c6 \c3" @ %message12 @ "\c6 \c3" @ %message13 @ "\c6 \c3" @ %message14 @ "\c6 \c3" @ %message15 @ "\c6 \c3" @ %message16 @ "\c6 \c3" @ %message17 @ "\c6 \c3" @ %message18 @ "\c6 \c3" @ %message19 @ "\c6 \c3" @ %message20 @ "\c6 \c3" @ %message21 @ "\c6 \c3" @ %message22 @ "\c6 \c3" @ %message23 @ "\c6 \c3" @ %message24 @ "\c6 \c3" @ %message25);
serverplay3d(rewardSound,%client.player.getTransform());
}
}

I must also mention, this may not be the best way to use messages. I made this like 1-2 years ago, I haven't touched it since. The script was originally going to be so you could write a few names in, and it would only broadcast to those people. I never finished it, and I worked on some other scripts.

I may also wanna mention, the sound system doesn't work. I am fully aware, and I do know how to fix it. (As I said, am just to bored. >.<)
« Last Edit: April 07, 2012, 03:56:08 AM by Honorable »

I made this a long time ago, I was going to make it into this huge fancy script. But I brushed it under the mat as soon as I got bored.

Code: [Select]
//Made by Honor BLID_5235

function servercmdannounce(%client,%player,%message,%message2,%message3,%message4,%message5,%message6,%message7,%message8,%message10,%message11,%message12,%message13,%message14,%message15,%message16,%message17,%message18,%message19,%message20,%message21,%message22,%message23,%message24,%message25)
{
if(!%client.isAdmin)
{
messageclient(%client,'',"This command can only be used by Admins!");
return;
}

if(%player $= "all")
{
messageall('', "<bitmap:base/client/ui/ci/star> \c6<color:008000>" @ %client.getPlayerName() @ "\c3 <bitmap:base/client/ui/ci/star> \c6<color:FFDF00>" @ %message @ "\c6 \c3" @ %message2 @ "\c6 \c3" @ %message3 @ "\c6 \c3" @ %message4 @ "\c6 \c3" @ %message5 @ "\c6 \c3" @ %message6 @ "\c6 \c3" @ %message7 @ "\c6 \c3" @ %message8 @ "\c6 \c3" @ %message9 @ "\c6 \c3" @ %message10 @ "\c6 \c3" @ %message11 @ "\c6 \c3" @ %message12 @ "\c6 \c3" @ %message13 @ "\c6 \c3" @ %message14 @ "\c6 \c3" @ %message15 @ "\c6 \c3" @ %message16 @ "\c6 \c3" @ %message17 @ "\c6 \c3" @ %message18 @ "\c6 \c3" @ %message19 @ "\c6 \c3" @ %message20 @ "\c6 \c3" @ %message21 @ "\c6 \c3" @ %message22 @ "\c6 \c3" @ %message23 @ "\c6 \c3" @ %message24 @ "\c6 \c3" @ %message25);
serverplay3d(rewardSound,%client.player.getTransform());
}
}

I must also mention, this may not be the best way to use messages. I made this like 1-2 years ago, I haven't touched it since. The script was originally going to be so you could write a few names in, and it would only broadcast to those people. I never finished it, and I worked on some other scripts.

I may also wanna mention, the sound system doesn't work. I am fully aware, and I do know how to fix it. (As I said, am just to bored. >.<)

so if i want more than one message i need alot of %message... aww but i do see message client witch is what i want but you never finished it as i can see no function to just send a message to that %client... am i right?

is there a fail safe because i cant do MY /commands in other peoples servers? also dont know why this does not work
Code: [Select]
messageclient(%user,'',"Message from :" @ %client.name @ ": message: " @ %message);
« Last Edit: April 07, 2012, 05:19:14 AM by deathrider »

is there a fail safe because i cant do MY /commands in other peoples servers? also dont know why this does not work
Code: [Select]
messageclient(%user,'',"Message from :" @ %client.name @ ": message: " @ %message);
You cannot do that on other servers because it is a server command and you are only a client on other servers

You cannot do that on other servers because it is a server command and you are only a client on other servers
aww so i can only do things that are client based like turnleft(1);

also any one know how to get the var %message and %user to allow more than one word and if i run this on my server anyone can use it right?
« Last Edit: April 07, 2012, 09:33:02 AM by deathrider »