home *** CD-ROM | disk | FTP | other *** search
- /*
- **
- ** _init.qc (Init Code, 1.0)
- **
- ** Copyright (C) 1996 Johannes Plass
- **
- ** This program is free software; you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation; either version 2 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program; if not, write to the Free Software
- ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- **
- ** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
- **
- */
-
- void(entity player) InitInfo =
- {
- if (!USE_MODULE_INIT) return;
- // nothing to do here
- };
-
- void(entity player) InitInit =
- {
- if (!USE_MODULE_INIT) return;
- stuffcmd(player,"alias init-nextcall \"impulse 208\";\n");
- stuffcmd(player,"alias init-nextskin \"impulse 209\";\n");
- };
-
- float(entity player) InitCallIsPermitted =
- {
- if (!USE_MODULE_INIT) {
- // 123456789#123456789#123456789#12345678
- sprint(player,"init: error: init calls are not\n");
- sprint(player," allowed on this server.\n");
- return(0);
- }
- if (player.player_flag & PLAYER_PASSED_INIT_PHASE) {
- sprint(player,"init: error: can execute init calls\n");
- sprint(player," only during initialization.\n");
- return(0);
- }
- player.init_calls_executed = player.init_calls_executed + 1;
- if (player.init_calls_executed > 40) {
- sprint(player,"init: error: cannot execute more\n");
- sprint(player," than 40 init-calls.\n");
- return(0);
- }
- return(1);
- };
-
- void(entity player) InitLetClientExecInit =
- {
- if (!USE_MODULE_INIT) return;
-
- sprint(player,"Trying to execute command 'init'.\n");
- stuffcmd(player,"init;\n");
- };
-
-
-
-
-
-
-