Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > First-Person Shooters > Other FPS Games > Medal Of Honor Series > Allied Assault

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Allied Assault
hacks cheats tutorials downloads source code
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

I need help with a code
Old 09-10-2009, 03:04 PM   #1
Level 3

alphaz2's Avatar

Join Date: Apr 2007
Posts: 10
Reputation: 45
Rep Power: 59
alphaz2 has made posts that are generally average in quality
I need help with a code

Hey, I'm trying to do a 2D model Cham skins. I showing a simple code to do this 2d models at grenades, this is pas312 source code modified.

Code:
if(GRENADE)
          {
                   if(grenade.cham==1)                            
               {
                       glDisable(GL_TEXTURE_2D);        
                      glDisable(GL_DEPTH_TEST);        // Behind wall
                       PAS.Color(1,1,1);        
                       (*orig_glDrawElements) (mode,count,type,indices); //draw
                       glDisable(GL_TEXTURE_2D);
                       glEnable(GL_DEPTH_TEST); 
                       PAS.Color(1,1,1);        
                      (*orig_glDrawElements) (mode,count,type,indices);

                       if(retaddr==WALLS)     
                      (*orig_glDrawElements) (mode,count,type,indices);
            }
      }
but if I call glDisable(GL_TEXTURE_2D); to give the 2d effect model when the model is not behind a wall, my HUD gets fucked up.

I'm praticly new at this "opengl hooking" I started about 4 days ago with average knowledge about c++
I tought I could take out the "texture points"(duuno if its called like that) of the hud and call a function like i did for the grenade
Code:
bool GRENADE;   
if (g_CurrentTexture == 1997338880 || g_CurrentTexture == 77853400 || g_CurrentTexture == 2008989184
        || g_CurrentTexture == 3964595200 || g_CurrentTexture == 578016768 || g_CurrentTexture == 2125123968)
        {GRENADE = true;}
        else {GRENADE = false;}
and then after i took the texture points i would do this


Code:
if(HUD)
 {  
      if(grenade.cham == 1)
    { 
       glEnable(GL_TEXTURE_2D); 
       (*orig_glDrawElements) (mode,count,type,indices);
    }
 }
Could some1 give me a piece of advice or teach me how to get this "texture points"
If needed I'll upload the source

[Auto Merged - 22:40:29 UTC]

Fixed it! xD I just called this at start of function of cham skins

Code:
else
            {
                glEnable(GL_TEXTURE_2D);
                 (*orig_glDrawElements) (mode,count,type,indices);
            }
and also fixed a strange blinking on cham skins,
I noticed it was drawing in 2D and in the next second was drawing in 3D so it was giving a strange blinking on the upper part of the chams skins.

fixed it with a if outside of the funtion of cham skins

Code:
    if(ALLIES || AXIS  )
    {
        if(hack.fixcham==1) 
      {        
         glDisable(GL_TEXTURE_2D);
       }
    }
But could some1 explain me how to get the g_currentextures numbers? or what it is ? I assume is some kinda cordinates I would like to know so I can progress in OGL Hookin

Last edited by alphaz2; 09-10-2009 at 11:40 PM.
alphaz2 is offline

Reply With Quote


Old 09-13-2009, 08:59 AM   #2
UnknownCoder

okidoki's Avatar

Join Date: Jan 2004
Location: Altar of Storms
Posts: 290
Reputation: 11379
Rep Power: 216
okidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server spaceokidoki 's rep takes up 1 gig of server space
Points: 14,069, Level: 15
Points: 14,069, Level: 15 Points: 14,069, Level: 15 Points: 14,069, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Hi,

Texture num isn't cordinates

BTW Here is some little things that should help you to fix your MOHAA models recognition:

Using backendState_t to retreive the entity's informations:
http://forum.gamedeception.net/showthread.php?t=16165

Using esi/image_t to retreive the texture's path string:
http://forum.gamedeception.net/showthread.php?t=14027

Regards.

PS to mods:
Sorry for those external links to GD, if aren't allowed by the forum rules, just erase this post, I will re-create those 2 threads in this section.
__________________
Thrall, a young Orc raised as a Human slave and gladiator...

Last edited by okidoki; 09-14-2009 at 03:05 PM.
okidoki is offline

Reply With Quote

Old 09-13-2009, 09:35 AM   #3
Follow me children

Jesus.'s Avatar

Join Date: Aug 2003
Posts: 3,255
Reputation: 42353
Rep Power: 592
Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!Jesus. has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 35,603, Level: 28
Points: 35,603, Level: 28 Points: 35,603, Level: 28 Points: 35,603, Level: 28
Activity: 3.3%
Activity: 3.3% Activity: 3.3% Activity: 3.3%
Last Achievements
personally don't see a problem with it at all they are your guides.
__________________
Nigga who is UH.
IPancakes.
Jesus. is offline

Reply With Quote

Old 09-13-2009, 03:58 PM   #4
Level 3

alphaz2's Avatar

Threadstarter
Join Date: Apr 2007
Posts: 10
Reputation: 45
Rep Power: 59
alphaz2 has made posts that are generally average in quality
ty okidoki, I will surely check it out
alphaz2 is offline

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
code
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 06:15 PM.