AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help me plzzz [CountDown] (https://forums.alliedmods.net/showthread.php?t=173115)

NiceGuyx 11-30-2011 10:55

Help me plzzz [CountDown]
 
Hello,
I want after i say /countdown then
Start a hud message who change to other number after "1sec"
Exemple: 5 "1sec =" 4 "1sec" 3 "1sec" 2 "1sec" 1 "1sec" FIGHT!!

PHP Code:

register_clcmd("say /countdown""cmd_countdown")
new const 
g_Count[][] =
{
    
"5",
    
"4",
    
"3",
    
"2",
    
"1",
    
"FIGHT!!"
}


public 
cmd_countdown(id)
{
        
set_hudmessage(00205, -1.0, -1.021.09.00.10.24)
        
show_hudmessage(0,"%i"g_Count)
        
g_Count 0
        g_Count
++


It's not working

drekes 11-30-2011 10:56

Re: Help me plzzz [CountDown]
 
http://forums.alliedmods.net/showthread.php?t=130616

NiceGuyx 11-30-2011 11:04

Re: Help me plzzz [CountDown]
 
It's not working very good
After i say /countdown

I have to wait "1sec" before the Countdown Start

And you can use only Numbers, "I want after 1" Then show: FIGHT!!

Xellath 12-01-2011 15:50

Re: Help me plzzz [CountDown]
 
From Wrecked's Post:

Code:
#define SECONDS 10 new iSeconds public function( ) {     iSeconds = SECONDS     set_hudmessage( 120, 120, 120, 0.50, 0.50, 0, 0.1, 0.8, 0.1, 0.1, -1 )     show_hudmessage( 0, "Seconds Remaining: %i", iSeconds )         set_task( 1.0, "TaskShowCountdown", TASKID, _, _, "a", SECONDS ) } public TaskShowCountdown( ) {     set_hudmessage( 120, 120, 120, 0.50, 0.50, 0, 0.1, 0.8, 0.1, 0.1, -1 )     iSeconds--     if( iSeconds < 1 )     {         show_hudmessage( 0, "FIGHT!!!" )     }     else     {         show_hudmessage( 0, "Seconds Remaining: %i", iSeconds )     } }


All times are GMT -4. The time now is 08:24.

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