making sure evrything is in cvs :)

+ changed directory structure

base dir:
moddir/addons/amxx
core dll / so:
moddir/addons/amxx/dlls
modules dll / so files:
moddir/addons/amxx/modules
plugins .amx files:
moddir/addons/amxx/plugins
configs:
moddir/addons/amxx/config
  modules.ini - module file names, without path info
  plugins.ini - plugin file names, without path info
  core.ini - renamed from config.ini
This commit is contained in:
Pavol Marko 2004-03-05 18:32:29 +00:00
parent 35470c1ecb
commit 71b590eb15
29 changed files with 779 additions and 755 deletions

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef COMMANDS_H #ifndef COMMANDS_H
#define COMMANDS_H #define COMMANDS_H

View File

@ -345,6 +345,11 @@ void EventsMngr::executeEvents()
{ {
int err; int err;
if (!m_ParseFun)
{
return;
}
#ifdef ENABLEEXEPTIONS #ifdef ENABLEEXEPTIONS
try try
{ {

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include "CFile.h" #include "CFile.h"
#include <ctype.h> #include <ctype.h>

View File

@ -1,36 +1,36 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include "CString.h"
#include <stdio.h> #include <stdio.h>
#include "CString.h"
// ***************************************************** // *****************************************************
// class File // class File

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>
@ -68,7 +68,7 @@ void CForwardMngr::executeForwards( int type , int num , int player ) {
{ {
if ((err = amx_Exec(a->getPlugin()->getAMX(), &ret, a->getFunction() , num, player)) != AMX_ERR_NONE) if ((err = amx_Exec(a->getPlugin()->getAMX(), &ret, a->getFunction() , num, player)) != AMX_ERR_NONE)
print_srvconsole("[AMX] Run time error %d on line %ld (plugin \"%s\")\n", err,a->getPlugin()->getAMX()->curline,a->getPlugin()->getName()); UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err,a->getPlugin()->getAMX()->curline,a->getPlugin()->getName());
if ( ret ) if ( ret )
break; break;

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef FORWARD_H #ifndef FORWARD_H
#define FORWARD_H #define FORWARD_H

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef LOGEVENTS_H #ifndef LOGEVENTS_H
#define LOGEVENTS_H #define LOGEVENTS_H

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef MENUS_H #ifndef MENUS_H
#define MENUS_H #define MENUS_H

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
// ***************************************************** // *****************************************************
// class CModule // class CModule

View File

@ -60,14 +60,8 @@ int CPluginMngr::loadPluginsFromFile( const char* filename )
} }
// Find now folder // Find now folder
char pluginName[256], line[256], error[256], pluginsDir[256]; char pluginName[256], line[256], error[256];
strcpy(pluginsDir,filename); const char pluginsDir[] = "addons/amxx/plugins"; // hardcoded; :TODO: make it localinfo
char* ptrEnd = pluginsDir;
for (int i = 0; pluginsDir[i];++i ) {
if (pluginsDir[i] == '/' || pluginsDir[i] == '\\')
ptrEnd = &pluginsDir[i];
}
*ptrEnd = 0;
while ( fp.getline(line , 255 ) ) while ( fp.getline(line , 255 ) )

View File

@ -1,34 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef PLUGIN_H #ifndef PLUGIN_H
#define PLUGIN_H #define PLUGIN_H

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include "CString.h" #include "CString.h"
#include "string.h" #include "string.h"

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef STRING_CUSTOM_H #ifndef STRING_CUSTOM_H
#define STRING_CUSTOM_H #define STRING_CUSTOM_H

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef CTASK_H #ifndef CTASK_H
#define CTASK_H #define CTASK_H

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include "CVault.h" #include "CVault.h"
#include "CFile.h" #include "CFile.h"

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef VAULT_CUSTOM_H #ifndef VAULT_CUSTOM_H
#define VAULT_CUSTOM_H #define VAULT_CUSTOM_H

View File

@ -2056,7 +2056,7 @@ int g_CallFunc_CurParam = 0; // Current param id
#define CALLFUNC_FLAG_BYREF 1 /* Byref flag so that mem is released */ #define CALLFUNC_FLAG_BYREF 1 /* Byref flag so that mem is released */
// native callfunc_begin(const plugin[], const func[]); // native callfunc_begin(const func[], const plugin[]="");
static cell AMX_NATIVE_CALL callfunc_begin(AMX *amx, cell *params) static cell AMX_NATIVE_CALL callfunc_begin(AMX *amx, cell *params)
{ {
CPluginMngr::CPlugin *curPlugin = g_plugins.findPluginFast(amx); CPluginMngr::CPlugin *curPlugin = g_plugins.findPluginFast(amx);
@ -2070,8 +2070,8 @@ static cell AMX_NATIVE_CALL callfunc_begin(AMX *amx, cell *params)
int numparams = *params / sizeof(cell); int numparams = *params / sizeof(cell);
int len; int len;
char *pluginStr = get_amxstring(amx, params[1], 0, len); char *pluginStr = get_amxstring(amx, params[2], 0, len);
char *funcStr = get_amxstring(amx, params[2], 1, len); char *funcStr = get_amxstring(amx, params[1], 1, len);
CPluginMngr::CPlugin *plugin = NULL; CPluginMngr::CPlugin *plugin = NULL;
if (!pluginStr || !*pluginStr) if (!pluginStr || !*pluginStr)
plugin = curPlugin; plugin = curPlugin;

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
// intptr_t // intptr_t
#ifdef _MSC_VER #ifdef _MSC_VER

View File

@ -212,8 +212,8 @@ int Spawn( edict_t *pent ) {
hostname = CVAR_GET_POINTER("hostname"); hostname = CVAR_GET_POINTER("hostname");
mp_timelimit = CVAR_GET_POINTER("mp_timelimit"); mp_timelimit = CVAR_GET_POINTER("mp_timelimit");
// ###### Initialize logging] // ###### Initialize logging
g_log_dir.set( get_localinfo("amx_logdir" , "addons/amx/logs" ) ); g_log_dir.set( get_localinfo("amx_logdir" , "addons/amxx/logs" ) );
UTIL_MakeNewLogFile(); UTIL_MakeNewLogFile();
// ###### Initialize task manager // ###### Initialize task manager
@ -229,7 +229,7 @@ int Spawn( edict_t *pent ) {
Vault amx_config; Vault amx_config;
// ###### Load custom path configuration // ###### Load custom path configuration
amx_config.setSource( build_pathname("%s", amx_config.setSource( build_pathname("%s",
get_localinfo("amx_cfg" , "addons/amx/config.ini")) ); get_localinfo("amx_cfg" , "addons/amxx/config/core.ini")) );
if ( amx_config.loadVault() ){ if ( amx_config.loadVault() ){
Vault::iterator a = amx_config.begin(); Vault::iterator a = amx_config.begin();
@ -241,10 +241,10 @@ int Spawn( edict_t *pent ) {
} }
// ###### Make sure basedir is set // ###### Make sure basedir is set
get_localinfo("amx_basedir" , "addons/amx" ); get_localinfo("amx_basedir" , "addons/amxx" );
// ###### Load modules // ###### Load modules
int loaded = loadModules( get_localinfo("amx_modules" , "addons/amx/modules.ini" ) ); int loaded = loadModules( get_localinfo("amx_modules" , "addons/amxx/config/modules.ini" ) );
attachModules(); attachModules();
// Set some info about amx version and modules // Set some info about amx version and modules
if ( loaded ){ if ( loaded ){
@ -261,7 +261,7 @@ int Spawn( edict_t *pent ) {
// ###### Load Vault // ###### Load Vault
g_vault.setSource( build_pathname("%s", g_vault.setSource( build_pathname("%s",
get_localinfo("amx_vault" , "addons/amx/vault.ini" ) ) ); get_localinfo("amx_vault" , "addons/amxx/config/vault.ini" ) ) );
g_vault.loadVault( ); g_vault.loadVault( );
@ -276,7 +276,7 @@ int Spawn( edict_t *pent ) {
// ###### Load AMX scripts // ###### Load AMX scripts
g_plugins.loadPluginsFromFile( g_plugins.loadPluginsFromFile(
get_localinfo("amx_plugins" , "addons/amx/plugins/plugins.ini" ) ); get_localinfo("amx_plugins" , "addons/amxx/config/plugins.ini" ) );
// ###### Call precache forward function // ###### Call precache forward function
g_dontprecache = false; g_dontprecache = false;
@ -962,7 +962,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
CVAR_REGISTER (&init_amxmodx_version); CVAR_REGISTER (&init_amxmodx_version);
amx_version = CVAR_GET_POINTER(init_amx_version.name ); amx_version = CVAR_GET_POINTER(init_amx_version.name );
amxmodx_version = CVAR_GET_POINTER(init_amxmodx_version.name); amxmodx_version = CVAR_GET_POINTER(init_amxmodx_version.name);
REG_SVR_COMMAND("amx",amx_command); REG_SVR_COMMAND("amxx",amx_command);
char gameDir[512]; char gameDir[512];
GET_GAME_DIR(gameDir); GET_GAME_DIR(gameDir);
@ -975,7 +975,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
// ###### Now attach metamod modules // ###### Now attach metamod modules
attachMetaModModules( get_localinfo("amx_modules" , attachMetaModModules( get_localinfo("amx_modules" ,
"addons/amx/modules.ini" ) ); "addons/amxx/config/modules.ini" ) );
return(TRUE); return(TRUE);
} }
@ -1005,7 +1005,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) {
// ###### Now dettach metamod modules // ###### Now dettach metamod modules
dettachMetaModModules( get_localinfo("amx_modules" , dettachMetaModModules( get_localinfo("amx_modules" ,
"addons/amx/modules.ini" ) ); "addons/amxx/config/modules.ini" ) );
return(TRUE); return(TRUE);
} }

View File

@ -282,6 +282,32 @@ char* build_pathname(char *fmt, ... )
return string; return string;
} }
// build pathname based on addons dir
char* build_pathname_addons(char *fmt, ... )
{
static char string[256];
va_list argptr;
va_start (argptr, fmt);
vsnprintf (string, 255, fmt, argptr);
va_end (argptr);
char* path = string;
while (*path)
{
#ifndef __linux__
if (*path == '/') *path = '\\';
#else
if (*path == '\\') *path = '/';
#endif
++path;
}
return string;
}
int add_amxnatives(module_info_s* info,AMX_NATIVE_INFO*natives) int add_amxnatives(module_info_s* info,AMX_NATIVE_INFO*natives)
{ {
CList<CModule>::iterator a = g_modules.begin(); CList<CModule>::iterator a = g_modules.begin();
@ -333,11 +359,10 @@ int loadModules(const char* filename)
{ {
*moduleName = 0; *moduleName = 0;
sscanf(line,"%s",moduleName); sscanf(line,"%s",moduleName);
if (!isalnum(*moduleName) || !validFile(moduleName) ) if (!isalnum(*moduleName) || !validFile(moduleName) )
continue; continue;
char* pathname = build_pathname("%s",moduleName); char* pathname = build_pathname("addons/amxx/modules/%s", line);
CList<CModule>::iterator a = g_modules.find( pathname ); CList<CModule>::iterator a = g_modules.find( pathname );
@ -451,7 +476,8 @@ void dettachMetaModModules( const char* filename )
if (!isalnum(*moduleName) || !validFile(moduleName) ) if (!isalnum(*moduleName) || !validFile(moduleName) )
continue; continue;
char* pathname = build_pathname("%s",moduleName); char* pathname = build_pathname_addons("addons/amxx/modules/%s", line);
char* mmpathname = build_pathname_addons("addons/amxx/modules/%s", line);
module = DLLOAD( pathname ); // link dll module = DLLOAD( pathname ); // link dll
@ -461,7 +487,7 @@ void dettachMetaModModules( const char* filename )
if ( a ) if ( a )
{ {
snprintf(cmdline,255, "meta unload %s\n", strip_name(moduleName) ); snprintf(cmdline,255, "meta unload %s\n", strip_name(mmpathname) );
cmdline[255] = 0; cmdline[255] = 0;
SERVER_COMMAND( cmdline ); SERVER_COMMAND( cmdline );
} }
@ -494,8 +520,8 @@ void attachMetaModModules( const char* filename )
if (!isalnum(*moduleName) || !validFile(moduleName) ) if (!isalnum(*moduleName) || !validFile(moduleName) )
continue; continue;
char* pathname = build_pathname("%s",moduleName); char* pathname = build_pathname("addons/amxx/modules/%s", line);
char* mmpathname = build_pathname_addons("addons/amxx/modules/%s", line);
module = DLLOAD( pathname ); // link dll module = DLLOAD( pathname ); // link dll
if ( module ) if ( module )
@ -504,7 +530,7 @@ void attachMetaModModules( const char* filename )
if ( a ) if ( a )
{ {
snprintf(cmdline,255, "meta load %s\n", moduleName ); snprintf(cmdline,255, "meta load %s\n", mmpathname );
cmdline[255] = 0; cmdline[255] = 0;
SERVER_COMMAND( cmdline ); SERVER_COMMAND( cmdline );
++loaded; ++loaded;

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#ifndef __MODULES_H__ #ifndef __MODULES_H__
#define __MODULES_H__ #define __MODULES_H__

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>
@ -172,9 +172,9 @@ void amx_command(){
{ {
print_srvconsole("Usage: amx < command > [ argument ]\n"); print_srvconsole("Usage: amxx < command > [ argument ]\n");
print_srvconsole("Commands:\n"); print_srvconsole("Commands:\n");
print_srvconsole(" version - display amx version info\n"); print_srvconsole(" version - display amxx version info\n");
print_srvconsole(" plugins - list plugins currently loaded\n"); print_srvconsole(" plugins - list plugins currently loaded\n");
print_srvconsole(" modules - list modules currently loaded\n"); print_srvconsole(" modules - list modules currently loaded\n");
print_srvconsole(" cvars - list cvars registered by plugins\n"); print_srvconsole(" cvars - list cvars registered by plugins\n");
@ -209,7 +209,7 @@ void plugin_srvcmd()
if ((err = amx_Exec( (*a).getPlugin()->getAMX(), &ret , (*a).getFunction() if ((err = amx_Exec( (*a).getPlugin()->getAMX(), &ret , (*a).getFunction()
, 3 , g_srvindex , (*a).getFlags() , (*a).getId() )) != AMX_ERR_NONE) , 3 , g_srvindex , (*a).getFlags() , (*a).getId() )) != AMX_ERR_NONE)
print_srvconsole("[AMX] Run time error %d on line %ld (plugin \"%s\")\n", UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName()); err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
if ( ret ) break; if ( ret ) break;
@ -221,7 +221,7 @@ void plugin_srvcmd()
#ifdef ENABLEEXEPTIONS #ifdef ENABLEEXEPTIONS
}catch( ... ) }catch( ... )
{ {
print_srvconsole( "[AMX] fatal error at forward function execution\n"); UTIL_Log( "[AMXX] fatal error at forward function execution");
} }
#endif #endif

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>

View File

@ -1,33 +1,33 @@
/* AMX Mod X /*
* * Copyright (c) 2002-2003 Aleksander Naszko
* by the AMX Mod X Development Team *
* originally developed by OLO * This file is part of AMX Mod.
* *
* * AMX Mod is free software; you can redistribute it and/or modify it
* 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
* under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at
* Free Software Foundation; either version 2 of the License, or (at * your option) any later version.
* your option) any later version. *
* * AMX Mod is distributed in the hope that it will be useful, but
* This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
* General Public License for more details. *
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License * along with AMX Mod; if not, write to the Free Software Foundation,
* along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* * In addition, as a special exception, the author gives permission to
* In addition, as a special exception, the author gives permission to * link the code of this program with the Half-Life Game Engine ("HL
* link the code of this program with the Half-Life Game Engine ("HL * Engine") and Modified Game Libraries ("MODs") developed by Valve,
* Engine") and Modified Game Libraries ("MODs") developed by Valve, * L.L.C ("Valve"). You must obey the GNU General Public License in all
* L.L.C ("Valve"). You must obey the GNU General Public License in all * respects for all of the code used other than the HL Engine and MODs
* respects for all of the code used other than the HL Engine and MODs * from Valve. If you modify this file, you may extend this exception
* from Valve. If you modify this file, you may extend this exception * to your version of the file, but you are not obligated to do so. If
* to your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your
* you do not wish to do so, delete this exception statement from your * version.
* version. *
*/ */
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>