HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 How does one remove the spawn announcer and PvP announcer?

View previous topic View next topic Go down 
AuthorMessage
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: How does one remove the spawn announcer and PvP announcer?   Mon Aug 24, 2015 2:35 pm

I've recently added PvP and whenever you hit someone, it broadcasts it to the rest of the game globally, which will most definitely get annoying. I'm wondering how to remove it. I also wish to do so with the critter spawn announcer.



Thank you!
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: How does one remove the spawn announcer and PvP announcer?   Mon Aug 24, 2015 9:43 pm

http://www.kitopen.com/t877-how-do-i-actually-turn-off-admin-spawned-animal?highlight=admin+spawned

for the server warning remove the tIsHit chunk that sends the warning in the gameserver

________________________________
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: How does one remove the spawn announcer and PvP announcer?   Mon Aug 24, 2015 11:07 pm

Do you mean remove the bool tIsHit = false; from

Code:
string tMapName;
unsigned char tDimension;
bool tIsUpdate = false;
bool tIsHit = false;

Because there are quite a few tIsHit codes in MagixServer.cpp and I'd like to make sure I'm removing the right one.
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: How does one remove the spawn announcer and PvP announcer?   Mon Aug 24, 2015 11:51 pm

..the one with the warning

Code:
                  if(tIsHit)
                  {
                     OwnerToken tUnitID;
                     float tDamage = 0;

                     tReceiveBit.Read(tUnitID);
                     tReceiveBit.Read(tDamage);
                     if(tDamage < 0 && tUnitID != tSender)
                     { // user attacked another user
                        const string tCaption = "<<(SERVER WARNING)>> "+clientName[tSender-1]+" ATTACKED "+clientName[tUnitID-1]+" FOR "+intToString((int)tDamage);
                        RakNet::BitStream wBitStream;
                        wBitStream.Write(MessageID(ID_GODSPEAK));
                        StringCompressor::Instance()->EncodeString(tCaption.c_str(), 512, &wBitStream);
                        sendMyPlayers(server,&wBitStream, MEDIUM_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS);
                     }
                     tReceiveBit.SetReadOffset(offset);
                  }

________________________________
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: How does one remove the spawn announcer and PvP announcer?   Tue Aug 25, 2015 12:05 am

Didn't see that. Thanks Hyper
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: How does one remove the spawn announcer and PvP announcer?   Tue Aug 25, 2015 12:48 pm

Sorry for double posting (again) but I've tried removing the if tIsHit line, which doesn't remove the announcer, I've tried removing the entire piece of code you listed, which completely messes up the code and the person being attacked doesn't register as being attacked at all and doesn't lose any health. I've also tried commenting out the warning itself, that failed the build, and I tried commenting out the line I thought controlled the announcer:

Code:
wBitStream.Write(MessageID(ID_GODSPEAK));

Which didn't work either.
Back to top Go down
Nakti
®
®
avatar

Game username : Nakti
Server : World of Pandora
Female Posts : 164
Join date : 2012-08-24
Age : 22
Location : black celebration

PostSubject: Re: How does one remove the spawn announcer and PvP announcer?   Tue Aug 25, 2015 6:30 pm

Code:
                    if(tDamage < 0 && tUnitID != tSender)
                    { // user attacked another user
                        const string tCaption = "<<(SERVER WARNING)>> "+clientName[tSender-1]+" ATTACKED "+clientName[tUnitID-1]+" FOR "+intToString((int)tDamage);
                        RakNet::BitStream wBitStream;
                        wBitStream.Write(MessageID(ID_GODSPEAK));
                        StringCompressor::Instance()->EncodeString(tCaption.c_str(), 512, &wBitStream);
                        sendMyPlayers(server,&wBitStream, MEDIUM_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS);
                    }

This is the whole part that makes a warning. You can comment it all without a mess.
If you feel unsure of this, you can comment just this line:
Code:
                        sendMyPlayers(server,&wBitStream, MEDIUM_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS);
This is the one that sends everybody a warning. If it won't send, nobody will receive and get annoyed.
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: How does one remove the spawn announcer and PvP announcer?   Tue Aug 25, 2015 6:54 pm

Okay, I wasn't sure which line to comment out. Thanks Nakti and Hyper
Back to top Go down
 
How does one remove the spawn announcer and PvP announcer?
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support :: Solved Support Issues-
Jump to: