Quote:
Originally Posted by Vancold
Hey guys!
I do have a short question. When player use the say / team_say command and write something and it gets printed in the server, it makes a sound.
I am no newb but i can't find any clue as to how to deactivate the sound?
Also i would like to know how to make a hook on Ham_Touch do the following.
I set up a info_tfgoal which is just a backpack which gives ammo and i hooked the Touch function on the info_tfgoal.
So when player touches the info_tfgoal it would normally get removed and spawn after 5 seconds (that's my wait time). But since i hooked it it just despawn.
And i dont why, since it should.
Thanks
|
You can easely change the sound. Just use the SayText and TextMsg, as post, after the messages were sent, do this:
PHP Code:
StopSendSound(const iID)
{
message_begin(MSG_ONE, SVC_STOPSOUND, _, iID);
write_short((iID << 3) | CHAN_ITEM);
message_end();
}
This will stop the sounds entirely and prevent them from ever playing.
Best way, if you want it to be hookable from plug-ins as well, would be to sue Orpheu and hook pfnMessageBegin and pfnMessageEnd, both as post.
For the tfgoal entity not sure how you coded it, but I can give a suggestion:
Hook pfnKeyValue, read the value of the wait key, store it somewhere, on touch retrive the value and set the nextthink to get_gametime + float of the value.