AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do i save knifes permanent? (https://forums.alliedmods.net/showthread.php?t=183897)

Bilal Pro 04-28-2012 07:24

How do i save knifes permanent?
 
Hello people,



How can i save knifes which u buy in the shop for example permanent?

BeeFighter 04-28-2012 07:41

Re: How do i save knifes permanent?
 
use nvault? lol...

Bilal Pro 04-28-2012 07:45

Re: How do i save knifes permanent?
 
How can i save it inside nvault i dont know how to?

Erox902 04-28-2012 08:02

Re: How do i save knifes permanent?
 
Do you mean that you buy a new knife model or something in a menu?
If so you could handle it with nvault simply with an array.

Check out this exp mod tutorial and I think you will figure it out yourself.

Bilal Pro 04-28-2012 08:29

Re: How do i save knifes permanent?
 
I dont know how to save arrays inside nvault. :S

Erox902 04-28-2012 08:50

Re: How do i save knifes permanent?
 
I told you to check out that tutorial because it is done in there.

Since you're posting in scripting help section
I assume you atleast know how to read about it yourself...

Bilal Pro 04-28-2012 11:58

Re: How do i save knifes permanent?
 
I mean, how can i save the = true or = false.
I know how to save arrays for example jbcash

Erox902 04-28-2012 12:12

Re: How do i save knifes permanent?
 
I said an array not a bool.
You can simply change the bool to a normal array they work the same way.

Bilal Pro 04-28-2012 12:14

Re: How do i save knifes permanent?
 
So then it will look like this?

PHP Code:

public SaveData(id)
{
         new 
AuthID[35]
         
get_user_authid(id,AuthID,34)

         new 
vaultkey[64],vaultdata[256]
         
format(vaultkey,63,"%s-Mod"AuthID)
         
format(vaultdata,255,"%i#"HasKatana[id])
         
nvault_set(g_vault,vaultkey,vaultdata)
         return 
PLUGIN_CONTINUE



Erox902 04-28-2012 12:20

Re: How do i save knifes permanent?
 
Quote:

Originally Posted by Bilal Pro (Post 1698136)
So then it will look like this?

Yes, set the array to 1 instead of true or 0 instead of false.


All times are GMT -4. The time now is 07:55.

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