搜索
查看: 4858|回复: 10

[AMXX 带源码] 新的显示时间的插件

[复制链接]
发表于 2014-12-9 08:41:32 | 显示全部楼层 |阅读模式 来自 安徽六安
[mw_shl_code=pawn,true]#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[32]

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[512], serverip[32]
        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[32]
                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[33]
                        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
}[/mw_shl_code]
 楼主| 发表于 2014-12-9 08:43:01 | 显示全部楼层 来自 安徽六安
这是截图,...........

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

发表于 2014-12-9 12:37:33 | 显示全部楼层 来自 安徽宣城
顶一个,谢谢分享
回复

使用道具 举报

发表于 2014-12-9 16:47:53 | 显示全部楼层 来自 贵州黔西南州
我所在 用户组无法查看附件 和截图 是什么意思
回复

使用道具 举报

发表于 2015-1-7 22:39:29 | 显示全部楼层 来自 上海
附加上图就更好了
回复

使用道具 举报

发表于 2015-1-15 10:28:31 | 显示全部楼层 来自 黑龙江绥化
这个源码绝对好啊,效果非常好
回复

使用道具 举报

发表于 2015-2-11 04:06:57 | 显示全部楼层 来自 广东中山
没有图片吗?
回复

使用道具 举报

发表于 2015-4-12 20:36:33 | 显示全部楼层 来自 广东中山
附加上图就更好了
回复

使用道具 举报

发表于 2015-9-20 11:16:50 | 显示全部楼层 来自 浙江金华
怎么下载不了啊,好东西啊
回复

使用道具 举报

发表于 2017-6-26 15:07:54 | 显示全部楼层 来自 云南楚雄州
发的是源码,很感激。但每次下载玩了 几乎都是编译不了的鸟东西。各种忽悠。建议可以用的情况下在发。
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表