Page 1 of 1
Different Crosshairs
Posted: Tue Nov 25, 2003 11:33 pm
by InsomniaSNake
I saw this in a cheat menu once, only I deleted it a long time ago but now I want to use it it's gone.
It had the ability to change crosshair, in game you had a menu where you could choose your crosshair and it changed immediatly... Anyone got an idea how they did this?
Posted: Wed Nov 26, 2003 6:47 am
by jv_map
Probably they changed the crosshair urc to get the shader from a cvar.
Posted: Wed Nov 26, 2003 9:40 am
by bdbodger
You can turn the crosshair off and show a menu or should I say a hud item that is the crosshair you want . My bro and I even had a popup menu to select what one you wanted .
Works like this turn off the crosshair and turn show the hud item , the example below was part of a larger menu . ui crosshair 0 turns off the crosshair . Make the tga of the crosshair with an alpha channel so it is transparent and make it 32 x 32 . popmenu 0 removed our menu after you selected your crosshair .
here is part of the crosshair menu
//==================================================
// Crosshair 1
resource
Button
{
name "Default"
rect 63 90 32 32
fgcolor 0.00 0.00 0.00 0.00 //if last # is 0.0 alpha channal is applied
bgcolor 0.00 0.00 0.00 0.00
borderstyle "none"
shader crosshair001 // see shader at bottom of post
// this part is the hud item uses the crosshair001.urc below
stuffcommand "ui_addhud crosshair001; ui_removehud crosshair002; ui_removehud crosshair003; ui_removehud crosshair004; ui_removehud crosshair005; ui_crosshair 0;popmenu 0"
//
clicksound "sound/weapons/fire/mg42burst_01.wav"
}
//==================================================
crosshair001.urc
menu "crosshair001" 32 32 NONE 1
bgcolor 0 0 0 0
align centerx centery
resource
Label
{
name "Default"
rect 0 0 32 32
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.00 0.00 1.00 0.00
borderstyle "NONE"
shader textures/hud/crosshair001 // crosshair001.tga
}
end.
//==================================================
crosshair.shader // for crosshair menu
crosshair001
{
surfaceparm nolightmap
nomipmaps
nopicmip
cull none
{
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
map textures/hud/crosshair001.tga
}
}
Posted: Wed Nov 26, 2003 12:37 pm
by InsomniaSNake
Wow Really Impressive work, sounds complicated but I am willing to try it out. Thanks a lot, hope it works.
Posted: Wed Nov 26, 2003 12:37 pm
by InsomniaSNake
If that's the only method to do so then there is no way you can make a bloodpatch go on and off can there?
Posted: Tue Dec 02, 2003 2:42 am
by omniscient
sure you can. all you would have to do is make a toggle. say for instance your bloodpatch was blood.pk3. so with the toggle change it to blood1.pk3. if blood1.pk3 doesnt exist then your set.