Can anyone write a code searching max value from whole nvault?
This is my save data function:
PHP Code:
public Save(id){
new name[35]
get_user_name(id,name,34)
new vaultdata[256];
new vaultkey[64];
format(vaultkey,63,"%s-nik",name);
format(vaultdata,255,"%i#%i#",level[id], punkty[id])
nvault_set(g_Vault,vaultkey,vaultdata);
}
I want set +1 level to player who has the most punkty-value and reset all punkty-value to all keys, is that possible? This is a kind of xp mod but i want add +1 lvl to a player who have the most punkty collected in one day fe. At 24:00 find player who has the most punkty and add him +1 lvl, reset all punkty for all players. Next day they must collect punkty and at 24:00 again find player who has the most punkty and add him +1 lvl etc.