Velaski
winner
- Aug 4, 2015
- 562
- 165
Some guy on here coded it terribly wrong, and it made me sad so:
Add this in GameClientManager.cs
VIP Alert command:
And obviously register the command and add the permissions.
Can someone test this for me because I'm not sure if it works. (Coding criticisms please, benefits us all)
- Added a if statement to determine whether the player is above rank two.
Add this in GameClientManager.cs
PHP:
public void VIPAlert(string Message)
{
foreach (GameClient client in this.GetClients.ToList())
{
if (client == null || client.GetHabbo() == null)
continue;
if (client.GetHabbo().Rank < 1)
continue;
client.SendWhisper(Message);
}
}
VIP Alert command:
PHP:
class VIPACommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_vipalert"; }
}
public string Parameters
{
get { return ".."; }
}
public string Description
{
get { return "..."; }
}
public void Execute(HabboHotel.GameClients.GameClient Session, Room Room, string[] Params)
{
if (Params.Length == 1)
{
Session.SendWhisper("Please enter a message to send.");
return;
}
if(Session.GetHabbo().Rank < 2)
{ Session.SendWhisper("You are not vip lalalla add ur own message cba"); return;
}
string Message = CommandManager.MergeParams(Params, 1);
PlusEnvironment.GetGame().GetClientManager().VIPAlert($"[VIP ALERT][{Session.GetHabbo().Username}] {Message}");
return;
}
}
Can someone test this for me because I'm not sure if it works. (Coding criticisms please, benefits us all)
- Added a if statement to determine whether the player is above rank two.
Last edited: