Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » [solved] HUD - moving weapon selection
Re: [solved] HUD - moving weapon selection [message #414087 is a reply to message #413574] Tue, 15 December 2009 12:39 Go to previous message
Tunaman
Messages: 1190
Registered: January 2005
Karma:
General (1 Star)
Sorry for the multiple double posts.. I just figured I would make a new post each time I found something new, etc. so people would know something new was in the topic.

So to remove the weapon list I just replaced the function call to draw it with nothing.
For anyone else that wants to do this as well here's the code to removing the weaponlist:
  LPVOID * addr = (LPVOID *)0x006AD4BE;//this is the address of the call to the function that draws the weapon list
  DWORD newprotect = PAGE_EXECUTE_READWRITE;
  DWORD oldprotect = NULL;
  if(!(*(char *)addr == 0x90))//this block of code checks to see if the code is already set with NOPs, if not it replaces the function call with NOPs
  {
	  VirtualProtect(addr,5,newprotect,&oldprotect);
	  memset(addr,0x90,5);
	  VirtualProtect(addr,5,oldprotect,&oldprotect);
  }
  addr = (LPVOID *)0x006AD4D3;//this is the address of the code that draws the numbers above the weaponlist
  if(!(*(char *)addr == 0x90))
  {
	  VirtualProtect(addr,5,newprotect,&oldprotect);
	  memset(addr,0x90,5);
	  VirtualProtect(addr,5,oldprotect,&oldprotect);
  }


If anyone has any questions or comments on my code feel free to share. Smile


http://img694.imageshack.us/img694/9055/tunamanlmao.png

[Updated on: Tue, 15 December 2009 12:39]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can i get it so, look inside
Next Topic: Making a Map and needs helps
Goto Forum:
  


Current Time: Wed Dec 04 10:31:44 MST 2024

Total time taken to generate the page: 0.01762 seconds