AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help using Buttons, and using objects (https://forums.alliedmods.net/showthread.php?t=131507)

meTaLiCroSS 07-05-2010 21:41

Help using Buttons, and using objects
 
I've a problem using IN_USE button in some cases...

An example:

I'm hooking IN_USE button in CmdStart, and when it is called it is created an 'X' entity, like a rocket. But sometimes when I try to use an object (button, door, anyshit) my hook it's called, and the rocket it's created unusually.

How I can prevent to call this hook ONLY when the user is not using an object?

Thanks.

PD: It can be PreThink, CmdStart or any shit.

Emp` 07-05-2010 22:16

Re: Help using Buttons, and using objects
 
I would suggest just doing a get_user_aiming check with a short distance to see if there is an entity right there.

meTaLiCroSS 07-05-2010 22:21

Re: Help using Buttons, and using objects
 
Quote:

Originally Posted by Emp` (Post 1229476)
I would suggest just doing a get_user_aiming check with a short distance to see if there is an entity right there.

I was thinking on that, but i don't think that will be a good method.


All times are GMT -4. The time now is 07:04.

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