PDA

View Full Version : No Smoke, No Flash code ..



Scarface [DDR]
10th July 2003, 12:38
void APIENTRY my_glBegin( GLenum mode )
{

if((GetAsyncKeyState(VK_RBUTTON) & 1) == 1)
{
SetCursorPos(300,300);
}

if(mode==GL_QUADS)
{
drawQuads=true;
bSky=true;
}
else
{
drawQuads=false;
bSky=false;
}

if(mode==GL_QUADS) // Anti Smoke Code
{
GLfloat curcol2[4];
glGetFloatv(GL_CURRENT_COLOR, curcol2);
if((curcol2[0]==curcol2[1])&&(curcol2[1]==curcol2[2]))
{
if(!((curcol2[0]==1.0f)||(curcol2[0]==0.0f)))
{
glColor4f(curcol2[0],curcol2[1],curcol2[2],0.01f);
}
}
}

if(mode==GL_QUADS) // Anti Flash Code
{
GLfloat curcol3[4];
glGetFloatv(GL_CURRENT_COLOR, curcol3);
if((curcol3[0]==1.0f)&&(curcol3[1]==1.0f)&&(curcol3[2]==1.0f))
{
bFlash=true;
}
else
{
bFlash=false;
}
}


This is the code i've found in a N7 multihack only i dont know how to run it with my key system. Does anyone know how i can run the script when i press F3 and to turn it off with F3 ?

I already have a keytoggle code so the only think i gotta find out is how to run it .. So would the ub3rl33t coders please help me out? :beard:

Regards Erik


EDIT: Or does someone has a working script that i can use?
I have some ideas to make it undetectable for PB =]

PAS3I2
10th July 2003, 14:51
that looks like a hooked glBegin, but i dunno what you mean by having the keytoggle code and not being able to run it.

Scarface [DDR]
10th July 2003, 14:53
Well i dont know how to run it (activate it)
And if someone knows how to activate is, then maybe he or she could tell me how to turn it on/off with keytoggle =]

PAS3I2
10th July 2003, 15:01
Activate the key toggle? Is your key toggle code, or a script? if its code it should just be added to the wrapper, if its a script, it wont work to toggle your OGL on and off.
key code
if((GetAsyncKeyState(VK_F2)) && !last_flash)
{ noflash=!noflash;
last_flash = true;
}
if(!(GetAsyncKeyState(VK_F3))) last_flash = false;

then make all of that code pertaining to no flash and if statement with if(noflash)

mguy
10th July 2003, 16:42
That code is for half-life, n7 tried to use it but it didnt work so he just left it in there (commented I believe).

Gna
10th July 2003, 19:41
aj thats cs code i think it dont work in sof2

sof2 does not use glbegin i think(99%sure:o)

FlameGod
11th July 2003, 06:12
Umm yeah, it uses glBegin. Here is a typical one frame gltrace:

Call Counts:
glBegin 1120
glBindTexture 726121
glBitmap 3955
glBlendFunc 22802
glClear 5797
glClearColor 4677
glClearDepth 2
glColor3f 3360
glColor4f 2
glColorPointer 656961
glCullFace 10972
glDeleteTextures 540
glDepthFunc 1088
glDepthMask 64672
glDepthRange 9828
glDisable 177629
glDisableClientState 228200
glDrawBuffer 14816
glDrawElements 656961
glEnable 146352
glEnableClientState 1526889
glEnd 1120
glFinish 9019
glGetError 542
glGetIntegerv 2
glGetString 4
glLineWidth 2240
glLoadIdentity 31872
glLoadMatrixf 42346
glMatrixMode 57608
glOrtho 15936
glPolygonMode 2
glPolygonOffset 1829
glScissor 26447
glShadeModel 2
glTexCoordPointer 757098
glTexEnvf 2
glTexImage2D 1959
glTexParameterf 2378
glTexParameterfv 2
glVertex3f 6720
glVertexPointer 655146
glViewport 26447
wglCreateContext 1
wglDeleteContext 1
wglDescribePixelFormat 89
wglGetPixelFormat 4
wglGetProcAddress 8
wglMakeCurrent 2
wglSetPixelFormat 1
wglSwapBuffers 14816

glActiveTextureARB 200378
glClientActiveTextureARB 200378
glLockArraysEXT 655146
glUnlockArraysEXT 655146
wglSwapIntervalEXT 1

Closing output file


Also, those codes for flash and smoke will not work for sof2, I also have yet to figure what they are trying to accomplish. The flash code is about 10x easier than that btw lol. And no, sorry, I don't care to share, it's way more fun figuring it out on your own. *whistle*

PAS3I2
11th July 2003, 06:14
would it have something to do with getcolor?