home *** CD-ROM | disk | FTP | other *** search
/ Qu-ake / Qu-ake.iso / qu_ke / patches / 004 / SERVMSG.QC < prev    next >
Encoding:
Text File  |  1996-11-02  |  1.5 KB  |  45 lines

  1. //====================================================================
  2. //
  3. // Server Message                by: Perecli Manole AKA Bort
  4. //
  5. //====================================================================
  6. // Aside from this new file, the following are the modifications
  7. // done to id's original source files:
  8. //--------------------------------------------------------------------
  9. // File: Progs.src
  10. // Location: before the "client.qc" line
  11. // Added: servmsg.qc
  12. //--------------------------------------------------------------------
  13. // File: Client.qc
  14. // Procedure: ClientConnect
  15. // Location: next line after bprint (" entered the game\n");
  16. // Added: ServMsg(self);
  17. //--------------------------------------------------------------------
  18.  
  19.  
  20. //--------------------------------------------------------------------
  21. // Print and disolve message entity
  22. //--------------------------------------------------------------------
  23. void () Print =
  24. {
  25.     centerprint(self.owner,"Server running Bort patch v2.2");
  26.     self.nextthink = time + 1.8;    // reprint interval
  27.     self.think = Print;
  28.     if (self.ltime < time)
  29.           remove (self);
  30. };
  31.  
  32.  
  33. //--------------------------------------------------------------------
  34. // Spawns message entity
  35. //--------------------------------------------------------------------
  36. void(entity myself) ServMsg =
  37. {
  38.     local entity msg;
  39.  
  40.     msg = spawn ();
  41.     msg.owner = myself;
  42.     msg.ltime = time + 3;        // duration of message
  43.     msg.nextthink = time + 1;    // wait time before initial print
  44.     msg.think = Print;
  45. };