Raised This Month: $ Target: $400
 0% 

for help of a plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ol
Senior Member
Join Date: Jul 2004
Old 10-02-2004 , 08:29   for help of a plugin
Reply With Quote #1

i write a plugin for show time,but the "MONTHS[str_to_num(ns_Month)]","WEEK[str_to_num(ns_week)]" always return 0,why?
and how to fix it?

the code:
Code:
public show_timer(){     new MONTHS[12][] = {"01","02","03","04","05","06","07","08","09","10","11","12"}     new WEEK[7][] = {"1","2","3","4","5","6","7"}     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[3]     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("%B", ns_Month, 2)     get_time("%d", ns_Day, 2)     get_time("%Y", ns_Year, 4)     get_time("%S", ns_second, 2)     get_time("%A", ns_week, 2)         set_hudmessage(0,255,0,0.70,0.18,0, 1.0, 1.0, 0.1, 0.2, 11)     show_hudmessage(0,"%s/%s/%s/ %s^nthe time:  %s:%s:%s^nmap1:  %s^nnextmap:  %s^ntimeleft:  %d:%02d",ns_Year,MONTHS[str_to_num(ns_Month) -1],ns_Day,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")     set_task(1.0, "show_timer",0,"",0,"b")     return PLUGIN_CONTINUE }


can you help me?
ol is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode