Hey Hey
I have a mod that gives people levels ect on every kill... What i need to do is i have a MAX level a person can have than i want that informationer put into nvault to use on next map for some bonus.... Each players is also saved Level pr MAP incase of disconnect, and reconnect ect...
But when i set a person idendt with: nault_pset and the server changemap and preforms the "prune" command, then the server lags/stops responding.
Code:
new LevelVault;
public plugin_init()
{
register_plugin(JL_PLUGIN, JL_VERSION, JL_AUTHOR)
register_event("DeathMsg", "new_kill", "a", "1>0")
LevelVault=nvault_open("player_levels");
nvault_prune(LevelVault,0,0);
}
public client_disconnect(id)
{
new AuthID[40];
get_user_authid(id,AuthID,39);
new Value[32];
formatex(Value,31,"%d",Level[id]);
nvault_set(LevelVault,AuthID,Value);
return PLUGIN_HANDLED
}
public new_kill(id)
{
new KillerID = read_data(1)
new VictimID = read_data(2)
if(Level[KillerID] == 26)
{
new infoset[32]
format(infoset,31 , "%s",KillerID)
nvault_pset(LevelVault,"Round_Bonus",infoset);
return PLUGIN_HANDLED
}
}