AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   client config problem (https://forums.alliedmods.net/showthread.php?t=254149)

RTG 12-30-2014 16:24

client config problem
 
Hello,
first of all, I don't realy know if you will help me on this forum with my problem, because it is not related to amx. So if it is not possible then excuse my fault please.
So, I will try to explain my problem.
In my client (game counter strike 1.6) config.cfg I would like to bind on keys change of colors of crosshair. The problem is, the console (or something.. maybe the engine is made up this way) doesn't take more numeric parameters except one - the first one in a row. I tried an alias feature, but it doesn't work at all.

First I tried this:
Code:

alias b1 "255 255 255"
alias cr1 "cl_crosshair_color b1"
bind K "cr1"

However, the alias doesn't take numbers, so the b1 is empty, or equal to zero, so my crosshair color was zero - black color

I also tried this:
Code:

alias cr1 "cl_crosshair_color "255 50 50""
bind K "cr1"

In this case, the game took only the first numeric parameter and the other two was thrown away, so the console got only cl_crosshair_color 255 and because of missing other parameters, it was filled by zeroes, just like "255 0 0"
Also I am confused from the syntax - two symbols " and it worked a little anyway

Could anyone help me please?

Powerlord 12-30-2014 16:46

Re: client config problem
 
Not sure how it works in CS 1.6, but in CSS, crosshair colors work like this:

Code:

cl_crosshairalpha                        : 200      : , "a", "cl"      :
cl_crosshaircolor                        : 0        : , "a", "cl"      : Set crosshair color: 0=green, 1=red, 2=blue, 3=yellow, 4=cyan, 5=custom
cl_crosshaircolor_b                      : 50      : , "a", "cl"      :
cl_crosshaircolor_g                      : 250      : , "a", "cl"      :
cl_crosshaircolor_r                      : 50      : , "a", "cl"      :
cl_crosshairdot                          : 0        : , "a", "cl"      :
cl_crosshairscale                        : 0        : , "a", "cl"      : Crosshair scaling factor (deprecated)
cl_crosshairsize                        : 9        : , "a", "cl"      :
cl_crosshairspreadscale                  : 0        : , "a", "cl"      :
cl_crosshairthickness                    : 0        : , "a", "cl"      :
cl_crosshairusealpha                    : 0        : , "a", "cl"      :

In other words, you have to set cl_crosshaircolor to 5 before you can set the three color cvars for a custom color.

silentscope 12-31-2014 03:31

Re: client config problem
 
i think you can use commandmenu for changing crosshair color and bind "+commandmenu;wait;slot1;"
not sure about that, but i would definitely go this way

RTG 12-31-2014 12:19

Re: client config problem
 
Well, in CS 1.6 there are only these cvars for crosshair:
cl_crosshair_color "R G B" (where R G B are numbers separated by space, e.g. 50 255 50)
cl_crosshair_size
cl_crosshair_translucent

and also quite interesting command
Code:

adjust_crosshair
I have binded this command to a ky on my mouse and it changes the color automatically, it has got preset values, maybe 5, and when I suddenly can't see the crosshair because of similiar textures in a map, I can use this, but there are values such as 50 250 250 and it is not as good to differ from another colors in a map, compared to 0 255 255 - this is very bright and contrast color, but I have to set it manually...

to use the commandmenu, what I have to do? Install amxmodx to my client?

silentscope 12-31-2014 12:43

Re: client config problem
 
the easiest way i found is just to create separated config files with the colors you need:
red.cfg with cl_crosshair_color "255 0 0"
green.cfg with cl_crosshair_color "0 255 0"

bind "button1" "exec red.cfg"
bind "button2" "exec green.cfg"

RTG 01-01-2015 12:45

Re: client config problem
 
Oh yeah, that's pretty cool! It's quite intriguing that I didn't get such an idea earlier. It can be due to my different contemplation about the solution. Well, I gratefully thank you!
(and excuse my probable bad english, my CZ-EN dictionary is still very used)
:)


All times are GMT -4. The time now is 00:59.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.