MySQL spammed due to slow timer.
#1

pawn Код:
new query[256];
        GetPlayerIp(playerid, ip, sizeof(ip));
        format(query, sizeof(query), "INSERT INTO `bans` (playername, ip, Reason, Date, BanBy) VALUES ('%s', '%s', 'Weapon Hacking', %d, 0)", GetName(playerid), ip, gettime());
        mysql_tquery(dbHandle, query, "", "");


        SavePlayerData(playerid);
        ClearPlayerID(playerid);
        SetTimerEx("KickPlayer", 100,false,"i",playerid);
Bans are spammed in mysql 5 or 6 times before the player is kicked, is there a way to avoid duplicate inserts?
Reply


Messages In This Thread
MySQL spammed due to slow timer. - by Dokins - 11.06.2016, 19:41
Re: MySQL spammed due to slow timer. - by iGetty - 11.06.2016, 21:51
Re: MySQL spammed due to slow timer. - by Dokins - 11.06.2016, 22:09
Re: MySQL spammed due to slow timer. - by iGetty - 11.06.2016, 22:34

Forum Jump:


Users browsing this thread: 1 Guest(s)