新的显示时间的插件
#include <amxmisc>#include <fun>
#include <fakemeta>
#include <engine>
#include <cstrike>
#define PLUGIN "Show Time"
#define VERSION "1.0"
#define AUTHOR "YJ Dev Team:Jakyo"
new g_MapName
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
get_mapname(g_MapName, sizeof(g_MapName)-1)
}
public client_putinserver(id)
{
set_task(1.0, "showtime", id + 7890)
}
public showtime(taskid)
{
new id = taskid - 7890
new msg, serverip
if (is_user_connected(id))
{
new year,month,day,hour, minute, second
date(year, month, day)
time(hour, minute, second)
get_user_ip(0, serverip, 16, 0)
new mapname
get_cvar_string("amx_nextmap",mapname,31)
new a = get_timeleft()
format(msg, 511, "%sIP:%s", msg, serverip)
format(msg, 511, "%s^nQun Hao: 789456 456789", msg)
new bossid = get_flags_user()
if (bossid)
{
new name
get_user_name(bossid, name ,32)
format(msg, 511, "%s^nBOSS: %s", msg, name)
}
else
format(msg, 511, "%s^nBOSS: Mei You Boss Zai Xian", msg)
format(msg, 511, "%s^n---------------------------", msg)
format(msg, 511, "%s^n%d-%d-%d- %d:%d:%d", msg, year, month, day ,hour, minute, second)
format(msg, 511, "%s^nThis Map:%s", msg, g_MapName)
format(msg, 511, "%s^nNext Map:%s", msg, mapname)
format(msg, 511, "%s^nTime Left:%d:%d", msg, a / 60,a % 60)
// format(msg, 511, "%s^nServer FPS:%s", msg, mapname)
format(msg, 511, "%s^n---------------------------", msg)
set_hudmessage(255, 255, 150, 0.8, 0.3, 0, 0.0, 1.0, 0.1, 0.1, 3)
show_hudmessage(id, "%s", msg)
set_task(1.0, "showtime", id + 7890)
}
}
public get_flags_user()
{
for (new id=1; id<=32; id++)
{
if (is_user_connected(id) && get_user_flags(id))
{
return id
}
}
return 0
} 这是截图,........... 顶一个,谢谢分享 我所在 用户组无法查看附件 和截图 是什么意思 附加上图就更好了 这个源码绝对好啊,效果非常好 没有图片吗? 附加上图就更好了 怎么下载不了啊,好东西啊 发的是源码,很感激。但每次下载玩了 几乎都是编译不了的鸟东西。各种忽悠。建议可以用的情况下在发。
页:
[1]
2