Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Plus.HabboHotel.GameClients;
- using Plus.HabboHotel.Rooms;
- using Plus.HabboHotel.Rooms.Chat.Commands;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Plus.HabboHotel.Roleplay.Commands.Developer
- {
- internal sealed class EscortCommand : IChatCommand
- {
- public string PermissionRequired => "";
- public string Parameters => "%username%";
- public string Description => "Escort a user, make the move in synchronization with your avatar.";
- public void Execute(GameClient session, Room room, string[] Params)
- {
- if (Params.Length == 1)
- return;
- GameClient target = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
- if (target == null)
- {
- session.SendWhisper($"Couldn't find user {Params[1]} in this room!");
- return;
- }
- RoomUser targetUser = room.GetRoomUserManager().GetRoomUserByHabbo(target.GetHabbo().Id);
- if (targetUser == null)
- {
- session.SendWhisper($"Couldn't find user {Params[1]} in this room!");
- return;
- }
- RoomUser user = room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
- user.Escorting = targetUser;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement