which code do i use to recieve hostname? .. I'm a new coder.. I was coding this plugin, and i got stuck here and i dunno what to do...
Code:
#include <amxmodx>
#include <colorchat>
new const PLUGIN[ ] = "Welcome messages"
new const VERSION[ ] = "1.0"
new const AUTHOR[ ] = "FlyingHorse"
new prefix[ ] = "[AMXX]^x04"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public welcomemsg(id)
{
new name[33]
get_user_name(id, name, 32)
ColorChat(id, RED, "%s %s, Welcome to (hostname)", prefix, name)
}
public client_putinserver(id)
{
set_task(10.0, "welcomemsg", id)
}
instead of (hostname) I want it to read the servers hostname, to whatever i change it to.. Instead of having to change the code every time i want to change hostname.