Server console spamming
#1

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 :/
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)