开局提示STATS
如图所示,每次开局时都会以HUD在玩家屏幕右上角提示这段信息:
目前服务器运行状态
当前地图:de_dust2
运行FPS:510/秒 在线人数: 2/32
不知道这个东西是否需要booster的支持
知道这个插件名字的请说下
有源码的请打包成RAR或直接贴上来
{:soso_e181:} 看样子不错的插件 :D 这插件有现成的 我是新手 发表于 2013-3-18 21:06 static/image/common/back.gif
这插件有现成的
有源码吗? :handshake 本帖最后由 我是新手 于 2013-3-29 21:17 编辑
99fps 发表于 2013-3-19 00:01 static/image/common/back.gif
有源码吗?
比你那个显示的更全面,自己汉化下吧。
万幸找到了,差点放弃...
/* This plugin is made by xakintosh with Amxmodx Studio 1.4.3 (final) */
// Thanks to @He3aBucuM
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
new hud_rgb, hud_x, hud_y, hud_effects,maxplayers,hudsync, curr_uptime, g_round = 1;
public plugin_init() {
register_plugin("Server Side Info","1.6","xakintosh")
hud_rgb = register_cvar( "srv_hud_rgb", "0 255 0" )
hud_x = register_cvar( "srv_hud_x", "0.11" )
hud_y = register_cvar( "srv_hud_y", "0.00" )
hud_effects = register_cvar( "srv_hud_effects", "0" )
hudsync = CreateHudSyncObj()
maxplayers = get_maxplayers()
set_task(0.1, "Fwd_StartFrame", 1, "", 0, "b")
set_task(0.1, "check_uptime", _, _, _, "b")
register_forward(FM_StartFrame, "Fwd_StartFrame")
register_event("HLTV", "event_newround", "a", "1=0", "2=0");
}
public event_newround() {
g_round++
}
public Fwd_StartFrame(id) {
new timestring
get_time("%H:%M:%S",timestring,8)
static Float:GameTime, Float:FramesPer = 0.0
static Float:Fps
GameTime = get_gametime()
if(FramesPer >= GameTime)
Fps += 1.0;
else {
FramesPer = FramesPer + 1.0
for( new id = 1; id <= maxplayers; id++ ) {
new ip,red, green, blue
new const admins = GetTotalAdmins()
new timeleft = get_timeleft()
get_hud_color(red, green, blue)
get_user_ip(0, ip, 31, 1)
set_hudmessage(red,green,blue,get_pcvar_float(hud_x),get_pcvar_float(hud_y),get_pcvar_num(hud_effects),6.0,1.0)
ShowSyncHudMsg(id,hudsync,"|* --------------------* Information *-------------------- *|^n|* Timeleft: %d:%02d | Thetime: %s^n|* Server FPS: %.1f | Server IP: %s^n|* Server Uptime: %s^n|* Frags: %i | Deaths: %i | Admins: %i | Round: %d",timeleft / 60, timeleft % 60,timestring,Fps,ip,curr_uptime,get_user_frags(id),get_user_deaths(id),admins,g_round)
}
Fps = 0.0
}
}
get_hud_color(&r, &g, &b) {
new color
static red, green, blue
get_pcvar_string(hud_rgb, color, charsmax(color))
parse(color, red, charsmax(red), green, charsmax(green), blue, charsmax(blue))
r = str_to_num(red)
g = str_to_num(green)
b = str_to_num(blue)
}
static GetTotalAdmins() {
new iPlayers,iNum,Admins
get_players(iPlayers,iNum)
for(new Count;Count < iNum;Count++)
if(is_user_admin(iPlayers))
Admins++
return Admins
}
public check_uptime() {
new Float:ft = Float:engfunc(EngFunc_Time)
new it = floatround(ft)
new m = (it / 60) % 60
new h = (it / 3600) % 24
new d = it / 86400
format(curr_uptime, 21, "%id:%ih:%im", d, h, m)
} 我是新手 发表于 2013-3-29 21:15 static/image/common/back.gif
比你那个显示的更全面,自己汉化下吧。
万幸找到了,差点放弃...
真系好銀!:'(
謝謝了!:loveliness: 弄几个图片上来看看。 我我我哦我我哦
页:
[1]