Raised This Month: $ Target: $400
 0% 

more detailed vault [edited]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gzus
Member
Join Date: Jan 2007
Old 02-15-2007 , 14:26   more detailed vault [edited]
Reply With Quote #1

before i just jump into it and get completely lost, i figured id ask.

now dont get me wrong im not just askin someone to throw some code back at me, id like to understand more how vault works i guess.
what i'd like to do is take this basic save/load xp script, which saves and loads only the chose players race/xp/authid. what id like it to do is keep track of multiple races xp, so maybe the vault would look like:


RACE-[AUTHID1]-mutantclass 0
RACE-[AUTHID1]-mutantxp 0
RACE-[AUTHID1]-mutantlevel 0
RACE-[AUTHID1]-alienclass 0
RACE-[AUTHID1]-alienxp 0
RACE-[AUTHID1]-alienlevel 0

what it looks like now is:

//defualt vault
RACE-[AUTHID1]-class 0
RACE-[AUTHID1]-xp 0
RACE-[AUTHID1]-level 0



this comes from

Code:
---------------------------------- public SaveXP(id)     {     new authid[32];     get_user_authid(id,authid,31);     new vaultkey[64], vaultdata[64];         format(vaultkey,63,"RACE-%s-class",authid);     format(vaultdata,63,"%d",PlayerClass[id]);     set_vaultdata(vaultkey,vaultdata);         format(vaultkey,63,"RACE-%s-xp",authid);     format(vaultdata,63,"%d",PlayerXP[id]);     set_vaultdata(vaultkey,vaultdata);         format(vaultkey,63,"RACE-%s-level",authid);     format(vaultdata,63,"%d",PlayerLevel[id]);     set_vaultdata(vaultkey,vaultdata);     server_print("--MHO MOD-- SAVED XP",0.01) } //---------------------------------------

now im assuming if i had to make 4 copies of this code to actually save each race, well atleast that was my first thought, but then i was thinking of checking the users class, then maybe using a case to select which stong to save it as, like mutantclass, case 2 would be alienclass

im not sure which would be the best way to go, so im lookin for ideas
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com

Last edited by gzus; 02-15-2007 at 14:31.
gzus is offline
 



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 00:40.


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