From a63ca8b4cb129f7459f5b62a713d854e6c9df341 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Sat, 25 Feb 2023 19:58:30 -0800 Subject: [PATCH] Meat: add message when player has meat --- scripts/zm/replaced/zgrief.gsc | 24 ++++++++++++++++-------- scripts/zm/zgrief/zgrief_reimagined.gsc | 2 ++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/scripts/zm/replaced/zgrief.gsc b/scripts/zm/replaced/zgrief.gsc index fbc58c91..e26ea682 100644 --- a/scripts/zm/replaced/zgrief.gsc +++ b/scripts/zm/replaced/zgrief.gsc @@ -63,14 +63,7 @@ meat_stink_player( who ) player.ignoreme = 1; } - if(player.team == who.team) - { - player iprintln("^8" + who.name + " has the meat"); - } - else - { - player iprintln("^9" + who.name + " has the meat"); - } + print_meat_msg(player, who); } who thread [[level.zgrief_meat_stink_player_create]](); who waittill_any_or_timeout( 30, "disconnect", "player_downed", "bled_out" ); @@ -80,4 +73,19 @@ meat_stink_player( who ) player thread [[level.zgrief_meat_stink_player_cleanup]](); player.ignoreme = 0; } +} + +print_meat_msg(player, meat_player) +{ + color = ""; + if(player.team == meat_player.team) + { + color = "^8"; + } + else + { + color = "^9"; + } + + player iprintln(color + meat_player.name + " has the meat"); } \ No newline at end of file diff --git a/scripts/zm/zgrief/zgrief_reimagined.gsc b/scripts/zm/zgrief/zgrief_reimagined.gsc index 2247cea5..1f31dd54 100644 --- a/scripts/zm/zgrief/zgrief_reimagined.gsc +++ b/scripts/zm/zgrief/zgrief_reimagined.gsc @@ -2966,6 +2966,8 @@ meat_stink_player(meat_player) player.meat_waypoint = player meat_waypoint_init(); } + scripts\zm\replaced\zgrief::print_meat_msg(player, meat_player); + if (player == meat_player) { player.meat_waypoint.alpha = 0;