View Full Version : A little help
Otacon
04-08-2004, 09:03 AM
Does anyone know how i can draw a crosshair onto the screen..pretty much draw many pixels or just a small colored circle in the middle of my screen? Also how to toggle voids in DrawElements
use glGetIntegerv to get the viewport size, then go into ortho mode, use glVertex2f and gl_lines to draw your crosshair, then go back into perspective... and wtf do you mean toggling voids
A!rblader
04-08-2004, 01:03 PM
or when u have clienthook much simpler with
void drawCrosshair()
{
switch(cvar.cross)
{
case 1:
.......
break;
case 2:
break;
}
}
in hud_redraw
if(cvar.cross) { drawCrosshair(); }
and register cvar, in cvar.h:
int cross;
in cvar.cpp:
REGISTER_CVAR_INT( cross, 1)
u can add ur corsshairs int he cases to draw with
gEngfuncs.pfnFillRGBA(x,y,w,h,r,g,b,a);
air
p.s.if u want to have a complete code for the drawCrosshair void pm me
He's not doing this for half-life / cs
Otacon
04-08-2004, 06:38 PM
im doing this in general (im making a 1st/3rd person xhair for cod)..
toggling voids like lets say you have a ballhack
void ball (xxxxxx)
now how can i toggle that in drawelements..brandon you told me how a while back but i, being the forgetful one, forgot.
Powered by vBulletin® Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.