Raised This Month: $51 Target: $400
 12% 

Player Attachments?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-28-2007 , 07:54   Player Attachments?
Reply With Quote #1

Howdy folks,

I'm trying to set a Player invis, and it's working perfectly (thanks Dukey!). I'm also setting all of their weapons invis too, and it work's for the weapon in their hand. I'm using CBaseCombatCharacter::WeaponSlot on weapons 0-6 and setting the resulting base entity.

I'm wondering, are attachments (the holstered weapon model) handled seperately to weapons? I know I could look in the SDK but I'm gonna cook myself some breakfast bagels n hope someone has replied by the time I get back, if not I'll look then
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 04-29-2007 , 12:28   Re: Player Attachments?
Reply With Quote #2

I have not been able to figure out how to change Alpha of weapons not in use (gun on back, nades at belt, etc.). They seem to ignore the settings when they are in this position.
L. Duke is offline
awuh0
Senior Member
Join Date: Apr 2005
Location: /dev/null
Old 05-02-2007 , 03:44   Re: Player Attachments?
Reply With Quote #3

Weapons are really easy, I just walk the m_hMyWeapons array and set color like you would any other entity.
Things like the defusal kit are harder since its not an actual weapon, but I think theres a way to find if by offset.
__________________
~The_wUh
_________________
Ph34r teh zombies!!!
find a better way to play CSS, connect to...
thewuh.servebeer.com
thecircus.servebeer.com
awuh0 is offline
Send a message via ICQ to awuh0 Send a message via AIM to awuh0 Send a message via MSN to awuh0
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 05-02-2007 , 04:55   Re: Player Attachments?
Reply With Quote #4

Quote:
Originally Posted by awuh0 View Post
Weapons are really easy, I just walk the m_hMyWeapons array and set color like you would any other entity.
Things like the defusal kit are harder since its not an actual weapon, but I think theres a way to find if by offset.
Wouldn't the m_hMyWeapons array be the same as GetSlot??
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 05-02-2007 , 10:04   Re: Player Attachments?
Reply With Quote #5

Quote:
Originally Posted by awuh0 View Post
Weapons are really easy, I just walk the m_hMyWeapons array and set color like you would any other entity.
Things like the defusal kit are harder since its not an actual weapon, but I think theres a way to find if by offset.
Does the color/alpha work for the weapons attached to them? When I do that it works fine for the weapon they are holding, but not the primary gun on the back, the pistol at the side, etc. The color/alpha also work fine when it is dropped.
L. Duke is offline
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 05-03-2007 , 16:01   Re: Player Attachments?
Reply With Quote #6

Indeed, I remember having the same results LDuke had.
__________________
sslice is offline
awuh0
Senior Member
Join Date: Apr 2005
Location: /dev/null
Old 05-09-2007 , 00:33   Re: Player Attachments?
Reply With Quote #7

Alpha works fine when they are holding it, I don't know about color.

Cold, I use the array because of grenades in CSS, and mods like hl2dm. GetSlot does not work when you have multiple weapons per slot.
__________________
~The_wUh
_________________
Ph34r teh zombies!!!
find a better way to play CSS, connect to...
thewuh.servebeer.com
thecircus.servebeer.com
awuh0 is offline
Send a message via ICQ to awuh0 Send a message via AIM to awuh0 Send a message via MSN to awuh0
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 05-09-2007 , 04:28   Re: Player Attachments?
Reply With Quote #8

Quote:
Originally Posted by awuh0 View Post
Alpha works fine when they are holding it, I don't know about color.

Cold, I use the array because of grenades in CSS, and mods like hl2dm. GetSlot does not work when you have multiple weapons per slot.
If you call GetSlot on the same slot (nade slot) I think it loops through which ones it gives you.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 05-09-2007 , 17:34   Re: Player Attachments?
Reply With Quote #9

Yes, when they are holding it.. but it is a different story for the weapons on back, etc.
__________________
sslice is offline
Reply



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 12:39.


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