Change to some medic commands. Add /heal
This commit is contained in:
@@ -227,15 +227,35 @@ namespace reallife_gamemode.Server.Commands
|
||||
player.SendChatMessage("~r~[FEHLER]~s~ Du kannst dich nicht selbst wiederbeleben!");
|
||||
return;
|
||||
}
|
||||
|
||||
player.PlayAnimation("amb@medic@standing@kneel@enter", "enter", 0);
|
||||
|
||||
deadPlayer.TriggerEvent("onPlayerRevived");
|
||||
deadPlayer.SendNotification("Du wurdest von ~r~" + player.Name + "~s~ wiederbelebt.");
|
||||
deadPlayer.SetData("isDead", false);
|
||||
NAPI.Player.SpawnPlayer(deadPlayer, deadPlayer.Position);
|
||||
deadPlayer.Health = 50;
|
||||
}
|
||||
|
||||
[Command("heal", "~m~Benutzung: ~s~/heal [Spieler]")] //TODO Eventuell noch mit Geldbetrag wie bei SA:MP
|
||||
public void CmdFactionMedicHealive(Client player, string receiver)
|
||||
{
|
||||
if (player.GetUser()?.FactionId == null || player.GetUser().FactionId != 2)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
if (player.IsInVehicle)
|
||||
{
|
||||
player.SendChatMessage("~r~[FEHLER]~s~ Du kannst in einem Auto nicht heilen!");
|
||||
return;
|
||||
}
|
||||
Client target = ClientService.GetClientByNameOrId(receiver);
|
||||
target.Health = 100;
|
||||
target.SendNotification("Du wurdest von ~g~" + player.Name + " ~s~geheilt.", false);
|
||||
player.SendNotification("Du hast~g~" + target.Name + " ~s~geheilt.", false);
|
||||
}
|
||||
#endregion
|
||||
#region Global Fraktions Commands
|
||||
#region Global Fraktions Commands
|
||||
[Command("duty", "~m~Benutzung: ~s~/duty")]
|
||||
public void CmdFactionDuty(Client player)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user