Raised This Month: $45 Target: $400
 11% 

[Req] hudmessage countdown


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HITLER
Member
Join Date: Jul 2018
Location: www
Old 08-04-2018 , 03:38   [Req] hudmessage countdown
Reply With Quote #1

how to make countdown for cooldown after check that zombie used his ability ?
PHP Code:
public Task_ShowHUD(task)
{    
    new 
id task TASKID_SHOWHUD
    
    
if(!is_user_alive(id))
        return 
PLUGIN_HANDLED
    
    
if(g_zombie[id] && InfectedClass[id] == 0)
    {
        new 
speed get_pcvar_num(cvar_hunter_speed)
        static 
health
        health 
get_user_health(id)
        
set_hudmessage(25515000.020.9706.01.10.00.0, -1)
new 
cooldown 10;
        
ShowSyncHudMsg(idg_hudsync "-=[Health: %d | Class: %s  ||  cooldown : %d ]=-"healthzombieclassnames[InfectedClass[id]], cooldown)
        
set_task(0.1"Task_ShowHUD"TASKID_SHOWHUD id)
    } 
i need just a simple example
HITLER is offline
Send a message via Skype™ to HITLER
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: India
Old 08-04-2018 , 04:56   Re: [Req] hudmessage countdown
Reply With Quote #2

This has been asked for 1000s of time.
You just need to search.
__________________
CrAzY MaN is offline
HITLER
Member
Join Date: Jul 2018
Location: www
Old 08-04-2018 , 07:49   Re: [Req] hudmessage countdown
Reply With Quote #3

i searched before i make that Thread. but i didn't find...
could you pleas give me some link ?
HITLER is offline
Send a message via Skype™ to HITLER
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 08-04-2018 , 08:17   Re: [Req] hudmessage countdown
Reply With Quote #4

I've been told that you don't have to call a delayed task when the same task is being called atm. Go for flag 'a' repetition.
__________________
Relaxing is offline
Reply


Thread Tools
Display Modes

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 01:44.


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