Objectcaps & Entity PlayerUse
1 Attachment(s)
Greetings.
Idk if anyone needs this, but I did anyway. Basically not all ents are useable, sure you can hook use on them, but it wont register when a player hits his use key on it. You can change this however by messing a bit with the function objectcaps. What is objectcaps? PHP Code:
From the sdk: PHP Code:
PHP Code:
|
Re: Objectcaps & Entity PlayerUse
This is a nice tip, your example is wrong though.
It is like you return this : SetHamReturnInteger( FCAP_IMPULSE_USE ) because iCap is never set to something else, so you should first use ExecuteHam to get default return, or you should hook it as post and use HamGetOrigReturnInt or however it this native is called, and then set its return. |
Re: Objectcaps & Entity PlayerUse
Yeah, was using it for something else, forgot to change it. At least in the case of CPointEntity the return is 0, so doesn't matter getting the return I guess.
|
Re: Objectcaps & Entity PlayerUse
Hey, sorry for reviving the thread!
First of all, this tutorial was useful for me, so I gotta thank you. So Ham_ObjectCaps can be used for multiple things, one of them being hooking IN_USE button? It would be nice adding more examples for the rest of the bits. If I use Code:
|
All times are GMT -4. The time now is 03:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.