• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Disable Group

Status
Not open for further replies.

Intouch

Respected Member
Hi!

How can I disable groups for some zone?

Example zone Tanaris, so if player try to invite someone in party it will send him error message that he cant do chat....
 

Tommy

Founder
In addition to that, you would probably also want to remove them from their current group when they enter the desired zone.

Yeah, I was wondering if they would be in a group or not. I couldn't really get on point with that. :/
 

Intouch

Respected Member
Here is full code and his location:

SubGroupCounterIncrease(subGroup);

player->SetGroupInvite(NULL);

if (player->GetZoneId() == 33)
player->GetSession()->SendNotification("You aren't allowed to group up with anyone in this zone!");
return false;

if (player->GetGroup())
{
if (isBGGroup() || isBFGroup()) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid()
player->SetBattlegroundOrBattlefieldRaid(this, subGroup);
 

Tommy

Founder
You have no brackets opening and closing the if statement...

Code:
if (player->GetZoneId() == 33)
[COLOR="#00FF00"]{[/COLOR]
    player->GetSession()->SendNotification("You aren't allowed to group up with anyone in this zone!");
    return false;
[COLOR="#00FF00"]}[/COLOR]

Did you try it again and see if that was causing it? If so, I'm not entirely sure, but perhaps the code needs to be put above some initialize code (before anything is setup). I'd put it above, "MemberSlot member;" - though, as I said, I'm not sure if that will fix it or not.
 
Last edited:
Status
Not open for further replies.
Top