hardcoded pathes
This commit is contained in:
parent
31f59ea92e
commit
0bdc09d3d9
|
@ -71,11 +71,8 @@ public plugin_init()
|
||||||
|
|
||||||
remove_user_flags(0,read_flags("z")) // Remove 'user' flag from server rights
|
remove_user_flags(0,read_flags("z")) // Remove 'user' flag from server rights
|
||||||
|
|
||||||
new filename[64]
|
server_cmd("exec addons/amxx/amx.cfg") // Execute main configuration file
|
||||||
get_basedir( filename , 31 )
|
loadSettings("addons/amxx/configs/users.ini") // Load admins accounts
|
||||||
server_cmd("exec %s/amx.cfg" , filename ) // Execute main configuration file
|
|
||||||
format( filename, 63 , "%s/configs/users.ini" , filename )
|
|
||||||
loadSettings( filename ) // Load admins accounts
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadSettings(szFilename[])
|
loadSettings(szFilename[])
|
||||||
|
|
|
@ -80,10 +80,8 @@ public plugin_init()
|
||||||
|
|
||||||
remove_user_flags(0,read_flags("z")) // remove 'user' flag from server rights
|
remove_user_flags(0,read_flags("z")) // remove 'user' flag from server rights
|
||||||
|
|
||||||
new filename[32]
|
server_cmd("exec addons/amxx/amx.cfg")
|
||||||
get_basedir( filename , 31 )
|
server_cmd("exec addons/amxx/configs/mysql.cfg;amx_sqladmins")
|
||||||
server_cmd("exec %s/amx.cfg" , filename)
|
|
||||||
server_cmd("exec %s/configs/mysql.cfg;amx_sqladmins" , filename)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public adminSql() {
|
public adminSql() {
|
||||||
|
|
|
@ -90,20 +90,18 @@ public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Commands Menu","0.1","AMXX Dev Team")
|
register_plugin("Commands Menu","0.1","AMXX Dev Team")
|
||||||
|
|
||||||
new basedir[32], workdir[64]
|
new config[64]
|
||||||
get_basedir( basedir , 31 )
|
|
||||||
for(new a = 0; a < MAX_CMDS_LAYERS; ++a) {
|
for(new a = 0; a < MAX_CMDS_LAYERS; ++a) {
|
||||||
register_menucmd(register_menuid( g_cmdMenuName[ a ] ),1023,"actionCmdMenu")
|
register_menucmd(register_menuid( g_cmdMenuName[ a ] ),1023,"actionCmdMenu")
|
||||||
register_clcmd( g_cmdMenuCmd[ a ] ,"cmdCmdMenu",ADMIN_MENU, g_cmdMenuHelp[ a ] )
|
register_clcmd( g_cmdMenuCmd[ a ] ,"cmdCmdMenu",ADMIN_MENU, g_cmdMenuHelp[ a ] )
|
||||||
format( workdir, 63, "%s/configs/%s" , basedir , g_cmdMenuCfg[ a ] )
|
format(config,63,"addons/amxx/configs/%s",g_cmdMenuCfg[a])
|
||||||
loadCmdSettings( workdir , a )
|
loadCmdSettings(config,a)
|
||||||
}
|
}
|
||||||
|
|
||||||
register_menucmd(register_menuid("Cvars Menu"),1023,"actionCvarMenu")
|
register_menucmd(register_menuid("Cvars Menu"),1023,"actionCvarMenu")
|
||||||
register_clcmd("amx_cvarmenu","cmdCvarMenu",ADMIN_CVAR,"- displays cvars menu")
|
register_clcmd("amx_cvarmenu","cmdCvarMenu",ADMIN_CVAR,"- displays cvars menu")
|
||||||
|
|
||||||
format( workdir, 63, "%s/configs/cvars.ini" , basedir )
|
loadCvarSettings("addons/amxx/configs/cvars.ini")
|
||||||
loadCvarSettings( workdir )
|
|
||||||
|
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,11 +92,9 @@ stock is_running(const arg[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
stock build_path( path[] , len , {Float,_}:... ) {
|
stock build_path( path[] , len , {Float,_}:... ) {
|
||||||
new basedir[32]
|
|
||||||
get_localinfo( "amxx_basedir", basedir , 31 )
|
|
||||||
format_args( path , len , 2 )
|
format_args( path , len , 2 )
|
||||||
return replace( path , len , "$basedir", basedir )
|
return replace( path , len , "$basedir", "addons/amxx" )
|
||||||
}
|
}
|
||||||
|
|
||||||
stock get_basedir( name[], len )
|
stock get_basedir( name[], len )
|
||||||
return get_localinfo( "amxx_basedir", name , len )
|
return copy(name,len,"addons/amxx")
|
|
@ -63,9 +63,7 @@ public plugin_init()
|
||||||
get_localinfo("lastMap",g_lastMap,31)
|
get_localinfo("lastMap",g_lastMap,31)
|
||||||
set_localinfo("lastMap","")
|
set_localinfo("lastMap","")
|
||||||
|
|
||||||
new filename[64]
|
if ( loadSettings("addons/amxx/configs/maps.ini") )
|
||||||
build_path( filename , 63 , "$basedir/configs/maps.ini" )
|
|
||||||
if ( loadSettings( filename ) )
|
|
||||||
set_task(15.0,"voteNextmap",987456,"",0,"b")
|
set_task(15.0,"voteNextmap",987456,"",0,"b")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,7 @@ public plugin_init()
|
||||||
register_menucmd(register_menuid("Votemap Menu"),1023,"actionVoteMapMenu")
|
register_menucmd(register_menuid("Votemap Menu"),1023,"actionVoteMapMenu")
|
||||||
register_menucmd(register_menuid("The winner: ") ,3,"actionResult")
|
register_menucmd(register_menuid("The winner: ") ,3,"actionResult")
|
||||||
|
|
||||||
new filename[64]
|
load_settings("addons/amxx/configs/maps.ini")
|
||||||
build_path( filename , 63 , "$basedir/configs/maps.ini" )
|
|
||||||
load_settings( filename )
|
|
||||||
|
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
#define MAX_SYSTEM 32
|
#define MAX_SYSTEM 32
|
||||||
|
|
||||||
new g_menuPos[33]
|
new g_menuPos[33]
|
||||||
new g_fileToSave[64]
|
new g_fileToSave[] = "addons/amxx/configs/pausecfg.ini"
|
||||||
new g_cstrikeRunning
|
new g_cstrikeRunning
|
||||||
new g_Modified
|
new g_Modified
|
||||||
new g_couldntFind[] = "Couldn't find a plugin matching ^"%s^""
|
new g_couldntFind[] = "Couldn't find a plugin matching ^"%s^""
|
||||||
|
@ -82,7 +82,6 @@ public cmdON(id,level,cid){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public plugin_cfg() {
|
public plugin_cfg() {
|
||||||
build_path( g_fileToSave , 63 , "$basedir/configs/pausecfg.ini" )
|
|
||||||
loadSettings(g_fileToSave)
|
loadSettings(g_fileToSave)
|
||||||
// Put here titles of plugins which you don't want to pause
|
// Put here titles of plugins which you don't want to pause
|
||||||
server_cmd(g_addCmd , "Pause Plugins" )
|
server_cmd(g_addCmd , "Pause Plugins" )
|
||||||
|
|
|
@ -70,9 +70,7 @@ public plugin_init()
|
||||||
|
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
|
|
||||||
new filename[64]
|
load_settings("addons/amxx/configs/clcmds.ini")
|
||||||
build_path( filename , 63 , "$basedir/configs/clcmds.ini" )
|
|
||||||
load_settings( filename )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ban menu */
|
/* Ban menu */
|
||||||
|
|
|
@ -366,9 +366,9 @@ public plugin_init(){
|
||||||
#if defined MAPSETTINGS
|
#if defined MAPSETTINGS
|
||||||
new mapname[32]
|
new mapname[32]
|
||||||
get_mapname(mapname,31)
|
get_mapname(mapname,31)
|
||||||
build_path( g_saveFile , 63 , "$basedir/configs/weaprest_%s.ini" ,mapname )
|
build_path(g_saveFile,63,"addons/amxx/configs/weaprest_%s.ini",mapname)
|
||||||
#else
|
#else
|
||||||
build_path( g_saveFile , 63 , "$basedir/configs/weaprest.ini" )
|
build_path(g_saveFile,63,"addons/amxx/configs/weaprest.ini")
|
||||||
#endif
|
#endif
|
||||||
loadSettings(g_saveFile)
|
loadSettings(g_saveFile)
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ new g_menuDataVar[MAX_MENU_DATA][32]
|
||||||
new g_menuDataId[MAX_MENU_DATA]
|
new g_menuDataId[MAX_MENU_DATA]
|
||||||
new g_menuDataNum
|
new g_menuDataNum
|
||||||
new g_menuPosition[33]
|
new g_menuPosition[33]
|
||||||
new g_fileToSave[64]
|
new g_fileToSave[] = "addons/amxx/configs/stats.ini"
|
||||||
new bool:g_modified
|
new bool:g_modified
|
||||||
|
|
||||||
public plugin_precache(){
|
public plugin_precache(){
|
||||||
|
@ -53,7 +53,6 @@ public plugin_precache(){
|
||||||
public plugin_init() {
|
public plugin_init() {
|
||||||
register_plugin("Stats Configuration","0.1","AMXX Dev Team")
|
register_plugin("Stats Configuration","0.1","AMXX Dev Team")
|
||||||
register_menucmd(register_menuid("\yStats Configuration"),1023,"actionCfgMenu")
|
register_menucmd(register_menuid("\yStats Configuration"),1023,"actionCfgMenu")
|
||||||
build_path( g_fileToSave , 63 , "$basedir/configs/stats.ini" )
|
|
||||||
loadSettings(g_fileToSave)
|
loadSettings(g_fileToSave)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,16 +45,13 @@
|
||||||
new g_cstrikeRunning
|
new g_cstrikeRunning
|
||||||
|
|
||||||
#if defined READ_FROM_FILE
|
#if defined READ_FROM_FILE
|
||||||
new g_motdFile[64]
|
new g_motdFile[] = "addons/amxx/configs/conmotd.txt"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Welcome Message","0.1","AMXX Dev Team")
|
register_plugin("Welcome Message","0.1","AMXX Dev Team")
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
#if defined READ_FROM_FILE
|
|
||||||
build_path( g_motdFile , 63 , "$basedir/configs/conmotd.txt" )
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public plugin_cfg()
|
public plugin_cfg()
|
||||||
|
@ -118,7 +115,7 @@ public alt_motd(param[]) {
|
||||||
new mod_ver[32]
|
new mod_ver[32]
|
||||||
len += copy(motdBody[len],MOTD_LENGTH-len,"<br>Server mods:<ul>")
|
len += copy(motdBody[len],MOTD_LENGTH-len,"<br>Server mods:<ul>")
|
||||||
get_cvar_string("amxmodx_version",mod_ver,31)
|
get_cvar_string("amxmodx_version",mod_ver,31)
|
||||||
if (mod_ver[0]) len += format(motdBody[len],MOTD_LENGTH-len,"<li>AMX Mod %s</li>",mod_ver)
|
if (mod_ver[0]) len += format(motdBody[len],MOTD_LENGTH-len,"<li>AMX Mod X %s</li>",mod_ver)
|
||||||
get_cvar_string("statsme_version",mod_ver,31)
|
get_cvar_string("statsme_version",mod_ver,31)
|
||||||
if (mod_ver[0]) len += format(motdBody[len],MOTD_LENGTH-len,"<li>StatsMe %s</li>",mod_ver)
|
if (mod_ver[0]) len += format(motdBody[len],MOTD_LENGTH-len,"<li>StatsMe %s</li>",mod_ver)
|
||||||
get_cvar_string("clanmod_version",mod_ver,31)
|
get_cvar_string("clanmod_version",mod_ver,31)
|
||||||
|
|
|
@ -43,16 +43,13 @@
|
||||||
new g_cstrikeRunning
|
new g_cstrikeRunning
|
||||||
|
|
||||||
#if defined READ_FROM_FILE
|
#if defined READ_FROM_FILE
|
||||||
new g_motdFile[64]
|
new g_motdFile[] = "addons/amxx/configs/conmotd.txt"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Welcome Message","0.1","AMXX Dev Team")
|
register_plugin("Welcome Message","0.1","AMXX Dev Team")
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
#if defined READ_FROM_FILE
|
|
||||||
build_path( g_motdFile , 63 , "$basedir/configs/conmotd.txt" )
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
new g_Bar[] = "=============="
|
new g_Bar[] = "=============="
|
||||||
|
@ -104,7 +101,7 @@ public client_connect(id) {
|
||||||
new mod_ver[32]
|
new mod_ver[32]
|
||||||
client_cmd(id, "echo ;echo ^" Server mods:^"")
|
client_cmd(id, "echo ;echo ^" Server mods:^"")
|
||||||
get_cvar_string("amxmodx_version",mod_ver,31)
|
get_cvar_string("amxmodx_version",mod_ver,31)
|
||||||
if (mod_ver[0]) client_cmd(id, "echo ^" o AMX Mod %s^"",mod_ver)
|
if (mod_ver[0]) client_cmd(id, "echo ^" o AMX Mod X %s^"",mod_ver)
|
||||||
get_cvar_string("statsme_version",mod_ver,31)
|
get_cvar_string("statsme_version",mod_ver,31)
|
||||||
if (mod_ver[0]) client_cmd(id, "echo ^" o StatsMe %s^"",mod_ver)
|
if (mod_ver[0]) client_cmd(id, "echo ^" o StatsMe %s^"",mod_ver)
|
||||||
get_cvar_string("clanmod_version",mod_ver,31)
|
get_cvar_string("clanmod_version",mod_ver,31)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user