This is the command code I would like to add:
Code:
case "car":
{
if (!this.Session.GetHabbo().VIP)
{
this.Session.SendWhisper("This is foor VIPs");
return true;
}
else
{
if (this.Session.GetHabbo().GetAvatarEffectsInventoryComponent().CurrentEffect != 12)
{
if (this.Session.GetHabbo().GetAvatarEffectsInventoryComponent().CurrentEffect != 69)
{
RoomUser racer = MercuryEnvironment.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().CurrentRoomId).GetRoomUserManager().GetRoomUserByHabbo(this.Session.GetHabbo().Id);
racer.ApplyEffect(69);
racer.FastWalking = true;
racer.Chat(racer.GetClient(), "* Starts car en *", false, 0, 2);
return true;
}
if (this.Session.GetHabbo().GetAvatarEffectsInventoryComponent().CurrentEffect == 12)
{
this.Session.SendWhisper("You cannot do this while frozen!");
return true;
}
else
{
RoomUser racer = MercuryEnvironment.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().CurrentRoomId).GetRoomUserManager().GetRoomUserByHabbo(this.Session.GetHabbo().Id);
racer.ApplyEffect(0);
racer.FastWalking = false;
racer.Chat(racer.GetClient(), "* Drives Around *", false, 0, 2);
return true;
}
}
else
{
this.Session.SendWhisper("You cannot do this while frozen");
return true;
}
}
}
And these are the errors I get when debugging:
Errors