Hooking entity output "OnPlayerUse" problem?
I'm create a "prop_physics" entity and hook it output.
Code:
#include <sourcemod>the output "activator" shoule be player index when we +USE or hit the entity. In fact, when we hit the entity, output "OnHealthChanged" is working good. But when +USE, the result alway "activator"=="caller" ? Any problem with this code and how to get it work corrently? Thanks. |
Re: Hooking entity output "OnPlayerUse" problem?
Hi, i've the same problem here. The !caller output is the same as !activator. Even if i do DispatchKeyValue(ent, "OnPlayerUse", "!activator,Kill,,1") for testing, the entity kills itself and not the activator. I would like to spawn medikits in my zombiemod, therefor i need this. Am i doing something wrong or is this a bug?
The code below doesn't work as well. PHP Code:
|
Re: Hooking entity output "OnPlayerUse" problem?
Same problem, I never got it to work. I just registered a console command to "+use" and save the ent in a public variable and catch it in the use function.
|
| All times are GMT -4. The time now is 11:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.