AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Nvault to Fvault (https://forums.alliedmods.net/showthread.php?t=320616)

tepegoz 12-31-2019 06:39

Nvault to Fvault
 
1 Attachment(s)
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); 


HamletEagle 12-31-2019 06:54

Re: Nvault to Fvault
 
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".

tepegoz 12-31-2019 08:24

Re: Nvault to Fvault
 
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.

OciXCrom 12-31-2019 08:38

Re: Nvault to Fvault
 
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?

tepegoz 12-31-2019 09:30

Re: Nvault to Fvault
 
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.

HamletEagle 12-31-2019 10:29

Re: Nvault to Fvault
 
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.

Bugsy 12-31-2019 11:42

Re: Nvault to Fvault
 
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.

tepegoz 12-31-2019 13:18

Re: Nvault to Fvault
 
Quote:

Originally Posted by Bugsy (Post 2678555)
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.

HamletEagle 12-31-2019 14:34

Re: Nvault to Fvault
 
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.

Bugsy 12-31-2019 14:54

Re: Nvault to Fvault
 
Why will the data all be lost? Is the plugin removing it on server shutdown?


All times are GMT -4. The time now is 02:43.

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