#include
#define PLUGIN "Motd окно"
#define VERSION "1.0"
#define AUTHOR "PlaCSa"
new szPort[16], newDay[4], CurrentTime1[32], CurrentTime[32], MaxPlayers, players, MapName[32], ip[17], sname[35]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /motd","Motd")
register_clcmd("say_team /motd","Motd")
}
public client_putinserver(id)
{
set_task(0.5, "Motd", id)
}
public Motd(id)
{
static motd[2000],header[100],name[32],len
len = 0
get_user_name(id, name, 31)
get_user_ip(0,ip,16,1)
szPort[ 0 ] = ':'
get_cvar_string( "port", szPort[1], 14 );
players = get_playersnum()
get_mapname(MapName,31)
MaxPlayers = get_maxplayers()
get_time("%X",CurrentTime,31)
get_time("%x",CurrentTime1,31)
get_time("%j", newDay, 3)
new newDay2 = str_to_num(newDay)
get_cvar_string("hostname",sname,sizeof sname-1);
len += formatex(motd[len],sizeof motd - 1 - len,"")
len += formatex(motd[len],sizeof motd - 1 - len,"
")
len += formatex(motd[len],sizeof motd - 1 - len,"
Здравствуй!: %s
", name)
len += formatex(motd[len],sizeof motd - 1 - len,"Рады тебя видеть на: %s
", sname)
len += formatex(motd[len],sizeof motd - 1 - len,"IP сервера: %s%s
", ip, szPort)
len += formatex(motd[len],sizeof motd - 1 - len,"Карта: %s
", MapName)
len += formatex(motd[len],sizeof motd - 1 - len,"Игроков на сервери: %d/%d", players, MaxPlayers)
len += formatex(motd[len],sizeof motd - 1 - len,"
Время: %s | Дата: %s
", CurrentTime, CurrentTime1)
len += formatex(motd[len],sizeof motd - 1 - len,"
")
len += formatex(motd[len],sizeof motd - 1 - len,"
Сайт сервера свой ! | Motd окно by placsa ")
len += formatex(motd[len],sizeof motd - 1 - len,"
До нового (2014) Года Осталось %d Дней ", (365 - newDay2))
show_motd(id,motd,header)
}