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

Help / Support Please help with plugin time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
limbric
Member
Join Date: Aug 2014
Old 02-04-2015 , 14:30   Please help with plugin time
Reply With Quote #1

Hi. I have zombie smoker class and more human classes and zombie classes but it's a minor problem. The seconds are shown like '10' instead of '1'.

Look:
Code:
[ZP] You can drag player to youself 1 time
[ZP] Wait 40 sec. to drag again!
[ZP] Wait 40 sec. to drag again!
[ZP] Wait 40 sec. to drag again!
[ZP] Wait 30 sec. to drag again!
[ZP] Wait 30 sec. to drag again!
[ZP] Wait 30 sec. to drag again!
[ZP] Wait 20 sec. to drag again!
[ZP] Wait 20 sec. to drag again!
[ZP] Wait 10 sec. to drag again!
[ZP] Wait 10 sec. to drag again!
[ZP] Wait 10 sec. to drag again!
[ZP] Wait 10 sec. to drag again!
[ZP] Wait 00 sec. to drag again!
40, 30, 20, 10 must be 4.0, 3.0, 2.0, 1.0 and 0.0

I have in the plugin:

Code:
if (get_gametime() - g_lastHook[id] < cdown) {
			client_print(id, print_chat, "[ZP] Wait %.f0 sec. to drag again!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_lastHook[id]))
			return PLUGIN_HANDLED
		}
I don't know what's wrong. I tested it on my windows pc, with hlds. I disabled all classes but nothing. I'm using only zm_vip.

Thank you!!
limbric is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-05-2015 , 12:22   Re: Please help with plugin time
Reply With Quote #2

Full code?
zmd94 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-06-2015 , 10:51   Re: Please help with plugin time
Reply With Quote #3

Code:
if (get_gametime() - g_lastHook[id] < cdown) 
{             
client_print(id, print_chat, "[ZP] Wait %.f sec. to drag again!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_lastHook[id]))             
return PLUGIN_HANDLED         
}
try

Last edited by Depresie; 02-06-2015 at 10:52.
Depresie 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 15:03.


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