Raised This Month: $ Target: $400
 0% 

Timeleft in hostname


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-02-2007 , 15:00   Timeleft in hostname
Reply With Quote #1

Code:
#include <amxmodx>
#include <string>

static const NumeSRV[] = "Cs 1.6 Hl.DarkStriKe.Ro"

public plugin_init(){ 
    register_plugin("LiveUpdate","1.0","FireW@ll")
    set_task(0.0, "live",_,_,_,"b")
    return PLUGIN_CONTINUE 
}

public live(){
    new map[32] 
    new numenou[255]
    new formated[32]
    new timeleft = get_timeleft()
    get_mapname(map,31)
    format(formated,254,map[3])
    strtoupper(formated)
    format(numenou,254,"[%s]-=-[Acum Este:%s]-=-[Timp Ramas:%d:%02d]", NumeSRV, formated,timeleft / 60,timeleft * 60)
    set_cvar_string("hostname", numenou)
    return PLUGIN_CONTINUE
}
It works but the timeleft is like this:
[Cs 1.6 Hl.DarkStriKe.Ro]-=-[Acum EsteUST2]-=-[Timp Ramas8:136980]

Any idea?
__________________


I hate Spammers....
vl@d 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 16:06.


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