Kod:
mtkayit = nvault_open("Mt2")
Kod:
public kaydet(id){
new name[64],key[72], stats[34];
get_user_name(id, name, 63);
formatex(key, 71, "%s-MT2", name);
formatex(stats, 33, "%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#", mt_shop_secenek1[id], mt_shop_secenek2[id], mt_shop_secenek3[id], mt_shop_secenek4[id], mt_shop_secenek5[id], mt_shop_secenek6[id], mt_shop_secenek7[id], mt_pot_kirmizi[id], mt_mavi_pot[id], mt_ep_miktari[id],mt_gold_bar[id],mt_gumus_bar[id],mt_odun_bar[id],mt_won_bar[id],mt_shop_secenek8[id]);
nvault_set(mtkayit, key, stats);
}
Kod:
public yukle(id){
new name[64],key[72], stats[34], stat[15][16];
get_user_name(id, name, 63);
formatex(key, 71, "%s-MT2",name);
nvault_get(mtkayit, key, stats, 33);
replace_all(stats , 33, "#", " ")
parse(stats, stat[0], 11, stat[1], 11, stat[2], 11 , stat[3], 11, stat[4], 11, stat[5], 11, stat[6], 11, stat[7], 11, stat[8], 11, stat[9], 11, stat[10], 11, stat[11], 11, stat[12], 11, stat[13], 11, stat[14], 11);
mt_shop_secenek1[id] = str_to_num(stat[0]);
mt_shop_secenek2[id] = str_to_num(stat[1]);
mt_shop_secenek3[id] = str_to_num(stat[2]);
mt_shop_secenek4[id] = str_to_num(stat[3]);
mt_shop_secenek5[id] = str_to_num(stat[4]);
mt_shop_secenek6[id] = str_to_num(stat[5]);
mt_shop_secenek7[id] = str_to_num(stat[6]);
mt_pot_kirmizi[id] = str_to_num(stat[7]);
mt_mavi_pot[id] = str_to_num(stat[8]);
mt_ep_miktari[id] = str_to_num(stat[9]);
mt_gold_bar[id] = str_to_num(stat[10]);
mt_gumus_bar[id] = str_to_num(stat[11]);
mt_odun_bar[id] = str_to_num(stat[12]);
mt_won_bar[id] = str_to_num(stat[13]);
mt_shop_secenek8[id] = str_to_num(stat[14]);
}