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

How to save menu choice?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-09-2020 , 17:42   How to save menu choice?
Reply With Quote #1

Hey, so I want to make a simple class plugin, and I want to show this menu to everyone on Player Spawn, but once they choose, they can't choose again.

So even if they log out, or server restarts, they still have that class they choose that one time. I know that I can use nVault, but I saw like iValue in a lot of plugins, and they do that using enum's, can anyone like make me an example, or try to explain it.

Thanks in advance
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-09-2020 , 20:51   Re: How to save menu choice?
Reply With Quote #2

Just use nvault for that, it's so simple that it could be done in only a few lines. Search, there are lots of questions already asked about it and bugsy actualy made a tutorial about it.

https://forums.alliedmods.net/showthread.php?t=91503

But as i said, do some more research, the thread is over 11 years old and things have slightly changed.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-09-2020 , 20:54   Re: How to save menu choice?
Reply With Quote #3

Use nVault Array. When they disconnect, store their array slot data to the vault using steam id as the key. When they reconnect, load the data into their array slot.
__________________
Bugsy 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 10:48.


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