Get classname from aiming
I'm trying to help a friend make a doorbell plugin
Part of the plugin I want to add, but I don't know how to put it in to code is verifying if what the player is looking at is a func_door_rotating I've looked around for examples of how this type of thing could be used but I found nothing |
Re: Get classname from aiming
PHP Code:
|
Re: Get classname from aiming
yeah, that worked
is there a way to play a sound locally? |
Re: Get classname from aiming
emit_sound
|
Re: Get classname from aiming
i just took a swing at emit_sound, didn't work for me
maybe you guys can see what i did wrong PHP Code:
|
Re: Get classname from aiming
where did you put it?
|
Re: Get classname from aiming
after it checks if the player is looking at a door
then returns plugin handled just in case, here is the whole thing PHP Code:
|
Re: Get classname from aiming
you should check if player is alive to execute the function
the print isn't well, it must says: You must be aiming a door put a print just before emit_sound to test if it's being called |
Re: Get classname from aiming
Has been changed but I don't know what's with emit_sound
chat is printed but sound unheard PHP Code:
|
Re: Get classname from aiming
I'm not sure if this means much
but I found this in console: Unable to open sound/sound/misc/doorbell.wav for transfer That occurs every time I load a map Found the problem and that console error DID mean much I got the address wrong for the sound file :s It's always those little things q.q |
| All times are GMT -4. The time now is 13:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.