搜索
查看: 6436|回复: 15

[AMXX 带源码] 右上角时间地图显示插件代码

[复制链接]
发表于 2011-6-12 22:53:59 | 显示全部楼层 |阅读模式 来自 中国–云南–临沧
自己去看吧
应该很清楚了
带源码了!!!

本帖子中包含更多资源

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

×
发表于 2011-11-29 20:04:44 | 显示全部楼层 来自 中国–辽宁–沈阳
/*
*  AMX X Mod script.
*
* (c) Copyright 2004, olol
*
* This file is provided as is (no warranties).
*/

#include <amxmodx>

/*
* TimeProjector displays the time and the next map on the top right corner of the client
* display as a hudmessage.
*
* History:
*
* v0.1: -  
*/


public show_timer(id){
    new MONTHS[12][] = {"Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"}
    new WEEK[7][] = {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}
    new DAY[31][] = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"}
    new nextmap[32]
    new cumap[32]
    new timel = get_timeleft()
    new ns_Hour[3], ns_Minutes[3],ns_Month[3],ns_Day[3],ns_Year[5],ns_second[3],ns_week[5]
    get_cvar_string("amx_nextmap",nextmap,31)
    get_mapname(cumap,31)
    get_time("%H", ns_Hour, 2)
    get_time("%M", ns_Minutes, 2)
    get_time("%m", ns_Month, 2)
    get_time("%d", ns_Day, 2)
    get_time("%Y", ns_Year, 4)
    get_time("%S", ns_second, 2)
    get_time("%w", ns_week, 4)   
    set_hudmessage(255,255,0,0.75,0.18,0, 1.0, 1.0, 0.1, 0.2, 20)   

    if((str_to_num(ns_week)) ==0){
    show_hudmessage(id,"%s-%s-%s %s ^n NowTime:  %s:%s:%s^n ThisMap:  %s^n NextMap:  %s^n TimeLeft:  %d:%02d",ns_Year,MONTHS[str_to_num(ns_Month) -1],DAY[str_to_num(ns_Day) -1],WEEK[str_to_num(ns_week) +6],ns_Hour,ns_Minutes,ns_second,cumap,nextmap,timel / 60, timel % 60)
    }else{
    show_hudmessage(id,"%s-%s-%s %s ^n NowTime:  %s:%s:%s^n ThisMap:  %s^n NextMap:  %s^n TimeLeft:  %d:%02d",ns_Year,MONTHS[str_to_num(ns_Month) -1],DAY[str_to_num(ns_Day) -1],WEEK[str_to_num(ns_week) -1],ns_Hour,ns_Minutes,ns_second,cumap,nextmap,timel / 60, timel % 60)
    }
    return PLUGIN_CONTINUE
}

public plugin_init()
{
    register_plugin("TimeProjector","0.1","olol")
    //register_clcmd("say nowtime","show_timer")
    set_task(1.0, "show_timer",0,"",0,"b")
    return PLUGIN_CONTINUE
}

本帖子中包含更多资源

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

×
回复 1 0

使用道具 举报

发表于 2011-6-16 10:25:41 | 显示全部楼层 来自 中国–湖南–邵阳
谢谢不错
回复

使用道具 举报

发表于 2011-6-23 16:00:19 | 显示全部楼层 来自 中国–河北–石家庄
下来用用感觉感觉
回复

使用道具 举报

发表于 2011-6-26 11:58:12 | 显示全部楼层 来自 中国–山东
楼主你真厉害,1008B?
回复

使用道具 举报

发表于 2011-6-26 17:09:21 | 显示全部楼层 来自 中国–云南–楚雄彝族自治州
可不可以把 绿色字体改成其他的 想白色 黄色  之类的?
回复

使用道具 举报

发表于 2011-7-3 10:26:34 | 显示全部楼层 来自 中国–湖南–邵阳
收藏了谢谢
回复

使用道具 举报

发表于 2011-7-7 16:31:30 | 显示全部楼层 来自 中国–重庆–重庆
支持一下。
回复

使用道具 举报

发表于 2011-7-8 07:24:47 | 显示全部楼层 来自 中国–陕西–西安
自己改R.GB 即可修改颜色
回复

使用道具 举报

发表于 2011-8-20 16:03:14 | 显示全部楼层 来自 中国–辽宁–沈阳
要源码!!!!
回复

使用道具 举报

发表于 2011-8-26 23:49:05 | 显示全部楼层 来自 中国–西藏–那曲
支持一下。
回复

使用道具 举报

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

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