[求助]关于timeprojector.sma显示服的FPS问题
路过一个服,看到服里的timeprojector.amxx 玩家右上角增加了一个显示服即时FPS状态的,很不错,于是我就想学改下增加,结果发现模仿了nextmap的调用,这里 Next map: %sn^server_FPS: %s 就冲突了,无法编译,请教高手们,应该怎么改才可以显示到下张图名和服FPS,下附源码/**AMX Mod script.
*
* (c) Copyright 2003, ST4life
* This file is provided as is (no warranties).
*/
#include <amxmod>
/*
* TimeProjector displays the remaining time and the next map on the top right corner of the client
* display as a hudmessage.
*
* History:
*
* v0.1: - first release
*/
public show_timer(){
new nextmap
new server_fps
get_cvar_string("amx_nextmap",nextmap,31)
get_cvar_string("server_fps",server_fps,31)
new timeleft = get_timeleft()
set_hudmessage(255,255,255,0.75,0.05,0, 1.0, 1.0, 0.1, 0.2, 13)
show_hudmessage(0,"Time remaining: %d:%02d^nNext map: %sn^server_FPS: %s",timeleft / 60, timeleft % 60,nextmap,server_fps)
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin("TimeProjector","0.1","ST4life")
set_task(1.0, "show_timer",0,"",0,"b")
return PLUGIN_CONTINUE
}
说明下,我如果去了Next map: %s和next maps调用函数 只使用 server_FPS: %s 就可以编译 不懂,帮你顶,加油。。。 帮你顶一下、 高手来回答最好了 show_hudmessage(0,"Time remaining: %d:%02d^nNext map: %sn^server_FPS: %s",timeleft / 60, timeleft % 60,nextmap,server_fps)
裡面的n^ (<-這地方應該是^n代表換行,原來是n^應該是手誤)server_FPS: %s server_fps: %d而不是%s 那里写错了、
要从系写 我只能帮忙顶一下了。。。。 帮忙顶下,嘻嘻
页:
[1]