Author Topic: Shout Disable  (Read 433 times)

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Shout Disable
« on: March 01, 2015, 04:17:07 pm »


               

I disabled shout in my module's ini, which causes the following not to work:


AssignCommand(GetModule(), SpeakString(sMessage, TALKVOLUME_SHOUT));


 


Is there a workaround to allow the module to send shouts despite the disabled channel?


 


As a temporary solution, I'm just doing a loop through the PCs to send them the message.  I'm thinking that is all the command is doing anyway.


 


 



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Shout Disable
« Reply #1 on: March 01, 2015, 04:51:33 pm »


               


I disabled shout in my module's ini, which causes the following not to work:


AssignCommand(GetModule(), SpeakString(sMessage, TALKVOLUME_SHOUT));


 


Is there a workaround to allow the module to send shouts despite the disabled channel?


 


As a temporary solution, I'm just doing a loop through the PCs to send them the message.  I'm thinking that is all the command is doing anyway.




And this worked before? I was under impression that you need creature to use speakstring


               
               

               
            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Shout Disable
« Reply #2 on: March 01, 2015, 04:55:49 pm »


               

Definitely.  Works fine as long as you allow shouting.  Been using it for years and just made the ini change this past week.



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
Shout Disable
« Reply #3 on: March 01, 2015, 05:12:42 pm »


               

You should allow shout and put your restrictions in module event onplayerchat. This way you control who can shout in server.



               
               

               
            

Legacy_xa0t3k

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Shout Disable
« Reply #4 on: March 01, 2015, 05:14:19 pm »


               

mod_chat



//disable shout for players
if(GetPCChatVolume() == TALKVOLUME_SHOUT && GetIsPC(oChater) && !GetIsDM(oChater))
{
    SendColorMessageToPC(oChater,"Shout channel disabled.",TXT_COLOR_RED);
    SetPCChatVolume(TALKVOLUME_TALK);
}



and enable shout in .ini



               
               

               
            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Shout Disable
« Reply #5 on: March 01, 2015, 06:03:10 pm »


               

Thanks WhiteTiger and xa0t3k.  This worked well.  No need for a workaround any longer.



               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Shout Disable
« Reply #6 on: March 08, 2015, 03:24:30 pm »


               Sure, don't disable shout, apply a variable to the PC's via the OnClientEnter event script, then in the OnPlayerChat Event script, check the channel, if shout and the PC has the variable, then set their chat channel to talk .... (for that pc only)...