next fix taxifahrer
This commit is contained in:
@@ -397,10 +397,12 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
driver.SetData<bool>("hasPassager", true);
|
driver.SetData<bool>("hasPassager", true);
|
||||||
using (var dbContext = new DatabaseContext())
|
using (var dbContext = new DatabaseContext())
|
||||||
{
|
{
|
||||||
|
int amount = (int)Math.Round(km * taxiPrice);
|
||||||
User contractUser = player.GetUser(dbContext);
|
User contractUser = player.GetUser(dbContext);
|
||||||
contractUser.Handmoney -= (int)Math.Round(km * taxiPrice);
|
contractUser.Handmoney -= amount;
|
||||||
|
driver.GetUser(dbContext).Wage += amount;
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
contractUser.Player.TriggerEvent("SERVER:SET_HANDMONEY", contractUser.Handmoney);
|
//contractUser.Player.TriggerEvent("SERVER:SET_HANDMONEY", contractUser.Handmoney);
|
||||||
}
|
}
|
||||||
player.TriggerEvent("CLIENT:startCustomerFare", taxiPrice, km);
|
player.TriggerEvent("CLIENT:startCustomerFare", taxiPrice, km);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user