Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to disable the stage creation of a Player on Event Channel

Be a kicker than cheater.
Joined
Dec 17, 2009
Messages
724
Reaction score
25
Anyone willing?

How to disable the stage creation of a Player on a Channel which has a string of Event.

If someone would help, please help, it will be useful for other, and if you are willing to Release, it's for fun, other people will use it, I think so..

I want that the player can't or unable to create a stage/room on Event Channel because it has a string of Event. While Admin and GM can create.


I surrender finding the lines to add some lines.

But I can refer what I know, this works but the screen turns to block after the pop-up message Cannot create a stage.:

ZGameInterface.cpp
Code:
void ZGameInterface::OnStageCreate(void)

I've added to its below:
Code:
	if(strstr(ZGetGameClient()->GetChannelName(), "Event"))
	{
		ShowMessage( "Cannot create the stage." );
		return;
	}

Please help.

Any other line to edit? Or the line I've given is bad, and it's not the right to add/edit ?

That means you need to put in it somewhere else

still doesnt work.
I replaced it to other line, 1 by 1. almost 10 times, but still doesn't work.

My Trials moving to other lines:
1. Pop up: Cannot Create and the screen turn to black
2. same with #1
3. same with #1
4. Popped up and it went to Room/Stage but something weird, the chatbox and playerbox is black but I can see the text there.
5. same with #4
6. same with #4
7. same with #4
8. same with #4
9. same with #4
10. I run 2nd runnable but the stage is really created, and when I enter the 2nd client to enter the room, it also pop up and also the screen is the same with #4

Please help if there is some possible way to fix.

I found out also that there is a line of OnStageCreate on CSCommon. Look below.
MMatchServer_Stage.cpp at the line:
Code:
void MMatchServer::OnStageCreate(const MUID& uidChar, char* pszStageName, bool bPrivate, char* pszStagePassword)
{

I've tried to add this line and it works, cannot create room, but on the game screen, the buttons cannot be clicked, all buttons, and yes it stays on lobby.
Code:
if(strstr(pChannel->GetName(),"Event")) return;
 
Last edited:
Good Guy George
Member
Joined
Apr 12, 2009
Messages
1,260
Reaction score
239
That means you need to put in it somewhere else
 
Upvote 0
Be a kicker than cheater.
Joined
Dec 17, 2009
Messages
724
Reaction score
25
That means you need to put in it somewhere else

still doesnt work.
I replaced it to other line, 1 by 1. almost 10 times, but still doesn't work.

My Trials moving to other lines:
1. Pop up: Cannot Create and the screen turn to black
2. same with #1
3. same with #1
4. Popped up and it went to Room/Stage but something weird, the chatbox and playerbox is black but I can see the text there.
5. same with #4
6. same with #4
7. same with #4
8. same with #4
9. same with #4
10. I run 2nd runnable but the stage is really created, and when I enter the 2nd client to enter the room, it also pop up and also the screen is the same with #4

Please help if there is some possible way to fix.

I found out also that there is a line of OnStageCreate on CSCommon. Look below.
MMatchServer_Stage.cpp at the line:
Code:
void MMatchServer::OnStageCreate(const MUID& uidChar, char* pszStageName, bool bPrivate, char* pszStagePassword)
{

I've tried to add this line and it works, cannot create room, but on the game screen, the buttons cannot be clicked, all buttons, and yes it stays on lobby.
Code:
if(strstr(pChannel->GetName(),"Event")) return;
 
Last edited:
Upvote 0
Currently Stoned !
Joined
Dec 6, 2011
Messages
879
Reaction score
108
Feeler, I haven't join any Gunz Server, even your Gunz and I thought it myself. It's a common and obvious to all Gunz Maker also to Power Hunger GMs to think about this kind of act.

LOL, why everyone trying to copy it from my server?...


No point on arguing on such things. Gunz is such a small game that it has very less modifications to do. So most of people get same ideas which they are capable of.. we cant think to make voice chat because we really cant... xD but this is kinda easy making event channel so many people have this idea.. (actually me too) . so nothing to surprise, no leeching .
 
Upvote 0
Praise the Sun!
Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Don't do it client sided, do it server sided. No chance of bypassing then.

Also, you can't just return because the state of the GunZ interface has changed, you'll have to either fix the interface state or simply use the default handler for when a stage has failed to create (which is done through RouteResponseToListener on the MatchServer, packet id 0x51A).

MMatchServer::OnStageCreate
PHP:
    if (pObject->m_AccountInfo.m_nUGrade < 222 && pObject->m_ChannelInfo.m_uidChannel.HighID == GoatServer::getInstance()->m_dwEventChannelID) {
        Logging::writeObjectLog(pObject, "Has attempted to create stage with name '%s' in event channel.", szStageName);
        pMMatchServer->RouteResponseToListener(pObject, 0x51A, 0);
        GoatServer::popupPlayer(pObject, "You cannot create a stage in the event channel.");
        return;
    }

You'll need the RouteResponseToListener call (eventually after a call to Announce).
 
Upvote 0
Back
Top