Raised This Month: $51 Target: $400
 12% 

client config problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RTG
Senior Member
Join Date: Aug 2010
Location: CZ
Old 12-30-2014 , 16:24   client config problem
Reply With Quote #1

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?
RTG is offline
Send a message via ICQ to RTG Send a message via AIM to RTG
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-30-2014 , 16:46   Re: client config problem
Reply With Quote #2

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.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
silentscope
Junior Member
Join Date: Jul 2011
Old 12-31-2014 , 03:31   Re: client config problem
Reply With Quote #3

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
silentscope is offline
RTG
Senior Member
Join Date: Aug 2010
Location: CZ
Old 12-31-2014 , 12:19   Re: client config problem
Reply With Quote #4

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?
RTG is offline
Send a message via ICQ to RTG Send a message via AIM to RTG
silentscope
Junior Member
Join Date: Jul 2011
Old 12-31-2014 , 12:43   Re: client config problem
Reply With Quote #5

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"
silentscope is offline
RTG
Senior Member
Join Date: Aug 2010
Location: CZ
Old 01-01-2015 , 12:45   Re: client config problem
Reply With Quote #6

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)

Last edited by RTG; 01-01-2015 at 12:48. Reason: ..ah.. gramatics..
RTG is offline
Send a message via ICQ to RTG Send a message via AIM to RTG
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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