Raised This Month: $ Target: $400
 0% 

[HELP] Auto close menu with HUD timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-28-2015 , 18:42   Re: [HELP] Auto close menu with HUD timer
Reply With Quote #1

My fault. I have updated the code.
zmd94 is offline
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 10-28-2015 , 21:09   Re: [HELP] Auto close menu with HUD timer
Reply With Quote #2

No! The hud timer still not displayed.
The function must close the menu when timer get to 0.
CHE4TER is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-28-2015 , 22:06   Re: [HELP] Auto close menu with HUD timer
Reply With Quote #3

There is minor error. I have fixed it.

https://forums.alliedmods.net/showpo...59&postcount=9
zmd94 is offline
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 10-29-2015 , 03:44   Re: [HELP] Auto close menu with HUD timer
Reply With Quote #4

Quote:
Originally Posted by zmd94 View Post
There is minor error. I have fixed it.

https://forums.alliedmods.net/showpo...59&postcount=9
You must be kidding me. The code is the same and doesn't work. Sorry
CHE4TER is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 10-29-2015 , 05:03   Re: [HELP] Auto close menu with HUD timer
Reply With Quote #5

Quote:
Originally Posted by CHE4TER View Post
You must be kidding me. The code is the same and doesn't work. Sorry
It's just example you have to edit the code...#_-
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 10-29-2015 , 16:17   Re: [HELP] Auto close menu with HUD timer
Reply With Quote #6


I like the first type of menu with count to auto close.
I have been looking the code, but i'm really having some difficultys to understand it.

PHP Code:
#define TASK_VOTEMENU 978162
new g_iVoteTime

public plugin_init()
{
    
register_clcmd("say /testmenu""testmenu")
}
public 
testmenu(id)
{
    
id -= TASK_VOTEMENU
        
    
if(g_iVoteTime == 0)
    {
        
show_menu(id0"^n"1)        
        if(
task_exists(id+TASK_VOTEMENU)) remove_task(id+TASK_VOTEMENU)
        return 
PLUGIN_HANDLED
    
}
    
/*
    new menu = menu_create("\wTest Menu", "testmenu_handler")
    menu_additem(menu, "\wItem 1", "1")
    menu_additem(menu, "\wItem 2", "2")
    menu_additem(menu, "\wItem 3^n", "3")
    
    menu_additem(menu, "\wItem 4", "4")
    menu_additem(menu, "\wItem 5", "5")
    menu_additem(menu, "\wItem 6", "6")
        Add here the count in seconds?
    */
    
new szMenu[512], len 0
    len 
formatex(szMenu[len], charsmax(szMenu) - len"\wTest Menu")
    

    
    
    new 
szSec[16]; get_ending(g_iVoteTime"cekynd""cekynda""cekyndi"szSeccharsmax(szSec))
    
len += formatex(szMenu[len], charsmax(szMenu) - len"^n\dOctaloc \r%d\d %s"g_iVoteTimeszSec)
}

public 
testmenu_handler(id)
{
    
//

I know that this code is not correct, i'm trying to show what exatly i need, thanks!!
CHE4TER is offline
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 22:08.


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