home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / patch / mbq624 / _message.qc < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.4 KB  |  94 lines

  1. /*
  2. **
  3. ** _message.qc (Messages Code, 1.0)
  4. **
  5. ** Copyright (C) 1996 Johannes Plass
  6. ** 
  7. ** This program is free software; you can redistribute it and/or modify
  8. ** it under the terms of the GNU General Public License as published by
  9. ** the Free Software Foundation; either version 2 of the License, or
  10. ** (at your option) any later version.
  11. ** 
  12. ** This program is distributed in the hope that it will be useful,
  13. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ** GNU General Public License for more details.
  16. **
  17. ** You should have received a copy of the GNU General Public License
  18. ** along with this program; if not, write to the Free Software
  19. ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ** 
  21. ** Author:   Johannes Plass (plass@dipmza.physik.uni-mainz.de)
  22. **
  23. */
  24.  
  25.  
  26. void(entity player) MessagesInit =
  27. {
  28.    if (!USE_MODULE_MESSAGES) {
  29.       return;
  30.    }
  31. };
  32.  
  33. void(entity player) MessagesInfo =
  34. {
  35.    local float n;
  36.  
  37.    if (!USE_MODULE_MESSAGES) {
  38.       return;
  39.    }
  40.  
  41.    if (messages_flag ==
  42.        (MESSAGES_AMMO   | MESSAGES_ARMOR   | MESSAGES_BACKPACK | MESSAGES_KEY |
  43.         MESSAGES_HEALTH | MESSAGES_POWERUP | MESSAGES_WEAPON)) {
  44.        return;
  45.    }
  46.  
  47.    sprint(player,"# Messages: No pickup messages for\n");
  48.    sprint(player,"  ");
  49.  
  50.    n = 0;
  51.    if (!(messages_flag & MESSAGES_AMMO)) {
  52.       n = n + 1;
  53.       sprint(player,"ammo");
  54.    }
  55.    if (!(messages_flag & MESSAGES_ARMOR)) {
  56.       if (n) sprint(player,", ");
  57.       n = n + 1;
  58.       sprint(player,"armor");
  59.    }
  60.    if (!(messages_flag & MESSAGES_BACKPACK)) {
  61.       if (n) sprint(player,", ");
  62.       n = n + 1;
  63.       sprint(player,"backpacks");
  64.    }
  65.    if (!(messages_flag &  MESSAGES_KEY)) {
  66.       if (n) sprint(player,", ");
  67.       n = n + 1;
  68.       sprint(player,"keys");
  69.    }
  70.    if (!(messages_flag & MESSAGES_HEALTH)) {
  71.       if (n) sprint(player,", ");
  72.       n = n + 1;
  73.       if (n>4) { sprint(player,"\n  "); n = 1; }
  74.       sprint(player,"health");
  75.    }
  76.    if (!(messages_flag & MESSAGES_POWERUP)) {
  77.       if (n) sprint(player,", ");
  78.       n = n + 1;
  79.       if (n>4) { sprint(player,"\n  "); n = 1; }
  80.       sprint(player,"powerups");
  81.    }
  82.    if (!(messages_flag & MESSAGES_WEAPON)) {
  83.       if (n) sprint(player,", ");
  84.       n = n + 1;
  85.       if (n>4) { sprint(player,"\n  "); n = 1; }
  86.       sprint(player,"weapons");
  87.    }
  88.    if (n) sprint(player,".\n");
  89. };
  90.  
  91.  
  92.  
  93.  
  94.