Exemplo n.º 1
0
        private static void Help(Player sender)
        {
            if (!sender.AccountData.HavePerm("admin.cmds.help"))
            {
                return;
            }

            Chat.AdminChat(sender, "help, goto, gethere, slap, freeze, unfreeze, pm, kick, perm, v, set, give, delete");
        }
Exemplo n.º 2
0
 private static void Fill(Player sender, int id = -1)
 {
     try
     {
         Vehicle vehicle = AdminHelper.VehicleFill(sender, id);
         Chat.AdminChat(sender, "Véhicule id " + Constants.Chat.HIGHLIGHT + vehicle.Id + Color.White + " (bdd: " + Constants.Chat.HIGHLIGHT + vehicle.Data.Id + Color.White + ") rempli.");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 3
0
 private static void TpId(Player sender, int id)
 {
     try
     {
         Vehicle vehicle = AdminHelper.VehicleTpId(sender, id);
         Chat.AdminChat(sender, "Vous vous êtes téléporté au véhicule id " + Constants.Chat.HIGHLIGHT + vehicle.Id + Color.White + " (bdd: " + Constants.Chat.HIGHLIGHT + vehicle.Data.Id + Color.White + ").");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 4
0
 private static void Destroy(Player sender, int id = -1)
 {
     try
     {
         AdminHelper.VehicleDestroy(sender, id);
         Chat.AdminChat(sender, "Véhicule (id: " + Constants.Chat.HIGHLIGHT + id + Color.White + ") supprimé.");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 5
0
 private static void SpawnTmp(Player sender, VehicleModelType vehicle)
 {
     try
     {
         AdminHelper.VehicleSpawnTmp(sender, vehicle);
         Chat.AdminChat(sender, "Véhicule temporaire " + Constants.Chat.HIGHLIGHT + vehicle + Color.White + " crée.");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 6
0
 private static void UnFreeze(Player sender, Player target)
 {
     try
     {
         AdminHelper.UnFreeze(sender, target);
         Chat.AdminChat(sender, "Vous avez défreeze " + Constants.Chat.USERNAME + target.Name + Color.White + " (" + target.Id + ").");
         Chat.ClientChat(target, "Vous avez été défreeze par " + Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + ".");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 7
0
 private static void Gethere(Player sender, Player target)
 {
     try
     {
         AdminHelper.Gethere(sender, target);
         Chat.AdminChat(sender, "Vous avez téléporté " + Constants.Chat.USERNAME + target.Name + Color.White + " (" + target.Id + ") à vous.");
         Chat.ClientChat(target, "Vous avez été téléporté par " + Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + ".");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 8
0
 private static void Goto(Player sender, Player target)
 {
     try
     {
         AdminHelper.Goto(sender, target);
         Chat.AdminChat(sender, "Vous vous êtes téléporté à " + Constants.Chat.USERNAME + target.Name + Color.White + " (" + target.Id + ").");
         Chat.ClientChat(target, Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + " s'est téléporté à vous.");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 9
0
 private static void GiveGun(Player sender, Player target, Weapon gun, int ammo = 50)
 {
     try
     {
         AdminHelper.GiveGun(sender, target, gun, ammo);
         Chat.AdminChat(sender, "L'arme " + Constants.Chat.HIGHLIGHT + gun + Color.White + " a bien été ajouté au joueur " + Constants.Chat.USERNAME + target.ActiveCharacter.Name + Color.White + " (" + target.Id + ").");
         Chat.ClientChat(target, Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + " vous a donné une arme : " + Constants.Chat.HIGHLIGHT + gun + Color.White + ".");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 10
0
 private static void GivePhone(Player sender, Player target)
 {
     try
     {
         Phone phone = AdminHelper.GivePhone(sender, target);
         Chat.AdminChat(sender, "Le téléphone \"" + phone.Number + "\" bien été ajouté à " + Constants.Chat.USERNAME + target.ActiveCharacter.Name + Color.White + " (" + target.Id + ").");
         Chat.ClientChat(target, "L'administrateur " + Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + " vous a ajouté un téléphone : " + phone.Number + ".");
     }
     catch (Exception e)
     {
         Chat.AdminChat(sender, e.Message);
     }
 }
Exemplo n.º 11
0
 private static void SetSkin(Player sender, Player target, int skinid)
 {
     try
     {
         AdminHelper.SetSkin(sender, target, skinid);
         Chat.AdminChat(sender, "Vous avez mis le skin " + Constants.Chat.HIGHLIGHT + skinid + Color.White + " à " + Constants.Chat.USERNAME + target.Name + Color.White + " (" + target.Id + ").");
         Chat.ClientChat(target, Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + " vous a mis le skin " + Constants.Chat.HIGHLIGHT + skinid + Color.White + ".");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 12
0
 private static void Create(Player sender, Player target, VehicleModelType vehicle)
 {
     try
     {
         AdminHelper.VehicleCreate(sender, target, vehicle);
         Chat.AdminChat(sender, "Véhicule " + Constants.Chat.HIGHLIGHT + vehicle + Color.White + " crée pour " + Constants.Chat.USERNAME + target.Name + Color.White + " (" + target.Id + ").");
         Chat.ClientChat(target, Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + " vous a créé le véhicule " + Constants.Chat.HIGHLIGHT + vehicle + Color.White + ".");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 13
0
 private static void Remove(Player sender, Player target, string perm)
 {
     try
     {
         AdminHelper.PermissionRemove(sender, target, perm);
         Chat.AdminChat(sender, "Vous avez enlevé la permission \"" + Constants.Chat.HIGHLIGHT + perm + Color.White + "\" à " + Constants.Chat.USERNAME + target.Name + Color.White + " (" + target.Id + ").");
         Chat.ClientChat(target, Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + " vous a enlevé la permission \"" + Constants.Chat.HIGHLIGHT + perm + Color.White + "\".");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }
Exemplo n.º 14
0
 private static void DeleteItemInHand(Player sender, Player target)
 {
     try
     {
         if (target.ActiveCharacter.ItemInHand == null)
         {
             throw new Exception("Le joueur n'a pas d'objet en main.");
         }
         if (target.ActiveCharacter.ItemInHand is Gun)
         {
             target.ResetWeapons();
         }
         ItemHelper.DeleteItem(target.ActiveCharacter.ItemInHand);
         Chat.AdminChat(sender, "L'objet de la main du joueur " + Constants.Chat.USERNAME + target.ActiveCharacter.Name + Color.White + " a bien été supprimé");
         Chat.ClientChat(target, Constants.Chat.USERNAME + sender.AccountData.Nickname + Color.White + " a supprimé l'objet que vous aviez dans la main.");
     }
     catch (Exception e)
     {
         Chat.ErrorChat(sender, e.Message);
     }
 }