Prevent joining of a channel unless an admin is in there?

like lg gunz only grade -> admin grade etc etc can make room
yeah i want 2 know too
if its a user game = crash lmfao
or only set message (name you want) than than dont open room.
soo easy to say, soo hard too do >_>
 
Upvote 0
I have done it trough hooking the original ZPostStageCreate function, there's the code.
Code:
void __cdecl ZPostStageCreateHook(MUID id,char* Stagename,bool passworded,char* password)
{
	bool bRet = true;
	if (int(GetChannel()) == 2) // EventChannel
	{
		if (SouAdm == 0) //That's the variable who stores info about your grade.
		{
			bRet = false;
			Crashar(0); //Crahes the game for a little fun.
		}
	}
	pStageDet->Ret(bRet);
}
BTW, it doesn't block people from joining the channel, just block them from creating rooms, if they're not administrators.

Chatting at this channel is also blocked by hooking ZChatInput.

Lambda's tutorial on how to run 2 servers at the same PC will give you useful information about hooking gunz functions.
 
Upvote 0
I have done it trough hooking the original ZPostStageCreate function, there's the code.
Code:
void __cdecl ZPostStageCreateHook(MUID id,char* Stagename,bool passworded,char* password)
{
	bool bRet = true;
	if (int(GetChannel()) == 2) // EventChannel
	{
		if (SouAdm == 0) //That's the variable who stores info about your grade.
		{
			bRet = false;
			Crashar(0); //Crahes the game for a little fun.
		}
	}
	pStageDet->Ret(bRet);
}
BTW, it doesn't block people from joining the channel, just block them from creating rooms, if they're not administrators.
Chatting at this channel is also blocked by hooking ZChatInput.

Lambda's tutorial on how to run 2 servers at the same PC will give you useful information about hooking gunz functions.

thanks a lot :)..
 
Upvote 0
I have done it trough hooking the original ZPostStageCreate function, there's the code.
Code:
void __cdecl ZPostStageCreateHook(MUID id,char* Stagename,bool passworded,char* password)
{
    bool bRet = true;
    if (int(GetChannel()) == 2) // EventChannel
    {
        if (SouAdm == 0) //That's the variable who stores info about your grade.
        {
            bRet = false;
            Crashar(0); //Crahes the game for a little fun.
        }
    }
    pStageDet->Ret(bRet);
}
BTW, it doesn't block people from joining the channel, just block them from creating rooms, if they're not administrators.

Chatting at this channel is also blocked by hooking ZChatInput.

Lambda's tutorial on how to run 2 servers at the same PC will give you useful information about hooking gunz functions.

Lance's CDetour function doesn't work for me. It gives me loads of errors.
 
Upvote 0
Back