Jump to content
  • Please do not post a message for the purpose of insulting, incitement to hatred, sexual remarks and any other which does not respect our terms of use !

Commandes


Akushi
 Share

Recommended Posts

Je recherche une commandes qui ajouterais des point pour un classement j'ai fait sa mais le problème je doit noter 1/2/3/4/5/6 à chaque fois au lieu de taper seulement 1

 

Citation

using System.Linq;
using Plus.Communication.Packets.Outgoing.Inventory.Purse;
using Plus.Database.Interfaces;
using Plus.HabboHotel.GameClients;

namespace Plus.HabboHotel.Rooms.Chat.Commands.Moderator
{
    internal class PointsCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_points"; }
        }

        public string Parameters
        {
            get { return "%pseudo% %amount%"; }
        }

        public string Description
        {
            get { return "Donne des points au classement."; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length != 3)
            {
                Session.SendWhisper("Veuillez entre un pseudo + le nombre de point(s)");
                return;
            }
            {
                        }
                        int amount;
                        if (int.TryParse(Params[2], out amount))
                        {
                        GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                        if (TargetClient != null)
                        {

                            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                            {
                                dbClient.RunQuery("UPDATE users SET points_game = points " + amount + "' WHERE `id` = '" + TargetClient.GetHabbo().Id + "' LIMIT 1");
                    }
                    Session.SendWhisper("L'utilisateur " + TargetClient.GetHabbo().Username + " à obtenue " + amount + " point(s) !");
                }
                else
                {

                    Session.SendWhisper("Oups, utilisateur introuvable.");
                    return;
                }
            }
        }
    }
}

 

 

Si quelqu'un aurais une commandes qui ajouterais +1 à chaque fois au lieu de rajouter +1 pour ajouter parce que si le joueurs à 49 ou autre je doit taper :points (pseudo) 50

Edited by reikenz
Link to comment
Share on other sites

Je l'ai pas j'ai juste le massgive et je l'ai repris de sa si tu aurais le code du :gotw mais même je pense pas que sa résoudrer parce que il faudrait quand même faire ce que je fait la je veut sa ajouter tout seul +1 au chiffre déjà présent

Link to comment
Share on other sites

Ah bah fait une fonction pour que ça rajoute automatiquement +1 lors que tu fais :gotw x après ça sert un peu à rien car ça reviens au même que d'écrire 1 mdr..

Link to comment
Share on other sites

  • Administrateur

Salut,

 

Ton sujet qui se trouvait dans Divers Habbo > Aides et support a été déplacé dans  Aides et support > Divers Habbo > Résolu 

 

Ceci est un message automatique.

⠀⠀Founder of Inshare.fr

⠀⠀Baylife moderator

⠀⠀Twitch channel moderator

⠀⠀French translator Trucksbook.eu

𝐹𝑒𝑒𝑙 𝑓𝑟𝑒𝑒 𝑡𝑜 𝑤𝑟𝑖𝑡𝑒 𝑎 𝑐𝑜𝑚𝑚𝑒𝑛𝑡

—————————————————

╱⠀⠀⠀⠀⠀⠀⠀⠀⠀Règlements⠀⠀ //⠀⠀Abonnements⠀⠀ //⠀⠀ Discord   ⠀⠀⠀⠀⠀⠀⠀⠀⠀╲

 

signature.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...