Raised This Month: $ Target: $400
 0% 

2 Weapons HUD Probelm


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hellmonja
Senior Member
Join Date: Oct 2015
Old 10-12-2015 , 22:11   2 Weapons HUD Probelm
Reply With Quote #1

Sorry if the title is a bit misleading. It actually means "I have 2 weapons with custom HUD sprites and I have a problem."

Ok, so it's like this:
- Added 2 extra machine guns on my CS 1.6. The M60 and the Minigun. Both based obviously on original M249
- So far works great, no problem.
- Decided to give them both custom HUD sprites. First, the Minigun.
- So far so good, works prefectly. Now, the M60.
- Default M249 HUD spirtes show up when I buy M60 instead of custom HUD that I assigned
- Minigun still ok. No conflict on the M249 weapon itself either.

WHAT I FOUND OUT
Ok so basically what happens is the Minigun code conflicts with that of the M60. How the code for the custom HUD sprites are written doesn't work when there are 2 or more custom weapons cloned from the same gun. How I found this out is actually quite simple: In my "config.ini" they are written like this:

PHP Code:
m60.amxx
minigun
.amxx 
When I switch their positions like this:

PHP Code:
minigun.amxx
m60
.amxx 
The M60 sprites show up but the Minigun doesn't. Thus whoever is listed last supersedes the other.

So is there a way to do this so they don't "cut-off" each other? I've attached the source code so you can have a look see. I hope you guys can help me...
Attached Files
File Type: sma Get Plugin or Get Source (minigun.sma - 647 views - 15.8 KB)

Last edited by hellmonja; 10-13-2015 at 08:29. Reason: clarifications and typos
hellmonja is offline
 



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

Forum Jump


All times are GMT -4. The time now is 22:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode