

|
Hi, thanks for the answer but this problem is here even when there is no players connected, so... impossible
|
|
Yes a lot but, this is not a "network" problem ?
I have run a test server (whitout players) and he have crash (I know that because I have see the bots disconnected) Can this problem come from timers ? What I don't understand is that the logs do not find anything. Yet I have crashdetect.. |
public timerGeneral()
{
time2sec++;
time5sec++;
time60sec++;
if(time60sec==60)
{
time5min++;
time30min++;
time60min++;
}
if(time60sec%60 == 0) // 1 min gйnйral (reset des variables de comptage)
{
Medics = 0;
taxi_nbrTaximen = 0;
Pizza = 0;
Mechanics = 0;
Truckers = 0;
cop_nbrCops = 0;
if(pizza_currentMission != 0) pizza_mission();
}
// Timers appliquйs aux joueurs
foreach(new i : Player)
{
if(!IsPlayerConnected(i) || !gPlayerLogged[i])
{continue;}
timer1sec(i);
if(time2sec%2 == 0) {timer2sec(i);}
if(time5sec%5 == 0) {timer5sec(i);}
if(time60sec%60 == 0) {timer1min(i);}
if(time5min%6 == 0) {timer5min(i);}
if(time30min%31 == 0) {timer30min(i);}
if(time60min%61 == 0) {timer60min(i);}
}
if(time2sec >= 2)
{
time2sec = 0;
}
if(time5sec >= 5)
{
check_reloadSQL();
time5sec = 0;
}
if(time60sec >= 60)
{
new hour, minute, second;
gettime(hour, minute, second);
if(minute == 0)
{
new players_count = 0;
foreach(new i : Player)
{
if(IsPlayerConnected(i) && gPlayerLogged[i]!=0)
{
if(isafk[i] != 1)
{PayDay(i); mission_random(i);}
players_count++;
}
}
new query1[MAX_STRING], query2[MAX_STRING], query3[MAX_STRING];
format(query1, sizeof(query1), "UPDATE srp_players_vip SET Expiration = (Expiration-1) WHERE Expiration > 0"); // Dйcrйmentation des packs VIP
format(query2, sizeof(query2), "UPDATE srp_log_tempbans SET remaintime = (remaintime-1) WHERE remaintime > 0"); // Dйcrйmentation des bans temporaires
format(query3, sizeof(query3), "INSERT INTO srp_server_stats VALUES('', %d, NOW())", players_count); // Sauvegarde du nombre de connectйs
mysql_query(dbc, query1, false);
mysql_query(dbc, query2, false);
mysql_query(dbc, query3, false);
IncCadavreTimes(); // On incrйmente les temps (heures) des cadavres
}
if(hour == 20 && minute == 0)
{loterie_tirage();}
if(hour%2 == 1 && minute == 0)
{
new string[MAX_STRING_MSG];
format(string, sizeof(string), "Los Santos Lottery: le jackpot est de %d$! Tickets en vente en bureau de tabac. Tirage tous les jours а 20h.", loterie_jackpot);
SendClientMessageToAll(COLOR_BIZ, string);
}
drop_checkDestroy();
time60sec = 0;
}
if(time5min >= 6)
{
gym_init(false);
cop_unauthoriseswat();
house_decrementCleanTime();
time5min = 1;
}
if(time30min >= 31)
{
time30min = 1;
}
if(time60min >= 60)
{
SetTimer("rp_decCount24h",15000,false);
SetTimer("biz_decrementLoc",30000,false);
SetTimer("house_tcambriolee",60000,false);
if(braquage_remainTime>0)
{braquage_decrementTime();}
Payday_Maj();
ChangeHour();
meteo_change();
time60min = 1;
}
}