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
__________________