Raised This Month: $ Target: $400
 0% 

KeyValue Save


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lord Nightmare
Junior Member
Join Date: Feb 2014
Location: Poland
Old 09-14-2014 , 04:34   KeyValue Save
Reply With Quote #1

Hello
Can someone write a keyvalue save system to my mode
with class,level,exp

i have part of code to this

Code:
#include <sourcemod>

public Plugin:myinfo = 
{
    name = "New Plugin",
    author = "Unknown",
    description = "<- Description ->",
    version = "1.0",
    url = "<- URL ->"
}
enum _:player_info {
    
    Player_Exp = 0,
    Player_Lvl,
    Player_Class,
    Player_Perk,
}
new const player[65][player_info]

public OnPluginStart()
{
    // Add your own code here...
}
Help please..
Lord Nightmare is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-14-2014 , 04:50   Re: KeyValue Save
Reply With Quote #2

https://sm.alliedmods.net/api/index....d=show&id=286&
https://sm.alliedmods.net/api/index....d=show&id=285&

Might be a start
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 09-14-2014 , 09:03   Re: KeyValue Save
Reply With Quote #3

Lord Crymare..
you need to create .txt file to the directory manually..
Quote:
data/keyvalue_beginner/save_database.txt
i hope i wrote this as simple as possible for you to understand..
Untested..

EDIT: Keep in mind that keyvalu have the supernatural power to grow bigger and fatter thru time.
everytime i make my keyvalu i always include the time stamp shich i check evertie the map load.
For example, client info that older than 3 moths will be deleted from the database.. anyway its all up tou you.
Attached Files
File Type: sp Get Plugin or Get Source (keyvalue_beginner.sp - 374 views - 3.0 KB)
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 09-14-2014 at 09:33.
GsiX is offline
Lord Nightmare
Junior Member
Join Date: Feb 2014
Location: Poland
Old 09-14-2014 , 11:16   Re: KeyValue Save
Reply With Quote #4

GsiX thx i will test your code
Yes i know that you try to say me it's not really good method to save.

Optimaly the best way is MySQL but the create a save/load with using a database for me is hard.
I would by pleased you can help me create mysql save but anyway thx again for this code
Lord Nightmare is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 09-15-2014 , 00:24   Re: KeyValue Save
Reply With Quote #5

Jesus, u made me say the magic words again.
Why your title is key value?
For this imma kill myself..
Either I read your threads wrong as usual or your thread too spooky.

Edit:
Hope you understand my previous post. I have trouble writing something long word.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 09-15-2014 at 00:29.
GsiX is offline
Lord Nightmare
Junior Member
Join Date: Feb 2014
Location: Poland
Old 09-16-2014 , 07:48   Re: KeyValue Save
Reply With Quote #6

GsiX you save sytem keyvalues work good but is don't save exp for diffrent class.
I think i will start to create a mysql save data for my own.
This topic can be closed.
Lord Nightmare 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 05:30.


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