Problem with SetSpeed

DomiLuca

New Member
Oct 13, 2015
11
0
Hello everyone, i have a problem with my plus emu, SetSpeed don't save the changes. Can anyone help me?

For example i put the setspeed at 5. I relog in the room, setspeed return to 0.

Thanks a lot for your help!
 

DomiLuca

New Member
Oct 13, 2015
11
0
U can send the code of the command?
U can send the code of the command?
class SetSpeedCommand : IChatCommand
{
public string PermissionRequired
{
get { return "user_normal"; }
}

public string Parameters
{
get { return "[NUMERO]"; }
}

public string Description
{
get { return "Escolha a velocidade dos Rollers de 0 a 10."; }
}

public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
if (!Room.CheckRights(Session, true))
return;

if (Params.Length == 1)
{
Session.SendWhisper("Digite a velocidade dos rollers.", 34);
return;
}

int Speed;
if (int.TryParse(Params[1], out Speed))
{
Session.GetHabbo().CurrentRoom.GetRoomItemHandler().SetSpeed(Speed);
using (IQueryAdapter dbClient = MoonEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.RunQuery("UPDATE `rooms` SET `roller_speed` = " + Speed + " WHERE `id` = '" + Room.Id + "' LIMIT 1");
}
}
else
Session.SendWhisper("Quantidade invalida, só é permitido numeros.", 34);
}
}
}
Post automatically merged:

this is the command
 

Users who are viewing this thread

Top