je ai installé la version dispo sur
http://www.amxmodx.org qui se lance correctement, qui charge les nouveaux noms du serveur, mais qui n'est toujours pas visible de l'extérieur
PAr contre j'ai trouvé sur un forum la version codée par krotal qui fait merveille !!!!!
le plugin porte le même nom mais il n'a rien à voir... et là ça marche !!!
voici le plugin !
/*******************************************************************************
AMX Hostname Changer
Version: 0.1
Author: KRoT@L
0.1 Release
Changes the hostname of the server according to the value of specific cvars.
Cvars:
hostname_changer "1" - 0: disables the plugin
1: enables the plugin
default_hostname "" - default hostname of the server when no valid cvar/value
are found in the hostname_changer.cfg file
Setup:
Install the amx file.
Put the file hostname_changer.cfg in addons/amx/config/
Add lines like this to this cfg file:
name_of_the_cvar value "new hostname"
If this cvar exists, and if the value of this cvar is equal to the value specified
in the cfg file, the hostname of the server will be changed.
The first lines have priority over the last lines of the file.
Examples:
csdm_active 1 "My Server - CSDM Mod"
ka_arena 1 "My Server - Knife Arena Enabled"
*******************************************************************************/
#include <amxmodx>
#include <amxmisc>
new hostname_changer, default_hostname
public plugin_init()
{
register_plugin("Hostname Changer", "0.1", "KRoTaL")
hostname_changer = register_cvar("hostname_changer", "1")
default_hostname = register_cvar("default_hostname", "[FR] FoRuM-CS.com by NitroServ.com")
set_task(15.0, "check_cvars", 48768468, "", 0, "b")
}
public check_cvars()
{
if(!get_pcvar_num(hostname_changer))
return PLUGIN_CONTINUE
new text[128], line = 0, len
new configsDir[64]
get_configsdir(configsDir, 63)
format(configsDir, 63, "%s/hostname_changer.cfg", configsDir)
while(read_file(configsDir, line++, text, 127, len))
{
if(!len || text[0] == ';' || text[0] == '/') continue
new szCvar[32], szValue[32], szHostname[64]
parse(text, szCvar, 31, szValue, 31, szHostname, 63)
if(cvar_exists(szCvar))
{
new szOldValue[32]
get_cvar_string(szCvar, szOldValue, 31)
if(equal(szOldValue, szValue))
{
set_cvar_string("hostname", szHostname)
return PLUGIN_CONTINUE
}
}
}
new defaultHostname[64]
get_pcvar_string(default_hostname, defaultHostname, 63)
set_cvar_string("hostname", defaultHostname)
return PLUGIN_CONTINUE
}
_____________________________________________________
personnellement la cvar que j'ai utilisé dans mon cfg pour tracer le mode match est forcechasecam 1 ...
@++ et merci encore !
cyko