From 708960f77fb27bcd0a8485f3b69229d9eb686c54 Mon Sep 17 00:00:00 2001 From: nahkampfaffe Date: Wed, 19 Sep 2018 02:43:01 +0200 Subject: [PATCH] =?UTF-8?q?PlayerDeath-Event=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- Server/Events/Death.cs | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Server/Events/Death.cs diff --git a/.gitignore b/.gitignore index 5e25bec6..db52e9bd 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ Properties/* *.user !.gitkeep -yolo/* \ No newline at end of file +yolo/* +/mycmds.cs +/Server/Commands/mycmds.cs diff --git a/Server/Events/Death.cs b/Server/Events/Death.cs new file mode 100644 index 00000000..4ee26dbd --- /dev/null +++ b/Server/Events/Death.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using GTANetworkAPI; +using GTANetworkMethods; +using reallife_gamemode.Model; + +/* + * Author: balbo + * + * */ + +namespace reallife_gamemode.Server.Events +{ + public class Death : Script + { + [ServerEvent(GTANetworkAPI.Event.PlayerDeath)] + public void OnPlayerDeath(Client player, Client killer, uint reason) + { + NAPI.Chat.SendChatMessageToPlayer(player, "Du bist durch " + killer.Name + " gestorben: " + reason.ToString()); + } + } +}