maxdamage99
15th October 2015, 18:32
I use a script to save the statistics in the database (mysql):
Endmap()
{
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
players[i] database_save();
wait 0.25; //without, lags so much that the card does not end
}
}
database_save()
{
sql_zapros="UPDATE `base_rank_players` SET `rank`='"+self.data["rank"]+"', `kills`='"+self.data["kills"]+"' WHERE `login_player`='"+self.accdata["login"]+"'";
mysql_query(level.db["mysql"], sql_zapros);
}
The data is saved, but if the number of players is greater than 5 server lag.
Characteristics my VDS:
RAM: 1024 (Indications at 10 players and change maps: 204/1024)
Proccesor Core's: 2 (2.8 + 2.8 Mhz); Ubuntu-14.04-x86_64-minimal
//////
Could it be due to libcod?????
Endmap()
{
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
players[i] database_save();
wait 0.25; //without, lags so much that the card does not end
}
}
database_save()
{
sql_zapros="UPDATE `base_rank_players` SET `rank`='"+self.data["rank"]+"', `kills`='"+self.data["kills"]+"' WHERE `login_player`='"+self.accdata["login"]+"'";
mysql_query(level.db["mysql"], sql_zapros);
}
The data is saved, but if the number of players is greater than 5 server lag.
Characteristics my VDS:
RAM: 1024 (Indications at 10 players and change maps: 204/1024)
Proccesor Core's: 2 (2.8 + 2.8 Mhz); Ubuntu-14.04-x86_64-minimal
//////
Could it be due to libcod?????