AvaMods 5.o Forums (https://forums.avamods.com/)
-   Media Dump (https://forums.avamods.com/media-dump/)
-   -   DOT xhair sprites. (https://forums.avamods.com/media-dump/524-dot-xhair-sprites.html)

santa_sh0t_tupac December 31st, 2006 11:04 PM

DOT xhair sprites.
 
1 Attachment(s)
This is a .spr file which contains 16 different colored DOTS for xhairs. Put it in your /steam/steamapps/YOURNAME/day of defeat/dod/sprites folder. I've also included a simple toggle script to scroll through the sprites. You can put it in your /steam/steamapps/YOURNAME/day of defeat/dod/userconfig.cfg file to load whenever DOD launches. NOTE: Setting cl_xhair_style to 0 should make it the original game sprite you selected. ;d

Code:

alias xhair "xtog1"
alias xtog0 "gl_spriteblend 1; cl_xhair_style 0; alias xhair xtog1"
alias xtog1 "gl_spriteblend 0; cl_xhair_style 1; alias xhair xtog2"
alias xtog2 "gl_spriteblend 0; cl_xhair_style 2; alias xhair xtog3"
alias xtog3 "gl_spriteblend 1; cl_xhair_style 3; alias xhair xtog4"
alias xtog4 "gl_spriteblend 1; cl_xhair_style 4; alias xhair xtog5"
alias xtog5 "gl_spriteblend 1; cl_xhair_style 5; alias xhair xtog6"
alias xtog6 "gl_spriteblend 1; cl_xhair_style 6; alias xhair xtog7"
alias xtog7 "gl_spriteblend 0; cl_xhair_style 3; alias xhair xtog8"
alias xtog8 "gl_spriteblend 0; cl_xhair_style 4; alias xhair xtog9"
alias xtog9 "gl_spriteblend 0; cl_xhair_style 5; alias xhair xtog10"
alias xtog10 "gl_spriteblend 0; cl_xhair_style 6; alias xhair xtog11"
alias xtog11 "gl_spriteblend 1; cl_xhair_style 7; alias xhair xtog12"
alias xtog12 "gl_spriteblend 1; cl_xhair_style 8; alias xhair xtog13"
alias xtog13 "gl_spriteblend 1; cl_xhair_style 9; alias xhair xtog14"
alias xtog14 "gl_spriteblend 1; cl_xhair_style 10; alias xhair xtog15"
alias xtog15 "gl_spriteblend 0; cl_xhair_style 11; alias xhair xtog16"
alias xtog16 "gl_spriteblend 0; cl_xhair_style 12; alias xhair xtog17"
alias xtog17 "gl_spriteblend 0; cl_xhair_style 13; alias xhair xtog18"
alias xtog18 "gl_spriteblend 0; cl_xhair_style 14; alias xhair xtog19"
alias xtog19 "gl_spriteblend 1; cl_xhair_style 15; alias xhair xtog20"
alias xtog20 "gl_spriteblend 0; cl_xhair_style 16; alias xhair xtog0"

bind w xhair

DL the following:
Attachment 36


I DID NOT MAKE THE SPRITES OR THE SCRIPT. They were ganked from some old ass forum listing and I wish I had paid more attention to who created it. Props to that nigger.

EDIT: Make sure you bind xhair to a key you want...so if you wanted it to be your p key..it would be:
Code:

bind p xhair

iTzAleX{n00bish} January 1st, 2007 01:21 AM

copy everything in quotes right?

coltron January 2nd, 2007 04:00 AM

Quote:

Originally Posted by iTzAleX{n00bish} (Post 4612)
copy everything in quotes right?

alex youre a retard

santa thanx for the new crosshairs i fucking love it.

diamond-optic January 2nd, 2007 09:14 AM

ive used those before.. tho i think i recall the dots being a bit larger then i'd like

these are the ones i use: CLICK

..and with those i usually use the small white dot..

and you all know how much i own :-P lol

xxkrissixx January 3rd, 2007 07:55 AM

I use the same ones and i suck.... however, I dont get the white dot.. thanks dia :rolleyes:

Morgenroete January 3rd, 2007 05:29 PM

There is a down side to the dot xhair, tht is it does not give you as much information as the cross hair. The cross xhair can be used as a ranging tool for the rocket launcher, and it also tells you when your aim has settled when you've stopped running/jumping.

But it's still a good xhair, nice job.

REDRUM January 5th, 2007 12:42 AM

how do u save your config.. every time i close day of defeat it erases the code.. so i have to keep putting the code back on my userconfig.cfg

Jonny Automatic January 5th, 2007 01:37 PM

read only?

iTzAleX{n00bish} January 5th, 2007 09:30 PM

can sum1 tell me how to put it in a folder and wutever

lik how do i put /steam/steamapps/YOURNAME/day of defeat/dod/sprites folder in?

diamond-optic January 5th, 2007 10:32 PM

how do you make the folder???

if thats what your asking...

then i must say.. ARE YOU SERIOUS!!

REDRUM January 6th, 2007 03:37 AM

Quote:

Originally Posted by Jonny Automatic (Post 4725)
read only?

how do i do that though... wait nm.. duh.. i just remebered.. thanks

Jonny Automatic January 6th, 2007 12:55 PM

dunno if it will fix... but it seemed a good idea..

coltron January 6th, 2007 02:36 PM

Quote:

Originally Posted by iTzAleX{n00bish} (Post 4754)
can sum1 tell me how to put it in a folder and wutever

lik how do i put /steam/steamapps/YOURNAME/day of defeat/dod/sprites folder in?


you replace the .spr

stop eating paint.

iTzAleX{n00bish} January 8th, 2007 04:47 PM

yea mostly i never had a computer class in grade or middle school...

HAWKEYE January 8th, 2007 08:43 PM

i am freakin comp illiterate someone help me >.<:confused: withe crosshairs thing.

REDRUM January 10th, 2007 10:16 PM

this is funny.. lol..

Sapphyre February 14th, 2007 01:06 PM

I'm bloody clueless at this

I've done the first bit placing CustomXHair.spr into the right folder

so...

1. How do I download or save this userconfig.cfg? Am I meant to create a notepad for it?

2. What does bind a key ingame to "xtog" mean?

coltron February 14th, 2007 01:14 PM

for usercfg.cfg you make that file in notepad yes.. save all that xtog crap in it.

then you go in your console in game, and type bind "key" xtog. that lets you cycle throught the different ones.

santa_sh0t_tupac February 14th, 2007 11:51 PM

Here we go.
 
Quote:

Originally Posted by Emerald
What does bind a key ingame to "xtog" mean?

Ok. Quick breakdown of the XTOG script and a mini-script lesson while we're at it. I will assume a basic knowledge of computers and concepts (such as VARIABLES).

Code:

alias xtog "xtog1"
alias xtog0 "gl_spriteblend 1; cl_xhair_style 0; alias xtog xtog1"
.
.
.
alias xtog20 "gl_spriteblend 0; cl_xhair_style 16; alias xtog xtog0"

ALIAS. The alias command accepts 2 parameters (also called arguments) of the format:
Code:

alias NAME "COMMANDS"
It assigns the "COMMANDS" portion to the function NAME. This simply means that we can access "COMMANDS" by using NAME. The reason we use quotes is to be more specific. It will accept unquoted arguments, however, to BE SURE that you don't include unwanted information, we use the quotation marks as DELIMITERS.

Quote:

de·lim·it·er (dĭ-lĭm'ĭ-tər) Pronunciation Key
n. Computer Science
A character or sequence of characters marking the beginning or end of a unit of data.
EXAMPLE:

Code:

alias CHANGEMYNAME "name MeinGottHasSexyManBoobs"
So whenever I were to use CHANGEMYNAME..it would actually execute the information inside the quotations, which is simply to change your name.

A nice feature of the ALIAS command..is that you can assign it to other ALIAS'ed code blocks!

EXAMPLE:

Code:

alias CHANGEMYNAME "ABC"
alias ABC "name DiamondLooksLikeJesus"

So the first line says -Hey..whenever they use CHANGEMYNAME..they want to execute ABC.- You can see in the 2nd line that ABC holds the command to change a name. So it'd be like:
CHANGEMYNAME ---> execute "ABC" ---> ABC ---> execute "name DiamondLooksLikeJesus"

So the first line of our script file so far:
Code:

alias xtog "xtog1"
***NOTE: Generally, when programming, you want to name variables in a way that makes it easy to figure out what they are. XTOG stands for "X"hair "TOG"gle.***

This line is important. We will use THIS FUNCTION NAME (XTOG) to assign a key to. This key will cycle us through each crosshair. So we want XTOG to execute "xtog1" whenever we call it. Easy enough. On to line 2 (and the subsequent lines):

Code:

alias xtog0 "gl_spriteblend 1; cl_xhair_style 0; alias xtog xtog1"
You see those semi-colons? They act as delimiters for seperate commands. This way we can include multiple commands inside of one code block. So we know that xtog0 is going to execute some commands. What are they? Let's go one by one.

Code:

gl_spriteblend 1;
This piece of code is assigning a value to a variable. More specifically, these variables are called CVARS ("Configuration Variables"). They allow us to set information that the target program uses. In this case, we're setting information for the half-life engine to use. Some CVARS in half-life/HL mods are preceded by IDENTIFIERS. If you see something with "gl_" then you know that variable directly deals with the client side graphics. "sv_" is a server set variable. "cl_" is a client side generic variable. "r_" deals with client side rendering. Here is a comprehensive list of CVARS (though by no means a complete list).

http://commands.planethalflife.games...ds/index.shtml

So we find that gl_spriteblend turns on/off (by specifying a 1 or 0)..well..sprite blending.

Code:

cl_xhair_style 0;
Ah. We know immediately that this is a CVAR..and the preceding identifier is "cl_". This means it's a client side variable. It happens to set the number of the crosshair in your .spr file that you would like to use. A value of "0" here sets your crosshair to the default dod crosshair you had selected.

Code:

alias xtog xtog1
What's going on here? We're re-assigning XTOG? That's right. This is the way you make a toggle script. This will allow us to assign XTOG to one key..then be able to press that one key repeatedly to cycle through commands. We just redirect the original alias to the next bit of code we want to happen whenever the key is pressed. So as it stands..when this piece of code executes..the next time we press the key we bound to XTOG..it will execute XTOG1.

Code:

alias xtog20 "gl_spriteblend 0; cl_xhair_style 16; alias xtog xtog0"
I included this one so you can see the last piece of code that resets the whole cyclic toggle. Specifically:

Code:

alias xtog xtog0
This piece of code will reset your bound XTOG key...and make it execute xtog0 the next time the key is pressed. Thus, the whole thing loops infinitely.

This brings us, finally, to "what does binding 'xtog' to a key mean?" In order to execute all those nifty functions we have...we have to be able to tell the game to do so. We can't just yell at our monitor. Half-life allows you to BIND your keys to different functions. This means that whenever we press that key..it will execute the function(s) we told it to. "xtog" is the function we need to call to make our script cycle through. There are multiple ways of binding keys. For our example, you'll want to put this piece of code somewhere in your USERCONFIG.CFG.

General BIND command format:
Code:

bind "KEY" "COMMANDS"
Generic XTOG BIND.
Code:

bind "KEY" "xtog"
Replace KEY with the KEY you want to use. For example:

Code:

bind "K" "xtog"
This will make it so that when I press K..it will execute "xtog".

*The USERCONFIG.CFG will only execute when a particular game is run. This way we can change bindings depending on our mod. So I can have different CS binds from DOD.*

I hope this helped in some way. If I've confused the tar piss out of you..I apologize. This was a very, very quick explanation with little depth and the assumption you understand certain computer concepts. If you have questions..feel free to PM me. I'll be more specific with more exacting questions.

GO GO GO GO GO GO GO GO GO OWNED.

diamond-optic February 15th, 2007 05:03 PM

i bet that confuses ppl even more lol

santa_sh0t_tupac February 15th, 2007 05:49 PM

Yeah.
 
Yeah. I was definitely afraid that it would. Considering most reference manuals take entire chapters to explain simple things like variables. Ahh well. Hopefully someone understands it ;0

xxkrissixx February 15th, 2007 06:04 PM

:confused: omg i think my brain just popped..

Jonny Automatic February 15th, 2007 07:05 PM

I read the first line and thought "aieeee! itsh ze' programmers bach to hawnt us agaiyn!

I like mr green dot, and thats all I really need to know methinks :lol:

Steve Zissou July 19th, 2007 01:08 PM

I still prefer the default cross hair with dynamics turned off.

Those dynamics are a bunch of hooey, I used to suck (more :P ) when I had those on. I'd wait for the lines to move in, and BAM, dead. I turned them off, and all of a sudden, I'm killing people. I just assume they're solid when I stop - because they usually are. I've tried the dots before and wasn't much of a fan, though that might be from playing with the cross for so long.

I once made a crosshair sprite for the sniper rifle that didn't show the black at all and showed a normal crosshair in the middle. Unfortunately, it was hard as hell to make a shot with it. And it got me banned from a server or two in a matter of two days. I just stick with my good ol' hacks now :)

ucubed July 19th, 2007 03:00 PM

yea dynamics are off...i used to use the second default crosshair (there are more than one defaults) but i recently downloaded some more...i have one really small dot, the smaller than the helmet, plus 2 long lines so it's easier to level out for a headshot =)

Steve Zissou July 19th, 2007 03:35 PM

I've tried that one, or a similar one. The one that has the |i| look to it.

I was trying to make a box one, but couldn't get it to come out right.

ucubed July 19th, 2007 03:36 PM

the one i'm talking about is like ----- o ------

coltron July 19th, 2007 04:08 PM

that sniper sprite isnt illegal. ive been using it forever, with no black

Steve Zissou July 20th, 2007 05:10 PM

It's not illegal, but kind of cheap imo. Plus if people spec you, you'll look a little suspicious.

Jonny Automatic July 21st, 2007 10:05 AM

dont see how you would look suspish if u had colties scope

coltron July 21st, 2007 02:05 PM

its not cheap everyone can do it. and if they cant figure it out.. probably wouldnt do them any good anyways.

diamond-optic July 21st, 2007 05:05 PM

ya.. if someone doesnt know how to put a file in a directory lol.. then using a custom scope in dod is the least of their problems


All times are GMT -4. The time now is 07:15 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.

2005-2006  team cdrive 
2006-2007 AvaMods 0.x
2007-2008 AvaMods 1.x
2008-2012 AvaMods 2.x
2013-2014 AvaMods 3.o
2014-2016 AvaMods 4.o
2016-2025 AvaMods 5.o