AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to save something when player disconnect? (https://forums.alliedmods.net/showthread.php?t=229186)

Lucky888 11-03-2013 00:47

How to save something when player disconnect?
 
Good morning every one, I try to search in forum but can't find answer, so i creat this topic to ask. This is my question:

1. I made some thing, and when player unlock this, he have this, and when disconnect then connect again , it's not lost. Lost when change map --> DONE
Exp:
Quote:

Unlock ak47 - 4000$ --> Player have unlock_ak47[id] = true --> until change map , he have ak47 free. When disconnect then connect again , unlock_ak47[id] = true, do not lost.
2. But some time, 1 player A disconnect and his [id] like player B connect, player B have unlock_ak47[id] = true , and he don't need unlock with 4000$.

3. So i want to make some thing can save unlock_ak47[id] = true to player's ip or name and reset unlock_ak47[id] = false when map change or shutdown server. I try to find, maybe can save by nvault, but i don't know how to save this, please show me way to save this to nvault or something like this. Very thanks bros of alliedmods.:)

Blizzard_87 11-03-2013 01:50

Re: How to save something when player disconnect?
 
Please show your code. Then you can use nvault to save load the unlocks

Lucky888 11-03-2013 08:01

Re: How to save something when player disconnect?
 
This is my code, thank so much:
How to save g_Hasak47?


And i have more question:
-ID of 1 player can like 1 another player, so can i change id -> name or ip or steam id , don't need use nvault?


All times are GMT -4. The time now is 23:20.

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