Raised This Month: $ Target: $400
 0% 

Why it doesn't show timeleft?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-30-2011 , 03:51   Why it doesn't show timeleft?
Reply With Quote #1

Read title. It shows name not timeleft. And shows a letter befor name.
PHP Code:
public print(id)
{
    new 
date[32]
    new 
map[33]
    new 
szName[33]
    new 
MyInt get_timeleft()
    
    
get_user_name(idszNamecharsmax(szName)) 
    
get_mapname (map32
    
get_time("%d.%m.%Y"date31)
    
    
client_print(idprint_chat"Your name: %s. Map: %s. Date: %s. Timeleft: %s"szNamemapdateMyInt)

__________________
Please enter this website everyday: http://forums.alliedmods.net/showthread.php?t=169067

Last edited by Evaldas.Grigas; 10-30-2011 at 05:08.
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 10-30-2011 , 06:23   Re: Why it doesn't show timeleft?
Reply With Quote #2

It's an integer, not a string.

%s - string
%d - integer
%f - floats
...

You cannot use strings for everything.
Backstabnoob is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-30-2011 , 06:32   Re: Why it doesn't show timeleft?
Reply With Quote #3

What I must use to display time? And it would be increasing? It still doesn't work.
__________________
Please enter this website everyday: http://forums.alliedmods.net/showthread.php?t=169067

Last edited by Evaldas.Grigas; 10-30-2011 at 06:39.
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 10-30-2011 , 07:40   Re: Why it doesn't show timeleft?
Reply With Quote #4

Timeleft: %d
Backstabnoob is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-30-2011 , 08:03   Re: Why it doesn't show timeleft?
Reply With Quote #5

Time?
P.S. Timeleft not working: [IMG]http://img402.**************/img402/8134/unledejh.png[/IMG]

It shows timeleft in seconds, how to make it show example: 6:26?

EDIT: Done it:
PHP Code:
new get_timeleft()
show_hudmessage(id"Timeleft: %d:%02d", (60), (60)) 
[IMG]http://**************/photo/my-images/402/unledejh.png/[/IMG]
__________________
Please enter this website everyday: http://forums.alliedmods.net/showthread.php?t=169067

Last edited by Evaldas.Grigas; 10-30-2011 at 08:37.
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Reply



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 14:23.


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