View Single Post
Vancold
Member
Join Date: Jan 2015
Old 02-11-2020 , 16:50   Re: [TFC] How to disable chat sound ; Ham_Touch problem
Reply With Quote #3

Quote:
Originally Posted by DarthMan View Post
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_ONESVC_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.

Ty Darthman ;) The post hook makes sense. The info_tfgoal problem isn't as easy as it sounds. the problem is that i thought that this would be an efficent way, but i got a different idea, that should work.

have a nice day
Vancold is offline