Problem :flaguser

moso

Member
Mar 1, 2019
43
5
Good evening, so I have a small problem with the command: flaguser or the change of nickname, when a user changes pseudo ca changes the username table in the database but can not reconnect to the site.

I use: YezzEmulator, ForbCms by Areware

Thanks in advance the Devbest community :) (Im french sorry)

TargetClient.GetHabbo().LastNameChange = 0;
TargetClient.GetHabbo().ChangingName = true;
TargetClient.SendNotification("S'il vous plaît, il a été déterminé que votre nom d'utilisateur est incorrect ou inapproprié\r\rUn membre du personnel a décidé de vous donner la possibilité de changer de nom afin d'éviter une expulsion de l'hôtel.\r\rFermez cette fenêtre, cliquez sur vous et vous aurez la possibilité de changer votre nom, changez-le!! \n\n <b><u>Rappelez - vous que vous n'avez qu'un changement de nom, réfléchissez bien avant de le choisir </b></u>");
using (IQueryAdapter dbClient = YezzEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.RunQuery("UPDATE users SET changename = '0' WHERE id = " + TargetClient.GetHabbo().Id + "");
}
TargetClient.GetHabbo()._changename = 0;
TargetClient.SendMessage(new UserObjectComposer(TargetClient.GetHabbo()));
 
Last edited:

Hypothesis

Programmer
Jan 6, 2019
524
361
Never used this emulator, looks like a Plus rename though, question.
Does the column "changename" even exist in the user table, if it does, are you sure it's the correct data type?
 

moso

Member
Mar 1, 2019
43
5
Yes the changename column exists well I compared the database of forbcms and that of ufo server it's the same
Post automatically merged:

t makes me the same for my order :hidewired the value in the table that changes well but no change in game ..
 
Last edited:

cammy

Member
May 15, 2014
471
221
This is mine, try using this.

using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Emulator.HabboHotel.GameClients;
using Emulator.Communication.Packets.Outgoing.Handshake;

namespace Emulator.HabboHotel.Rooms.Chat.Commands.Moderator
{
class FlagUserCommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_flaguser"; }
}

public string Parameters
{
get { return "%username%"; }
}

public string Description
{
get { return "Forces the specified user to change their name."; }
}

public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
if (Params.Length == 1)
{
Session.SendWhisper("Please enter the username you wish to flag.");
return;
}

GameClient TargetClient = HabboEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
if (TargetClient == null)
{
Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online.");
return;
}

if (TargetClient.GetHabbo().GetPermissions().HasRight("mod_tool"))
{
Session.SendWhisper("You are not allowed to flag that user.");
return;
}
else
{
TargetClient.GetHabbo().LastNameChange = 0;
TargetClient.GetHabbo().ChangingName = true;
TargetClient.SendNotification("Please be aware that if your username is deemed as inappropriate, you will be banned without question.\r\rAlso note that Staff will NOT allow you to change your username again should you have an issue with what you have chosen.\r\rClose this window and click yourself to begin choosing a new username!");
TargetClient.SendMessage(new UserObjectComposer(TargetClient.GetHabbo()));
}

}
}
}
 

moso

Member
Mar 1, 2019
43
5
It does not work: /
Post automatically merged:

I would honestly just recommend to move to Plus Emulator, never heard of that emulator sounds weird and fishy.

It's been 3 weeks that I come all emulator I almost finished everything: /
Post automatically merged:

UPDATE:

It comes from my database on because I tried with another cms / bdd it works the flagme
 
Last edited:

Users who are viewing this thread

Top