stable hostname

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
GE NI
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 12 Jun 2013, 22:48
Detinator Steam: Nu
Location: Albania
Has thanked: 43 times
Contact:

15 Feb 2014, 20:03

Nick Name : sOuL eAt3r #.
Plugin Name : Stable Hostname
Description : I need a plugin that doesnt allow hostname to be changed by hostname ose server.cfg

need it to be only be changing sma file

for example
hostname "Cs.ExtreamCs.Com"

and if i change it in server.cfg
ose amx_cvar hostname ""
not to be changed for any reson


need it urgent
RoyalServer
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

15 Feb 2014, 22:20

you can try this..
every 5 seconds the hostname is being checked.. if it`s not the same like in .sma it automatically set it to what u've set in .sma.

so if i change hostname with: amx_cvar hostname "#test"
after 5 seconds it'll be changed in http://www.eXtreamCS.com
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

	#include < amxmodx >
	
	#pragma semicolon 1
	
	new const
		PLUGIN_NAME[ ] 		= "New Plugin",
		PLUGIN_VERSION[ ] 	= "1.0";
	
	new const
		HOSTNAME[ ]		= "www.eXtreamCS.com";
		
		
			
public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	set_task( 5.0, "task_CheckHostName", _, _, _, "b", 0 );
	
	
	
	// Add your code here...
}

public task_CheckHostName( )
{
	static szHostName[ 64 ];
	get_cvar_string( "hostname", szHostName, sizeof( szHostName ) -1 );
	
	if( !equal( szHostName, HOSTNAME ) )
		set_cvar_string( "hostname", HOSTNAME );
		
		
}
i don't know other way :-?
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
User avatar
GE NI
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 12 Jun 2013, 22:48
Detinator Steam: Nu
Location: Albania
Has thanked: 43 times
Contact:

16 Feb 2014, 19:11

Askhanar wrote:you can try this..
every 5 seconds the hostname is being checked.. if it`s not the same like in .sma it automatically set it to what u've set in .sma.

so if i change hostname with: amx_cvar hostname "#test"
after 5 seconds it'll be changed in http://www.eXtreamCS.com
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

	#include < amxmodx >
	
	#pragma semicolon 1
	
	new const
		PLUGIN_NAME[ ] 		= "New Plugin",
		PLUGIN_VERSION[ ] 	= "1.0";
	
	new const
		HOSTNAME[ ]		= "www.eXtreamCS.com";
		
		
			
public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	set_task( 5.0, "task_CheckHostName", _, _, _, "b", 0 );
	
	
	
	// Add your code here...
}

public task_CheckHostName( )
{
	static szHostName[ 64 ];
	get_cvar_string( "hostname", szHostName, sizeof( szHostName ) -1 );
	
	if( !equal( szHostName, HOSTNAME ) )
		set_cvar_string( "hostname", HOSTNAME );
		
		
}
i don't know other way :-?

thanks

what if i set task 1.0 wil it be tested in 1 sec ??
and a question

should i set the hostname in the

"hostname" or "HOSTNAME"
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

16 Feb 2014, 20:10

there will be no problem if the task will be every 1 sec ..

here u set the hostname

Code: Select all

new const
		HOSTNAME[ ]		= "www.eXtreamCS.com";
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests