BxB 2 Posted June 17, 2017 Share Posted June 17, 2017 Bonjour aujourd'hui je vous partage la commande freestyle ! Pour ceux qui demandent une description, elle permet de marcher bizarrement en fonction de la rotation... freestyle.cs (à créer) namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun { class Freestyle : IChatCommand { public string PermissionRequired { get { return "command_freestyle"; } } public string Parameters { get { return ""; } } public string Description { get { return "Activer la marche du \"freestyle\"."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) return; ThisUser.Freestyle = !ThisUser.Freestyle; if (ThisUser.Freestyle) { Session.SendWhisper("Freestyle activé !"); } else { Session.SendWhisper("Freestyle desactivé !"); } } } } RoomUser.cs (à ajouter dans le fichier original et dans le "public class") public bool Freestyle = false; RoomUserManager.cs (à remplacer dans le fichier original) Citation int newRot = Rotation.Calculate(User.X, User.Y, nextX, nextY, User.moonwalkEnabled); par: int newRot = Rotation.Calculate(User.X, User.Y, nextX, nextY, User.moonwalkEnabled, User.Freestyle); Et pour finir... rotation.cs (à ajouter dans l'original) public static int CalculateFree(int rot) { if (rot > 1) rot = rot - 2; else rot = rot + 2; return rot; } public static int Calculate(int X1, int Y1, int X2, int Y2, bool moonwalk, bool freestyle) { int rot = rot = Calculate(X1, Y1, X2, Y2); if (freestyle) rot = CalculateFree(rot); if (!moonwalk) return rot; return RotationIverse(rot); } Voilà, voilou ! Bonne journée. Link to comment Share on other sites More sharing options...
Pouney 32 Posted June 17, 2017 Share Posted June 17, 2017 Bonjour, Un screen ou un gif stp ? PAS D'AIDE EN MP Sites Webs : - HostRetro.com - Ado-Lite.fr - Alls-Heberg.fr Link to comment Share on other sites More sharing options...
Guest Posted June 17, 2017 Share Posted June 17, 2017 Merci mon bon vieux Greg' pour ton partage Link to comment Share on other sites More sharing options...
BxB 2 Posted June 18, 2017 Author Share Posted June 18, 2017 Il y a 16 heures, Pouney a dit : Bonjour, Un screen ou un gif stp ? Le voici Link to comment Share on other sites More sharing options...
Pouney 32 Posted June 18, 2017 Share Posted June 18, 2017 Il y a 6 heures, BxB a dit : Le voici Merci, Pas trop fan pour ma part Merci quand même ! PAS D'AIDE EN MP Sites Webs : - HostRetro.com - Ado-Lite.fr - Alls-Heberg.fr Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now