Raised This Month: $51 Target: $400
 12% 

Printing current timer float?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chiddy
Member
Join Date: Dec 2016
Old 01-15-2017 , 03:12   Printing current timer float?
Reply With Quote #1

How would I print a timer's current float?
Chiddy is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 01-15-2017 , 03:47   Re: Printing current timer float?
Reply With Quote #2

Can you elaborate?
headline is offline
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 01-15-2017 , 04:01   Re: Printing current timer float?
Reply With Quote #3

Quote:
Originally Posted by Headline View Post
Can you elaborate?

I think he need when you create a timer for like 5 seconds every second in chat get printed:
5 sec lefted
4sec lefted
......
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!
Papero is offline
Chiddy
Member
Join Date: Dec 2016
Old 01-15-2017 , 04:03   Re: Printing current timer float?
Reply With Quote #4

PHP Code:
CreateTimer(4.0TMR_Unmarkclient);
             ^ 
Need to print that value in chat

Last edited by Chiddy; 01-15-2017 at 04:05.
Chiddy is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 01-15-2017 , 04:08   Re: Printing current timer float?
Reply With Quote #5

Quote:
Originally Posted by Chiddy View Post
PHP Code:
CreateTimer(4.0TMR_Unmarkclient);
             ^ 
Need to print that value in chat
I mean, if you're trying to do a countdown then a repeating timer of one second with a static int will do, but to print that value you'd have to store it somewhere like a global var
headline is offline
Chiddy
Member
Join Date: Dec 2016
Old 01-15-2017 , 04:27   Re: Printing current timer float?
Reply With Quote #6

Quote:
Originally Posted by Headline View Post
I mean, if you're trying to do a countdown then a repeating timer of one second with a static int will do, but to print that value you'd have to store it somewhere like a global var
Its for hns, I need to display how long until knife delay is over.
How would I store it in a variable?
EDIT ( For clarification):
I need it to display how long until a player can be knifed (in client chat)

Last edited by Chiddy; 01-15-2017 at 04:35.
Chiddy is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-15-2017 , 05:28   Re: Printing current timer float?
Reply With Quote #7

https://wiki.alliedmods.net/Timers_(...Mod_Scripting)
__________________

Last edited by asherkin; 01-15-2017 at 05:29.
asherkin is offline
Chiddy
Member
Join Date: Dec 2016
Old 01-15-2017 , 05:49   Re: Printing current timer float?
Reply With Quote #8

Quote:
Originally Posted by asherkin View Post
I've had a look at that but I couldn't find anything, what is it there that I'm missing?
Chiddy is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-15-2017 , 06:07   Re: Printing current timer float?
Reply With Quote #9

Quote:
Originally Posted by Chiddy View Post
I've had a look at that but I couldn't find anything, what is it there that I'm missing?
The "Repeatable Timers" example on that page has everything you need.
__________________
asherkin is offline
Chiddy
Member
Join Date: Dec 2016
Old 01-15-2017 , 06:12   Re: Printing current timer float?
Reply With Quote #10

Quote:
Originally Posted by asherkin View Post
The "Repeatable Timers" example on that page has everything you need.
I need to call it when a player knifes an invincible player, how would a repeatable timer work there? (Sorry if it was hard to understand)

Last edited by Chiddy; 01-15-2017 at 06:12.
Chiddy is offline
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 18:54.


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