SA-MP Forums Archive
Server console spamming - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Server console spamming (/showthread.php?tid=191003)



Server console spamming - Pooh7 - 17.11.2010

Hello

I'm added few functions to OnPlayerUpdate.
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerConnected(playerid))
    {
//************************* [ I'M ADDED THIS FOUR FUNCTIONS ] *************************
        JetPack();
        OruzjeProvera();
        PancirProvera();
        BrzinaProvera();
//************************* [ I'M ADDED THIS FOUR FUNCTIONS ] *************************
        if(gPlayerLogged[playerid])
        {
            new string3[32];
            new playername3[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername3, sizeof(playername3));
            format(string3, sizeof(string3), "%s.ini", playername3);
            new File: hFile = fopen(string3, io_write);
            if (hFile)
            {
                   // Rest of code (GodFather mod)
                   // Rest of code (GodFather mod)
                   // Rest of code (GodFather mod)
                   // Rest of code (GodFather mod)
That are functions for prevent cheating (anti weapon, armour, speed and jetpack).
Before this problem I had this functions in timers.
pawn Код:
jetpack = SetTimer("JetPack", 5000, true);
    oruzja1 = SetTimer("OruzjeProvera", 4500, true);
    panca = SetTimer("PancirProvera", 15000, true);
    brzina = SetTimer("BrzinaProvera", 5000, true);
But I'm deleted this timers and added in OnPlayerUpdate.
And, when i added this functions, when someone left the server, server will spam console with messages.
Image:


When someone join to server, it's normal, without spam.

How to fix it?


EDIT: When i see spam, I'm testing that anticheat, and server is kicked me. I'm now joined and left the server and it is normal. So, spam is only when someone is kicked/banned.

Sorry for my bad english :/


Re: Server console spamming - wups - 18.11.2010

Don't add such functinos especially file reading on function OnPlayerUpdate(playerid)!
It gets called 'bout 20 times per second per player.