(!) Personal crosshair for each weapon (manual)

Jerk

2009-02-11 12:40:28

Hello, ladies and gentlemen. Today i'll teach you how to set your own crosshair to each weapon (thanks 2 <FENIX> and z4kky for help).

First you need to get the "GCFScape" program and open the .gcf file called "source engine". Here you need to open the "scripts" folder and unpack 11 files: "weapon_crowbar.txt", "weapon_stunstick.txt", "weapon_pistol.txt", "weapon_smg1.txt", "weapon_ar2.txt", "weapon_physcannon.txt", "weapon_357.txt", "weapon_rpg.txt", "weapon_shotgun.txt", "weapon_crossbow.txt" and "weapon_frag.txt". Extract 'em all to "scripts" folder located in your "hl2mp" directory (if its not exist, just create it). Then open some file you need to edit (search for weapon name) and find the block called "crosshair". Here is where the fun starts, now its two different ways to set the crosshair.

First way: the pic. You can use every pic you want to set is as crosshair. But since every clanwar plays with "sv_pure 2" command, your pic will be replaced with one called "crosshairs.vtf" located in "source materials.gcf/Sprites", so i not recommend you to use your image as xhair. So, here is the "crosshairs.vtf" pic (i converted it to .png format):

Image.

Choose the xhair you need (let "N" be the number), they are all has width and height equals 24 pics. To set the crosshair you've chosen, paste next text under the "crosshairs" string in .txt file (delete everything in this block first, otherwise it wont works):

Code: Select all

		{
				"file"		"sprites/crosshairs"
				"x"			""
				"y"			""
				"width"		"24"
				"height"	"24"
		}
.
Here you need to fill the "x" and "y" fields. Use the equations x=(X(N)-1)*24 , y=(Y(N)-1)*24 to canculate the coordinates (here X(N) is the string of your xhair, and Y(N) is the coloumn). For example, you've chosen the second crosshair in the third string. So the block will be:

Code: Select all

		{
				"file"		"sprites/crosshairs"
				"x"			"24"
				"y"			"48"
				"width"		"24"
				"height"	"24"
		}
.
And you'll see something like that:

Image.

Same with every weapon you need to change.
Im not recommend you to use the first way for next reason - as you see on previev image, the edges of xhair has been cuted off, so there are only few xhairs that looks good: fourth in second string, third, fourth, fifth in third string. But if you prefer them to use, your work is over here.


Second way: the font file. Yes, you can make your own font file to use in hl2dm, and it wont be replaced with default even with "sv_pure 2". Second way is harder, but if you prefer to use your own xhair, you should read attentively.
First you need to create (or edit) the font file and make some crosshairs you need (i used "Font Creator Program" for this), paste it to C:/WINDOWS/Fonts and to "resource" folders. I just edited the halflife2.ttf font file in the "resource" dir.
Important: you need to edit the name of the font file and the "Family Name" of the font, make sure they are not the halflife2.ttf and HalfLife2, otherwise the game font will be replaced and you'll see your crosshairs instead of weapon icons and stuff!
Image

Now, you created the .ttf font file, named it "mycros" for example and copied it to both directories. If you edited the "halflife2.ttf" file (its easier than create the new one), you'll see something like that (i used some of my crosshairs and one from hl2dmPro):

Image

Now you need to open the "recource" folder located in :\Steam\steamapps\<name>\half-life 2 deathmatch\hl2mp\. Here you will find the "clientscheme.res" file. Open it with "notepad" and find the block called "crosshairs":

Code: Select all

		Crosshairs
		{
			"1"
			{
				"name"		"HalfLife2"
				"tall"		"40"
				"weight"	"0"
				"antialias" "0"
				"additive"	"0"
				"custom"	"1"
				"yres"		"1 10000"
			}
		}
.
Copy the whole block and paste it right below the last "}" symbol, then rename it to "Mycros" and change the font name to "mycros" too (click the image).

Image

Save the "clientscheme.res" file (make backup first), then proceed to the "scripts" folder. Here, open the file you need, find the "crosshair" block and paste this:

Code: Select all

"Mycros"
		{
				"font"		"mycros"
				"character"	"<charname>"
.
Where <charname> is the name of symbol you prefer to use as crosshair. "a" for example.
If you did everything right, you'll see something like that (few examples):

Image
Image
Image.

So, i think its all i wanted to say. Have fun! ;)
Attachments
manual_files.rar
scripts and font i used
(35.07 KiB) Downloaded 161 times

Ghost Dog_TSGK

2009-02-11 13:37:14

This is uhhhh lookin pretty good.

badinfluence

2009-02-11 17:42:54

This would be terrific if I wanted to take the time, but sadly, I'm too lazy.

keefy

2009-02-12 20:34:02

1 step closer to being able to use no weapon models.
But does look hard to do :(

Jelly Fox

2009-02-12 20:40:00

You can do this in Pro mod with the click of a button :D

keefy

2009-02-12 20:55:05

Jelly Fox wrote:You can do this in Pro mod with the click of a button :D
Pro uses the picture way of doing it (.vtf) so they do not work with sv_pure 2

Jelly Fox

2009-03-01 15:56:50

Didn't know that.

Cheers for the info Jerk, it does look a little time consuming but I'll give it a shot on day when I have some free time. :idea:

Deathwish

2009-03-27 02:49:43

keefy wrote:1 step closer to being able to use no weapon models.
But does look hard to do :(
Already achievable even with sv_pure 2.

Jelly Fox

2009-03-27 03:41:35

How?

Jelly Fox

2009-04-05 17:18:57

come on Deathwish enlighten me...

**DDF**

2009-04-12 03:39:34

Jelly Fox wrote:come on Deathwish enlighten me...
] r_drawviewmodel 0
Can't use cheat cvar r_drawviewmodel in multiplayer, unless the server has sv_cheats set to 1.
;)



Jerk's tip to have a different crosshair for each weapon is awesome. But the prob is you can't remove the model without sv_cheats 1 so it cant be used as a unique way to know the current weapon you use ;) And be careful to not mixed the custom skins and the 3D models itselves.

provost

2009-05-05 17:41:29

Jelly Fox wrote:You can do this in Pro mod with the click of a button :D
You can't find people to play with in Pro mod ;(

Jelly Fox

2009-05-05 18:00:34

.conflict wrote:
Jelly Fox wrote:You can do this in Pro mod with the click of a button :D
You can't find people to play with in Pro mod ;(
It's a shame, but people like exploiting exploits rather than fixing them. :(

ninjins

2009-10-06 05:23:04

what exploits? :D

provost

2009-10-06 08:33:21

TiGGy wrote:what exploits? :D
Image

you asked for it son

keefy

2010-11-01 22:24:06

You have to extract the weapon script files from half-life 2 deathmatch.gcf otherwise your shots do not register when you create a listen server.