safesethealth bei vendingmachines

This commit is contained in:
Luke
2021-07-03 23:12:00 +02:00
parent 097e96c38b
commit 6cf2ee2f4b

View File

@@ -1,4 +1,5 @@
using GTANetworkAPI;
using GTANetworkAPI;
using ReallifeGamemode.Server.Extensions;
public class vMachnesRemote : Script
{
@@ -14,6 +15,6 @@ public class vMachnesRemote : Script
public void OnVendingMachineInteractionFinish(Player player)
{
var health = (player.Health + 25 < 100 ? player.Health + 25 : 100);
NAPI.Player.SetPlayerHealth(player, health);
player.SafeSetHealth(health);
}
}