[REQ]color script
#1
hi all

when i type " 3" ( you cant see the color character) at the begin of a message or at a button for in the menu my text will be red, " 4" is grey (i think) so i wanted to make a script for it. end up with this:

alias red [say 3(you cant see the color character)  $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8]

al those $arg's are for words...
i'dd like to have a fix on this, having a string instead of $arg's but i dont know cubescripts verry well :(

then i want a weapon switching script: when i have a sniper i switch to the pistol and when i have the pistol i switch to the sniper, binded on Q, cuz 2 and 1 ( to switch weapons) are to far away, right now i have this:

bind q [weapon 1]

verry simple, but i would be much beter to make it switch back also :D
Thanks given by:
#2
EDIT::
Im pretty sure you could use concat

red = [r (colour number and symbol without these parentheses); say (concat $r "STRING HERE")]

Number 2:

bind "q" [if (= (curweapon) 4) [secondary] [primary]]

Dont know the wep numbers for 1.1.0.1
Change the 4 till it works with sniper ;)
Thanks given by:
#3
Custom colours are only client sided. And it's much easier to just press Ctrl + L + colour number to get the colour you want.
bind q [ if $editing [ domodifier 1 ] [if (= (curweapon) 6) [secondary] [primary]]]
Thanks given by:
#4
Pff. Editing crap.
Thanks given by:
#5
alright, the weapon switch worked good but the color script not, when i typed /red blabla it said (in green) 2 STRING HERE. do i need to make another $arg for the string?
Thanks given by:
#6
Just press Ctrl + L + colour code number.
Thanks given by:
#7
--' i requisted a script :P
do i have to put a message in STRING HERE, instead off typing /red message blabla?
Thanks given by:
#8
alias red [saycommand 3]
Put the colour code before the "3"
Or if you just want a command,
alias redd [say (concat 3 $arg1)]
Use /redd "What you want to say, literally in quotes"

Still, you'll be the only one that sees it. Colours aren't sent to the server.
Thanks given by:
#9
huge fix, kinda big but it works without any problems
all credit goes to |HP| :D
alias red [
alias color " 3";
if (>= $numargs 1) [
alias color (concat $color $arg1);
if (>= $numargs 2) [
alias color (concat $color $arg2);
if (>= $numargs 3) [
alias color (concat $color $arg3);
if (>= $numargs 4) [
alias color (concat $color $arg4);
if (>= $numargs 5) [
alias color (concat $color $arg5);
if (>= $numargs 6) [
alias color (concat $color $arg6);
if (>= $numargs 7) [
alias color (concat $color $arg7);
if (>= $numargs 8) [
alias color (concat $color $arg8);
if (>= $numargs 9) [
alias color (concat $color $arg9);
if (>= $numargs 10) [
alias color (concat $color $arg10);
if (>= $numargs 11) [
alias color (concat $color $arg11);
if (>= $numargs 12) [
alias color (concat $color $arg12);
if (>= $numargs 13) [
alias color (concat $color $arg13);
if (>= $numargs 14) [
alias color (concat $color $arg14);
if (>= $numargs 15) [
alias color (concat $color $arg15);
if (>= $numargs 16) [
alias color (concat $color $arg16);
if (>= $numargs 17) [
alias color (concat $color $arg17);
if (>= $numargs 18) [
alias color (concat $color $arg18);
if (>= $numargs 19) [
alias color (concat $color $arg19);
if (>= $numargs 20) [
alias color (concat $color $arg20);
]
]
say $color;
]
Thanks given by:
#10
kinda pointless if no one but you can see it :D
Thanks given by:
#11
lol like you said, green gets boring on a moment...maybe theres a way to make it highlight messages...ot every player his own color...:D
Thanks given by:
#12
For the weapon: USE THE SCROLL ON YOUR MOUSE ¬¬
Thanks given by:
#13
Did somebody say universaldelta?
Thanks given by: