Raised This Month: $51 Target: $400
 12% 

[Request] Build Time Hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 03-30-2020 , 17:01   [Request] Build Time Hud
Reply With Quote #1

Hello Guys ...
I have seen this topic talking about build time hud
https://forums.alliedmods.net/showthread.php?t=322496

I tried to make like that style but i good problem

1: I add this hud code but it didn't worked
PHP Code:
set_hudmessage(0127255, -1.00.006.012.0)
show_hudmessage(0"| Build Time : %d:%s%d |"mins, (secs 10 "0" ""), secs


2: i used dhudmessege code but i got same problem
PHP Code:
set_dhudmessage(02550, -1.00.000.02.00.11.0); 


Please help ...
Supremache is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 03-30-2020 , 17:56   Re: [Request] Build Time Hud
Reply With Quote #2

szGoal is never been used, check your code
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 03-30-2020 , 18:22   Re: [Request] Build Time Hud
Reply With Quote #3

check line 976 and 981
{}
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 03-30-2020 at 18:23.
+ARUKARI- is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 03-30-2020 , 19:35   Re: [Request] Build Time Hud
Reply With Quote #4

Quote:
Originally Posted by Nutu_ View Post
szGoal is never been used, check your code
Iam sorry... iam new with amxx coding can you give me more example please or can you edit it if you have time
PHP Code:
public task_CountDown()
{
    
g_iCountDown--
    new 
mins g_iCountDown/60secs g_iCountDown%60
    
if (g_iCountDown>=0)
        
client_print(0print_center"%L - %d:%s%d"LANG_SERVER"BUILD_TIMER"mins, (secs 10 "0" ""), secs)

    else
    {
        if (
g_iPrepTime)
        {
            
g_boolCanBuild false
            g_boolPrepTime 
true
            g_iCountDown 
g_iPrepTime+1
            set_task
(1.0"task_PrepTime"TASK_PREPTIME,__"a"g_iCountDown);
            
            
set_hudmessage(255255255, -1.00.4501.010.00.10.21)
            
show_hudmessage(0"%L"LANG_SERVER"PREP_ANNOUNCE");
            
            new 
players[32], num
            get_players
(playersnum)
            for (new 
0numi++)
            {
                if (
g_isAlive[players[i]] && !g_isZombie[players[i]])
                {
                    
ExecuteHamB(Ham_CS_RoundRespawnplayers[i])
                    
                    if (
g_iOwnedEnt[players[i]])
                        
cmdStopEnt(players[i])
                }
            }
            
print_color(0"%s^x04 %L"MODNAMELANG_SERVER"PREP_ANNOUNCE")
            
            
client_cmd(0"spk %s"PHASE_PREP)
            
            
ExecuteForward(g_fwPrepStartedg_fwDummyResult);
        }
        else
            
Release_Zombies()

        
remove_task(TASK_BUILD);
        return 
PLUGIN_HANDLED;
    }
    
    new 
szTimer[32]
    if (
g_iCountDown>10)
    {
        if (
mins && !secsnum_to_word(minsszTimer31)
        else if (!
mins && secs == 30num_to_word(secsszTimer31)
        else return 
PLUGIN_HANDLED;
        
        
client_cmd(0"spk ^"fvox/%%s remaining^""szTimer, (mins "minutes" "seconds"))
    }
    else
    {
        
num_to_word(g_iCountDownszTimer31)
        
client_cmd(0"spk ^"fvox/%s^""szTimer)
    }
    return 
PLUGIN_CONTINUE;

Supremache is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 03-30-2020 , 19:36   Re: [Request] Build Time Hud
Reply With Quote #5

Quote:
Originally Posted by +ARUKARI- View Post
check line 976 and 981
{}
I did it and i got another problem
Supremache is offline
Old 03-30-2020, 19:57
+ARUKARI-
This message has been deleted by +ARUKARI-. Reason: miss
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-30-2020 , 21:21   Re: [Request] Build Time Hud
Reply With Quote #6

Post full code and explain your problem properly please.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 03-30-2020 , 22:20   Re: [Request] Build Time Hud
Reply With Quote #7

Quote:
Originally Posted by Napoleon_be View Post
Post full code and explain your problem properly please.
I want to change the build time to hud


Basebuilder.sma file , Build time cod : 976
Attached Files
File Type: sma Get Plugin or Get Source (basebuilder65.sma - 145 views - 84.8 KB)
Supremache is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-30-2020 , 22:29   Re: [Request] Build Time Hud
Reply With Quote #8

try this

PHP Code:
if (g_iCountDown>=0) {
        
set_hudmessage(0127255, -1.00.0,00.01.0);
        
show_hudmessage(0"%L - %d%s%d"LANG_SERVER"BUILD_TIMER"mins, (secs 10 "0" ""), secs);
    } 
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 03-30-2020 , 22:59   Re: [Request] Build Time Hud
Reply With Quote #9

Quote:
Originally Posted by Napoleon_be View Post
try this

PHP Code:
if (g_iCountDown>=0) {
        
set_hudmessage(0127255, -1.00.0,00.01.0);
        
show_hudmessage(0"%L - %d%s%d"LANG_SERVER"BUILD_TIMER"mins, (secs 10 "0" ""), secs);
    } 
Thanks bro it's worked but do you know why i get warining
PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2013 ITB CompuPhaseAMX Mod X Team

Warning
Symbol is assigned a value that is never used"szGoal" on line 812
Header size
:           5896 bytes
Code size
:            91824 bytes
Data size
:            62084 bytes
Stack
/heap size:      16384 bytesmaxusage is unknowndue to recursion
Total requirements
:  176188 bytes

1 Warning
.
Done
Supremache is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-30-2020 , 23:05   Re: [Request] Build Time Hud
Reply With Quote #10

Nothing special, u can ignore that.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



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 04:19.


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