View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-15-2011 , 14:48   Re: Server Name Characters
Reply With Quote #4

Quote:
Originally Posted by Ginxeng View Post
The plugin way

Code:
#include <sourcemod>  
public OnMapStart()  
{  
    ServerCommand("hostname  YOUR SERVER NAME GOES HERE");  
}  
public Plugin:myinfo =
{
 name = "Autoexec Server Name",
 author = "GinXeng",
 description = "Exec Server name or some shit like that",
 version = SOURCEMOD_VERSION,
 url = "http://www.pcgametime.com"
};
Since hostname is a cvar, why wouldn't you just use the cvar commands to do it rather than executing it as a command?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline