Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void AcceptFaction(string AvatarName, string FactionName)
- {
- var grabAvatarbyUsername = MercuryEnvironment.GetGame().GetClientManager().GetClientByUsername(AvatarName);
- var grabAvatarsbyClient = MercuryEnvironment.GetGame().GetClientManager().clients.Values;
- var grabFactionbyOwner = Factions[AvatarName];
- if (grabAvatarbyUsername.GetHabbo().Minecraft.FactionInvite != "No Invitation")
- {
- grabAvatarbyUsername.GetHabbo().Minecraft.FactionName = FactionName;
- grabAvatarbyUsername.SendWhisper("You have accepted the invite to the faction `" + FactionName + "`");
- foreach (GameClient Client in grabAvatarsbyClient)
- {
- if (Client.GetHabbo().Minecraft.FactionName == FactionName)
- {
- if (!Factions.TryGetValue(FactionName.ToLower(), out grabFactionbyOwner))
- {
- Client.SendNotif(grabAvatarbyUsername.GetHabbo().Username + " has joined your faction! \n Be sure to give them a warm welcome!");
- }
- else
- {
- Client.SendNotif(grabAvatarbyUsername.GetHabbo().Username + " has accepted your invitation to join `" + FactionName + "`");
- return;
- }
- }
- }
- }
- }
- public static void DeclineFaction(string AvatarName, string FactionName)
- {
- var grabAvatarbyUsername = MercuryEnvironment.GetGame().GetClientManager().GetClientByUsername(AvatarName);
- var grabAvatarsbyClient = MercuryEnvironment.GetGame().GetClientManager().clients.Values;
- var grabFactionbyOwner = Factions[AvatarName];
- if (grabAvatarbyUsername.GetHabbo().Minecraft.FactionInvite != "No Invitation")
- {
- grabAvatarbyUsername.GetHabbo().Minecraft.FactionName = FactionName;
- grabAvatarbyUsername.SendWhisper("You have declined the invite to the faction `" + FactionName + "`");
- foreach (GameClient Client in grabAvatarsbyClient)
- {
- if (Client.GetHabbo().Minecraft.FactionName == FactionName)
- {
- if (Factions.TryGetValue(FactionName.ToLower(), out grabFactionbyOwner))
- {
- Client.SendNotif(grabAvatarbyUsername.GetHabbo().Username + " has declined your invitation to join `" + FactionName + "`");
- return;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement