Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » [solved] HUD - moving weapon selection
[solved] HUD - moving weapon selection [message #413574] Wed, 09 December 2009 02:11 Go to next message
Tunaman
Messages: 1190
Registered: January 2005
Karma: 2
General (1 Star)
Howdy, I was just wondering if anyone knows(and would be willing to share) a way through scripts.dll(technically shaders.dll I think?) to move and change the weapon selection and teams. Actually any way to change this would be pretty cool to know, thanks!

I included a screenshot to show you exactly what I'm talking about.


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

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

Report message to a moderator

Re: HUD - weapon selection, teams [message #413587 is a reply to message #413574] Wed, 09 December 2009 06:25 Go to previous messageGo to next message
TD is currently offline  TD
Messages: 966
Registered: May 2005
Karma: 0
Colonel
You mean graphically or the way they work (like select order)?

http://i38.tinypic.com/6fs2s9.png
Re: HUD - weapon selection, teams [message #413620 is a reply to message #413574] Wed, 09 December 2009 12:51 Go to previous messageGo to next message
Tunaman
Messages: 1190
Registered: January 2005
Karma: 2
General (1 Star)
Oops, I mean graphically, but I want to move them somewhere else and allow me to use my own textures for it.
I forgot to add that what I really want is the ability to move it from the top of the screen, I had that in the title but then I had a REALLY LONG title that looked pretty annoying to me.


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

[Updated on: Wed, 09 December 2009 12:53]

Report message to a moderator

Re: [unanswered] HUD - moving weapon selection [message #413758 is a reply to message #413574] Fri, 11 December 2009 00:41 Go to previous messageGo to next message
Tunaman
Messages: 1190
Registered: January 2005
Karma: 2
General (1 Star)
Okay, so I found out I can disable the team display, so I can just write my own code to display them.
I still don't know how to disable the default westwood logic for displaying weapons(without removing the whole HUD entirely), and not really sure how I would find the info to display them to be honest. :/ I guess I'll just keep working on trying to figure this out.


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

[Updated on: Fri, 11 December 2009 00:50]

Report message to a moderator

Re: [unanswered] HUD - moving weapon selection [message #413890 is a reply to message #413574] Sun, 13 December 2009 03:31 Go to previous messageGo to next message
TD is currently offline  TD
Messages: 966
Registered: May 2005
Karma: 0
Colonel
Someone help this poor man

http://i38.tinypic.com/6fs2s9.png
Re: [unanswered] HUD - moving weapon selection [message #414045 is a reply to message #413574] Mon, 14 December 2009 20:30 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

i don't think you can move those.

altho i didn't know you could do what i do to ren so LOL never know.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: [unanswered] HUD - moving weapon selection [message #414047 is a reply to message #413574] Mon, 14 December 2009 21:31 Go to previous messageGo to next message
Tunaman
Messages: 1190
Registered: January 2005
Karma: 2
General (1 Star)
Well eventually I will be able to move them, and I know its possible because I've seen screenshots of HUDs that do it.
Right now I'm just using stuff like Ollydbg to try to find the code that draws the weapons, it would just be nice to save myself the work of doing that if someone has already done this. Smile


Edit: ha, I actually just managed to find the function calls that do it! now I just need to figure out how exactly I want to prevent them from being displayed.. Sad


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

[Updated on: Mon, 14 December 2009 23:25]

Report message to a moderator

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: 2
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

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 17:57:47 MST 2024

Total time taken to generate the page: 0.00840 seconds