Raised This Month: $32 Target: $400
 8% 

Solved Set equiped weapon glow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
esenrik
Senior Member
Join Date: Jul 2010
Old 07-03-2018 , 09:16   Set equiped weapon glow
Reply With Quote #1

Hello.

I saw a server that have glow in player's equiped weapons, you can view other players with glow only in the weapon (not entire body).

How can I do that?

As I know set_user_rendering is only for players....

Last edited by esenrik; 07-04-2018 at 22:21.
esenrik is offline
Old 07-03-2018, 09:31
iceeedr
This message has been deleted by iceeedr. Reason: mistake
Old 07-03-2018, 09:35
Ghosted
This message has been deleted by Ghosted.
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-03-2018 , 09:36   Re: Set equiped weapon glow
Reply With Quote #2

Quote:
Originally Posted by Ghosted View Post
FM_SetModel is for dropped weapons.
Yes, I deleted the answer as soon as I realized
iceeedr is offline
Send a message via Skype™ to iceeedr
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-03-2018 , 09:43   Re: Set equiped weapon glow
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
Yes, I deleted the answer as soon as I realized
I deleted answer as soon as i read this post.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-03-2018 , 09:48   Re: Set equiped weapon glow
Reply With Quote #4

its very easy. register clcmd and in function get players weapon (first check if is alive), to get players' weapon you need privatedata offset of active item (i think its 373) and get it
Code:
#define m_pActiveItem 373

new Weapon = get_pdata_cbase(id, m_pActiveItem);
Bam! now u can set weapons rendering using fm_set_rendering or such thing.

[PS: I dont think if this will work lul]
[Cause weapon has not its model and you see players weaponmodel which is players variable and that means you must set rendering on player]
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-03-2018 at 09:50.
Ghosted is offline
esenrik
Senior Member
Join Date: Jul 2010
Old 07-03-2018 , 11:33   Re: Set equiped weapon glow
Reply With Quote #5

Quote:
Originally Posted by Ghosted View Post
its very easy. register clcmd and in function get players weapon (first check if is alive), to get players' weapon you need privatedata offset of active item (i think its 373) and get it
Code:
#define m_pActiveItem 373

new Weapon = get_pdata_cbase(id, m_pActiveItem);
Bam! now u can set weapons rendering using fm_set_rendering or such thing.

[PS: I dont think if this will work lul]
[Cause weapon has not its model and you see players weaponmodel which is players variable and that means you must set rendering on player]
373 will works in linux?
esenrik is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-03-2018 , 11:37   Re: Set equiped weapon glow
Reply With Quote #6

Quote:
Originally Posted by esenrik View Post
373 will works in linux?
Will this even work? ()
But anyway i think amxx automatically sets pdata for linux/windows.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-03-2018 at 11:37.
Ghosted is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-03-2018 , 14:07   Re: Set equiped weapon glow
Reply With Quote #7

No, you can't set glow via modules in player weapon view model. You will need to add a glowed sub-model in v_model of the weapon and after do some trick with SVC_WEAPONANIM.

m_pActiveItem is 373 and the diff for linux is 5, so basically

Code:
const m_pActiveItem = 373; const XO_PLAYER = 5; [get|set]_pdata_cbase(player_id, m_pActiveItem, XO_PLAYER);
__________________









Last edited by CrazY.; 07-03-2018 at 14:08.
CrazY. is offline
esenrik
Senior Member
Join Date: Jul 2010
Old 07-03-2018 , 18:08   Re: Set equiped weapon glow
Reply With Quote #8

Quote:
Originally Posted by Ghosted View Post
its very easy. register clcmd and in function get players weapon (first check if is alive), to get players' weapon you need privatedata offset of active item (i think its 373) and get it
Code:
#define m_pActiveItem 373

new Weapon = get_pdata_cbase(id, m_pActiveItem);
Bam! now u can set weapons rendering using fm_set_rendering or such thing.

[PS: I dont think if this will work lul]
[Cause weapon has not its model and you see players weaponmodel which is players variable and that means you must set rendering on player]
Tested and not working
esenrik is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-04-2018 , 03:43   Re: Set equiped weapon glow
Reply With Quote #9

Quote:
Originally Posted by esenrik View Post
Tested and not working
Ofc, i said why.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
esenrik
Senior Member
Join Date: Jul 2010
Old 07-04-2018 , 13:46   Re: Set equiped weapon glow
Reply With Quote #10

Any way?
esenrik is offline
Reply


Thread Tools
Display Modes

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 15:27.


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