Raised This Month: $ Target: $400
 0% 

How to save something when player disconnect?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lucky888
Senior Member
Join Date: Nov 2011
Location: Paradise
Old 11-03-2013 , 00:47   How to save something when player disconnect?
Reply With Quote #1

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.
__________________

Last edited by hornet; 11-03-2013 at 02:09. Reason: please do not change the font size
Lucky888 is offline
Send a message via Yahoo to Lucky888
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 11-03-2013 , 01:50   Re: How to save something when player disconnect?
Reply With Quote #2

Please show your code. Then you can use nvault to save load the unlocks
__________________
Blizzard_87 is offline
Lucky888
Senior Member
Join Date: Nov 2011
Location: Paradise
Old 11-03-2013 , 08:01   Re: How to save something when player disconnect?
Reply With Quote #3

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?
__________________

Last edited by Lucky888; 11-03-2013 at 08:09.
Lucky888 is offline
Send a message via Yahoo to Lucky888
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 23:20.


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