Thread: [API Scripting Help] ZP 5.0 Class Zombie: Cooldown
View Single Post
Balage74
Member
Join Date: Dec 2006
Old 08-14-2023 , 16:34   Re: ZP 5.0 Class Zombie: Cooldown
Reply With Quote #2

Third code use in You r code where check player use ability.
Quote:
Originally Posted by Hn.S Xmix View Post
hello ��
I still facing some problems with cooldown in every zombie class, if I add this code down below it will not work and and just spam client_print for some reason untill it finish

I just need a little hand for this, and someone please help me and show me if iam doing something wrong

here is my codes
----->

PHP Code:
new Float:g_lastusetime[33]
new 
cvar_class_cooldown 
PHP Code:
cvar_clasd_cooldown register_cvar("zp_class_cooldown""10"
PHP Code:
if (get_gametime() - g_lastusetimeid ] < get_pcvar_float(cvar_class_cooldown))
                    {
                     
client_print(idprint_chat"Please wait for %d seconds."get_pcvar_num(cvar_class_cooldown));
                     return 
FMRES_IGNORED

__________________

Last edited by Balage74; 08-14-2023 at 16:35.
Balage74 is offline
Send a message via MSN to Balage74 Send a message via Skype™ to Balage74