How can I store data? [Solved]
I am making a new plugin for Half-Life. Here's what will happen:
-Player kills another player -Player gets x credit(s) -Player buys items with x credit(s) -Player uses those items So all players items and credits will be stored but where? I know I can use "set_localinfo" and "get_localinfo" but players can change their credits with "setinfo credits x". I can use nVault too but I don't know how to use it. What should I do? (I worked with commands, events, menus, I know how to compile .sma files etc.) |
Re: Storing data - Help!!!
or you can use the new amxmodx read and write commands. theres a tutorial in the turoail section called "how to read/write to a file " or something. go read it .
lastley , dont use help or !!!! in a scripting help tittlle no one will respond and youll be yelled at by moderators . |
Re: Storing data - Help!!!
hi.. if u want to save and load data you could use this example
PHP Code:
To save what the player buys, you can use a menu for example PHP Code:
|
Re: Storing data - Help!!!
Quote:
tho it gets cleared on server shutdown making it good for only storing temporary data.. (n)vault would probably be the best choice in this case but ive never used it so cant rly help :| |
Re: Storing data - Help!!!
Thank you :up: I will use "get_vault_data" and "set_vault_data".
|
Re: Storing data - Help!!!
actually vaullt is outdated and laggy, if you want to use that type of info storing use nvualt , which is the newer better version of vualt
|
Re: Storing data - Help!!!
Where can I get/enable nvault?
|
Re: Storing data - Help!!!
#include <nvualt>
www.amxmodx.org/doc theres some commands for it there Heres the direct link http://www.amxmodx.org/doc/source/fu...ault/index.htm |
Re: Storing data - Help!!!
Thank you, thank you very much!!! It's working :mrgreen:
|
Re: Storing data - Help!!!
Np , its what i do :mrgreen:
|
| All times are GMT -4. The time now is 06:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.