Raised This Month: $32 Target: $400
 8% 

refresh menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-19-2019 , 06:32   refresh menu
Reply With Quote #1

hii ,
how can i refresh any menu after every second because i have added time system in menu for a item but the promblem is that when i open the menu the seconds(time) is not moving , i have to again open the menu and than the time is change

so i wanted to refresh the menu after every one second

i tryed with SET_TASK but i face a promblem like i open menu and than i open another menu than the previous menu does not remove

PHP Code:
 if (timeMoneyvip[id] < systime)
   {
   
iLen += formatex(menu[iLen], charsmax(menu) - iLen"\r6. \wTAKE 16000$^n")
   
keys |= MENU_KEY_6
   
}
   else
   {
   
= (timeMoneyvip[id] - systime) / 60= (timeMoneyvip[id] - systime) % 60;
   
iLen += formatex(menu[iLen], charsmax(menu) - iLen"\d6. TAKE 16000$ : [\y%d:%s%d\d]^n^n"m10 "0" ""s)
   
keys &= ~MENU_KEY_6
   






I HOPE YOU UNDERSTAND
__________________
SED LYF !!!

Last edited by SHIELD755; 07-19-2019 at 10:03.
SHIELD755 is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-19-2019 , 07:20   Re: refresh menu
Reply With Quote #2

Use new menu system, set a task with flag 'a' and pass item and menu index. Then you don't need to recreate menu, just change item text.

Last edited by thEsp; 07-19-2019 at 12:24.
thEsp is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-19-2019 , 11:34   Re: refresh menu
Reply With Quote #3

set_task, time=1.0, flags=a, repeat=time_in_seconds
__________________








CrazY. is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-19-2019 , 12:18   Re: refresh menu
Reply With Quote #4

Quote:
Originally Posted by CrazY. View Post
set_task, time=1.0, flags=a, repeat=time_in_seconds
I have tried this one but i got problem:-
Like i explain
I open this vipmenu "say /vipmenu" and i don't choose any option(press any button) or don't close the menu , at that same time i open any another plugin's menu like amxmodmenu or something like that , so the problem is that the VIPMENU which should be overwrite or should be close since i open another menu but it doesn't , it refreshes until i close the menu or choose any item(pressing any button)
__________________
SED LYF !!!
SHIELD755 is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-19-2019 , 12:41   Re: refresh menu
Reply With Quote #5

player_menu_info native might help
__________________
<VeCo> is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-20-2019 , 06:02   Re: refresh menu
Reply With Quote #6

Quote:
Originally Posted by <VeCo> View Post
player_menu_info native might help
doesn't help me
__________________
SED LYF !!!
SHIELD755 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-20-2019 , 06:15   Re: refresh menu
Reply With Quote #7

1. Create a loop task to show the menu when player opens the menu.

2. Remove the task when user exit the menu
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-20-2019 , 06:25   Re: refresh menu
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
1. Create a loop task to show the menu when player opens the menu.

2. Remove the task when user exit the menu
yes i have tried and it is working well but if i don't exit the menu and i open another menu than this menu is showing between becuase of loop task until i exit
__________________
SED LYF !!!

Last edited by SHIELD755; 07-20-2019 at 06:26.
SHIELD755 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-20-2019 , 09:14   Re: refresh menu
Reply With Quote #9

player_menu_info is what you have to use. Show what you've tried.
__________________








CrazY. 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 03:15.


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