gebühren für sms per lastschrift einziehen
This commit is contained in:
@@ -109,10 +109,21 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using (var dbContext = new DatabaseContext())
|
||||||
|
{
|
||||||
|
User user = player.GetUser(dbContext);
|
||||||
|
if (user.BankAccount.Balance < 5) {
|
||||||
|
ChatService.ErrorMessage(player, "Dafür hast du nicht genug Geld auf deinem Bankkonto");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
user.BankAccount.Balance -= 5;
|
||||||
|
}
|
||||||
|
|
||||||
msg = Regex.Replace(msg, "(~[a-zA-Z]~)|(!{(.*)})", "");
|
msg = Regex.Replace(msg, "(~[a-zA-Z]~)|(!{(.*)})", "");
|
||||||
|
|
||||||
ChatService.SendMessage(player, $"~y~SMS ~w~an ~y~{target.Name}~w~: {msg}");
|
ChatService.SendMessage(player, $"~y~SMS ~w~an ~y~{ target.Name }~w~: { msg }");
|
||||||
ChatService.SendMessage(target, $"~y~SMS ~w~von ~y~{player.Name}~w~: { msg }");
|
ChatService.SendMessage(target, $"~y~SMS ~w~von ~y~{ player.Name }~w~: { msg }");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("look", "~m~look")]
|
[Command("look", "~m~look")]
|
||||||
|
|||||||
Reference in New Issue
Block a user