Raised This Month: $ Target: $400
 0% 

Nvault to Fvault


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tepegoz
Senior Member
Join Date: Apr 2019
Old 12-31-2019 , 06:39   Nvault to Fvault
Reply With Quote #1

I want convert my sma to filevault. Can you give me example how to change these codes for fvault? What is the equivalent of these codes in fvault? Please don't ask why.

PHP Code:
if(nvault_lookup(topVaultrankkeyrankdata1500timestamp))
and
nvault_set(topVaultrankkeyrankdata); 
Attached Files
File Type: sma Get Plugin or Get Source (soccerjamedit.sma - 92 views - 247.9 KB)
tepegoz is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-31-2019 , 06:54   Re: Nvault to Fvault
Reply With Quote #2

Did you even bother reading the documentation of fvault? If you did then the answer would be completely obvious.

Code:
nvault_set:
"Sets value of a vault entry and updates the timestamp."

fvault_set_data:
"Sets data of a key with current timestamp"
Code:
nvault_lookup:
"Retrieves full information about a vault entry."

fvault_get_data:
"Retrieves data specified by a key"
Tip 1: Even if I'm talking to myself, I have to say this: we don't ask "why" just because we want to give people a hard time. We ask "why" because in most cases people believe they need y thing to solve x but in fact, they do not(google xy problem) and likely there's a much better solution. But we can't recommend a better solution because we don't have any context, we do not know what the person REALLY wants.
Tip 2: saying "don't ask why" only makes people assume you want to do something bad and ask "why".
__________________

Last edited by HamletEagle; 12-31-2019 at 06:54.
HamletEagle is offline
tepegoz
Senior Member
Join Date: Apr 2019
Old 12-31-2019 , 08:24   Re: Nvault to Fvault
Reply With Quote #3

How to add these datas? I tried convert lookup to
fvault_get_data( g_vault_rank,rankkey, rankdata, charsmax( rankdata ) )
This convert is true? Please give me example using this datas.
tepegoz is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-31-2019 , 08:38   Re: Nvault to Fvault
Reply With Quote #4

Why don't you test it? If you simply follow the API you would be sure if it's right or not. Testing yourself is much faster than writing in a thread and waiting for a random person to answer you.

Also - WHY?
What possible benefit could you have from doing this change?
__________________

Last edited by OciXCrom; 12-31-2019 at 08:38.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
tepegoz
Senior Member
Join Date: Apr 2019
Old 12-31-2019 , 09:30   Re: Nvault to Fvault
Reply With Quote #5

I tested it and don't working. Also set data too. I dont have much information I just look other fvault plugins and tried.
Because I want txt file for easy edit and backup. I can't edit,download and open .vault file because of my server panel.

Last edited by tepegoz; 12-31-2019 at 09:32.
tepegoz is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-31-2019 , 10:29   Re: Nvault to Fvault
Reply With Quote #6

So post the code you tried and didn't work. If we don't know what you did wrong we can't help you fix it.
Saying "doesn't work" means nothing, there's a million things that can go wrong.
__________________

Last edited by HamletEagle; 12-31-2019 at 10:29.
HamletEagle is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-31-2019 , 11:42   Re: Nvault to Fvault
Reply With Quote #7

How often do you see yourself going into an fvault file to manually change things? We can possibly just create a command for you to access/edit a vault record if you explain what your problem is. This would eliminate manual file retrieval -> edit -> upload.
__________________

Last edited by Bugsy; 12-31-2019 at 11:43.
Bugsy is offline
tepegoz
Senior Member
Join Date: Apr 2019
Old 12-31-2019 , 13:18   Re: Nvault to Fvault
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
How often do you see yourself going into an fvault file to manually change things? We can possibly just create a command for you to access/edit a vault record if you explain what your problem is. This would eliminate manual file retrieval -> edit -> upload.
I have a server from game hosting firm. If I want close and change my server, 300 player's datas will be remove. This mod's .vault file is can't be download from my server panel. I thought if vault file is .txt file, it easy to upload, copy or edit. I don't want to be deleted players data.
tepegoz is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-31-2019 , 14:34   Re: Nvault to Fvault
Reply With Quote #9

Dowload the vault file to your pc and then upload it to the new server. It doesn't matter if it's a txt or not, you can download the file(no need to open it and copy the content). Just use any ftp client.
__________________
HamletEagle is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-31-2019 , 14:54   Re: Nvault to Fvault
Reply With Quote #10

Why will the data all be lost? Is the plugin removing it on server shutdown?
__________________
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 02:43.


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