下面是引用 森之千手 于 2010-05-10 20:52 发表的 :
你写得对,但...你有写
复制程式
public LoadData(id)
{
}
public SaveData(id)
{
}
吗?
有哦!!
复制程式
public SaveData(id)
{
new name[35], vaultkey[64], vaultdata[256]
get_user_name(id, name, 34)
format(vaultkey, 63, "%s-LevelInfo", name)
format(vaultdata, 255, "%i#%i#%i#", g_xp[id], g_level[id], g_damage[id])
nvault_set(g_vault, vaultkey, vaultdata)
}
public LoadData(id)
{
new name[35], vaultkey[64], vaultdata[256]
get_user_name(id,name,34)
format(vaultkey, 63, "%s-LevelInfo", name)
format(vaultdata, 255, "%i#%i#%i#", g_xp[id], g_level[id], g_damage[id])
nvault_get(g_vault, vaultkey, vaultdata, 255)
replace_all(vaultdata, 255, "#", " ")
new playerxp[32], playerlevel[32], playerdamage[32]
parse(vaultdata, playerxp, 31, playerlevel, 31, playerdamage, 31)
g_xp[id] = str_to_num(playerxp)
g_level[id] = str_to_num(playerlevel)
g_damage[id] = str_to_num(playerdamage)
}