Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

MySQL spammed due to slow timer.

$
0
0
Code:

            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?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>