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

Solved Use menu once per round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Destroyer8506
New Member
Join Date: Oct 2020
Location: IRAN
Old 01-17-2021 , 11:34   Use menu once per round
Reply With Quote #1

Hi.I want to add sth to menu that players can use menu once per round
if players used menu they can't use it again
Tell me if you need more details. Thanks

Last edited by Destroyer8506; 01-19-2021 at 07:24.
Destroyer8506 is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 01-17-2021 , 11:39   Re: Use menu once per round
Reply With Quote #2

you have to create a global boolean.
then create a conditional statement: if boolean is true, player can't use menu, if boolean is false player can use menu.

make that boolean to be true after player use menu.

this is a scripting help section, people are helping you to learn not making plugins for you. good luck
lexzor is offline
LondoN
Senior Member
Join Date: Dec 2015
Location: Roman, Romania.
Old 01-17-2021 , 18:26   Re: Use menu once per round
Reply With Quote #3

just pre-create the menu in plugin handler, make a boolean and when /shop /menu is hook make something:

Code:
if(!g_iUsed[id]) menu_display(id, MenuID, 0)
also in handler pui g_iUsed[id] = true
on ham spawn: g_iUsed[id] = false
__________________
LondoN is offline
Destroyer8506
New Member
Join Date: Oct 2020
Location: IRAN
Old 01-18-2021 , 00:45   Re: Use menu once per round
Reply With Quote #4

Quote:
Originally Posted by LondoN View Post
just pre-create the menu in plugin handler, make a boolean and when /shop /menu is hook make something:

Code:
if(!g_iUsed[id]) menu_display(id, MenuID, 0)
also in handler pui g_iUsed[id] = true
on ham spawn: g_iUsed[id] = false
I Fixed It. Thanks
Destroyer8506 is offline
Reply


Thread Tools
Display Modes

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 08:47.


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