only centerprint to players :p
authorFruitieX <fruitiex@gmail.com>
Thu, 25 Nov 2010 14:18:01 +0000 (16:18 +0200)
committerFruitieX <fruitiex@gmail.com>
Thu, 25 Nov 2010 14:18:01 +0000 (16:18 +0200)
qcsrc/server/mutators/gamemode_freezetag.qc

index 8df04ea..6682158 100644 (file)
@@ -138,15 +138,19 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
         freezetag_Freeze();
        }
 
-       centerprint(frag_attacker, strcat("^2You froze ^7", frag_target.netname, ".\n"));
+    if(frag_attacker.classname == STR_PLAYER)
+        centerprint(frag_attacker, strcat("^2You froze ^7", frag_target.netname, ".\n"));
+
        if(frag_attacker == frag_target || frag_attacker == world)
        {
-               centerprint(frag_target, "^1You froze yourself.\n");
+        if(frag_target.classname == STR_PLAYER)
+            centerprint(frag_target, "^1You froze yourself.\n");
                bprint("^7", frag_target.netname, "^1 froze himself.\n");
        }
        else
        {
-               centerprint(frag_target, strcat("^1You were frozen by ^7", frag_attacker.netname, ".\n"));
+        if(frag_target.classname == STR_PLAYER)
+            centerprint(frag_target, strcat("^1You were frozen by ^7", frag_attacker.netname, ".\n"));
                bprint("^7", frag_target.netname, "^1 was frozen by ^7", frag_attacker.netname, ".\n");
        }