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?
Different Crosshairs
Moderator: Moderators
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
}
}
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
}
}
-
InsomniaSNake
- Corporal
- Posts: 32
- Joined: Tue Sep 30, 2003 12:52 pm
-
InsomniaSNake
- Corporal
- Posts: 32
- Joined: Tue Sep 30, 2003 12:52 pm
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
