q949480075q
|
分享:
▼
x0
|
[技术][CS1.6] 关于编写sma 保存的 急求 求指教,求帮助啊啊
换图后不保存经验了,怎么修改 ? 不换图的话,重入还是有EXP的!! 函数如下:
===================================分割线=============================================
public zapisz_exp(id) { new vaultkey[64],vaultdata[512]; new name[64]; format(vaultkey,63,"%s",name); get_user_authid(id,name,63); format(vaultkey,63,"%s",name);format(vaultdata,511,"%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#%d",player_xp[id],player_xp_all[id],dmg_level[id],gravitacja[id],health[id],shot_time_level[id],bieganie_level[id],widocznosc[id],autobh[id],magazynek[id],krytyk[id],wampiryzm[id]); nvault_set(zapis,vaultkey,vaultdata) client_print(id,print_chat,"保存成功") }
public wczytaj_exp(id) { new vaultkey[64],vaultdata[512]; new authid[64]; get_user_authid(id,authid,63); format(vaultkey,63,"%s",authid); nvault_get(zapis,vaultkey,vaultdata,511); replace_all(vaultdata,256,"#"," "); new jeden[100],dwa[100],trzy[100],cztery[100],piec[100],szesc[100],siedem[100],osiem[100],dziew[100],dzies[100],jedenascie[100],dwanascie[100] parse(vaultdata,jeden,99,dwa,99,trzy,99,cztery,99,piec,99,szesc,99,siedem,99,osiem,99,dziew,99,dzies,99,jedenascie,99,dwanascie,99) player_xp[id] = str_to_num(jeden); player_xp_all[id] = str_to_num(dwa); dmg_level[id] = str_to_num(trzy); gravitacja[id] = str_to_num(cztery); health[id] = str_to_num(piec); shot_time_level[id] = str_to_num(szesc); bieganie_level[id] = str_to_num(siedem) widocznosc[id] = str_to_num(osiem); autobh[id] = str_to_num(dziew); magazynek[id] = str_to_num(dzies) krytyk[id] = str_to_num(jedenascie) wampiryzm[id] = str_to_num(dwanascie); while(true){ if(player_xp_all[id] >= exp[level[id]] && sizeof(rangi) > level[id]){ level[id]++; } else { break; } } }
===================================分割线=============================================
缺少什么的话回帖说下!!
|