Page 1 of 1

Disable Announcments?

PostPosted: Mon May 16, 2011 3:21 am
by Texno
Hello,
I've seen many servers that do this, but is there any way to disable in-game announcements? For example: [GG Elimination] Blah blah blah in chat. I've looked and looked, and can't seem to find the answer. Any help is appreciated!

PostPosted: Tue May 17, 2011 3:31 am
by satoon101
Not currently, no. You can attempt to do this (but it will affect everyone on the server), by removing lines of code that cause messages to be sent.

Satoon

PostPosted: Tue May 17, 2011 3:34 am
by wtfaatp
Either that or i would just Edit ALL OF the translation files and leave it blank or just each of them as your own Advertisements.


Either way I say leave the files alone man. What do you benifit from removing the GG messages?>

Re: Disable Announcments?

PostPosted: Wed May 18, 2011 5:37 am
by Texno
Ehh, i just think it's extremely annoying when 15+ players are in the server and you have a constant; [GG Elimination] Respawning Player.. , going off every 4 - 5 seconds. I've tried messing with the strings and such, but it disables elimination. Which is odd. Anyways, thanks for the help!

PostPosted: Wed May 18, 2011 5:49 am
by satoon101
Well, if you edit the .py file incorrectly, it can cause errors that stop the code from continuing. It would be easiest to go wtfaatp's route, and just change all the messages in the .ini file to be empty strings:
../addons/eventscripts/gungame51/scripts/included/gg_elimination/gg_elimination.ini wrote:
[RoundInfo]
en=""
no=""
es=""
de=""
ru=""
pl=""

[RespawningPlayer]
en=""
no=""
es=""
de=""
ru=""
pl=""

[SuicideAutoRespawn]
en=""
no=""
es=""
de=""
ru=""
pl=""

[TeamKillAutoRespawn]
en=""
no=""
es=""
de=""
ru=""
pl=""

[RespawnWhenAttackerDies]
en=""
no=""
es=""
de=""
ru=""
pl=""
Again, though, this disables all messages for all players on the server. If you want to just remove the "Respawning <playername>" messages, just change the values under [RespawningPlayer] .

Satoon

Re: Disable Announcments?

PostPosted: Wed May 18, 2011 8:15 am
by Texno
Ah, i see where i had gone wrong.
That's what i did in the first place, though i deleted the entire line / lines..
Instead of just doing: en=""
Thank you SO much for your help!

Re: Disable Announcments?

PostPosted: Wed May 18, 2011 11:29 pm
by Texno
Lmao.. Ah, now i got [GG Elimination] prefix spamming the chat box... /sigh.
How would i disable this also?
I'v tried:
# Send the round information message
    msg('#human', 'RoundInfo', prefix=False)

# Send the round information message
    msg('#human', 'RoundInfo', prefix="")

# Send the round information message
    msg('#human', 'RoundInfo')

Still, no luck..

PostPosted: Thu May 19, 2011 1:44 am
by satoon101
Oh, yeah, forgot that that would happen. You are on the right track, though. Removing , prefix=True will work, as False is the default value for it for every message type. You will want to do that for each message that you have removed, though. Some of them just use , True as they don't provide any value for the "tokens" variable when passed.

For instance, the message sent when players respawn is:
   saytext2('#human', ggPlayer.index, 'RespawningPlayer',
    {'player': es.getplayername(userid)}, True)

So, remove the , True which makes it look like:
   saytext2('#human', ggPlayer.index, 'RespawningPlayer',
    {'player': es.getplayername(userid)})

Satoon