AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [Req] hudmessage countdown (https://forums.alliedmods.net/showthread.php?t=309692)

HITLER 08-04-2018 02:38

[Req] hudmessage countdown
 
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

CrAzY MaN 08-04-2018 03:56

Re: [Req] hudmessage countdown
 
This has been asked for 1000s of time.
You just need to search.

HITLER 08-04-2018 06:49

Re: [Req] hudmessage countdown
 
i searched before i make that Thread. but i didn't find... :|
could you pleas give me some link ?

Relaxing 08-04-2018 07:17

Re: [Req] hudmessage countdown
 
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.


All times are GMT -4. The time now is 00:53.

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