Ayune2 发表于 2010-11-30 20:44:07

发个显示个性时间源码【转】

/*
时间插件2TimeProjector


*AMX X Mod script.
*
* (c) Copyright 2004, olol
*
* This file is provided as is (no warranties).
*/

#include <amxmod>

/*
* 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[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
    new WEEK[] = {"- Xing Qi 1","- Xing Qi 2","- Xing Qi 3","- Xing Qi 4","- Xing Qi 5","- Xing Qi 6","- Xing Qi Tian"}
    new DAY[] = {"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 timel = get_timeleft()
    new ns_Hour, ns_Minutes,ns_Month,ns_Day,ns_Year,ns_second,ns_week
    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(0,0,999,0.75,0.18,0, 1.0, 1.0, 0.1, 0.2, 5)
    if((str_to_num(ns_week)) ==0){
    show_hudmessage(id,"%s-%s-%s %s ^n XianZaiShiJian:%s:%s:%s^n ShengYuShiJian:%d:%02d",ns_Year,MONTHS,DAY,WEEK,ns_Hour,ns_Minutes,ns_second,timel / 60, timel % 60)
    }else{
    show_hudmessage(id,"%s-%s-%s %s ^n XianZaiShiJian:%s:%s:%s^n ShengYuShiJian:%d:%02d",ns_Year,MONTHS,DAY,WEEK,ns_Hour,ns_Minutes,ns_second,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
}

Village 发表于 2010-11-30 22:08:55

发个贴图看看效果!

qq378339982 发表于 2010-12-13 16:52:57

下了。。先看看

zww011 发表于 2012-1-29 15:36:57

有效果图看看么··

liyang2008 发表于 2012-2-10 02:38:23

根据代码

只显示现在年月日时间以及地图剩余时间

zw63734487 发表于 2012-2-10 23:22:31

呵呵 我会改
时间 文字 OP帽子 26种帽子可以选

http://hiphotos.baidu.com/dark1123/pic/item/bd3405c651da81cb0b4d76795266d016082431b3.jpg



http://hiphotos.baidu.com/dark1123/pic/item/bd3405c651da81cb0b4d76795266d016082431b3.jpg

zw63734487 发表于 2012-2-10 23:23:23

本帖最后由 zw63734487 于 2012-2-10 23:25 编辑

晕图挂了 权限不够 网络图也转不了   蛋疼


http:/ /hi.baidu.com/ dark1123/home

cs相册 上传于 2012.2.10

zw63734487 发表于 2012-2-10 23:49:26

哈!!!我会弄了!!!!!!!!!!!!!

Crea*dar 发表于 2012-2-12 12:43:01

挖好好看:)

d632895 发表于 2012-3-2 09:07:55

多谢源码,学习下:lol
页: [1] 2
查看完整版本: 发个显示个性时间源码【转】