Pick up gun owner info
Hi, guys!
How can I get information about the owner of the dropped weapon? Whether the skin is activated or not. |
Re: Pick up gun owner info
You can get the player who dropped it by checking the pev_owner value of the weaponbox entity. To get additional details, you can use pev_classname, pev_model, etc. If you need a specific value customer for your plugin, you can use a pev_iuser field. But be aware that other plugins may use the field and could cause conflict with yours.
PHP Code:
|
Re: Pick up gun owner info
Quote:
Can you show me an example of what it would be like for the Y player to see the skin that X dropped? |
Re: Pick up gun owner info
Quote:
|
Re: Pick up gun owner info
I would need to see how the the skin is applied to the weapon. Is it only set as the model?
|
Re: Pick up gun owner info
Quote:
PHP Code:
|
Re: Pick up gun owner info
Try this.. when a weapon is touched/picked up, check the pev_iuser2 value of the entity [ pev( [entity id] , pev_iuser2 ) ], if it's 1, then it had the model set. If your plugin removes the models, then be sure to call set_pev( iEntID , pev_iuser2 , 0 ) on it.
PHP Code:
|
Re: Pick up gun owner info
Quote:
|
Re: Pick up gun owner info
Of course, but why? It's either 0 or 1 in which an if-statement works fine.
|
Re: Pick up gun owner info
Quote:
|
All times are GMT -4. The time now is 08:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.