Thread: [API Scripting Help] ZP 5.0 Class Zombie: Cooldown
View Single Post
Author Message
Hn.S Xmix
Member
Join Date: May 2021
Old 08-06-2023 , 18:39   ZP 5.0 Class Zombie: Cooldown
Reply With Quote #1

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

Hn.S Xmix is offline