Timer
#1

Hey, I got a noobie question:
Will this affect server's ping if it runs every 5 seconds ?

pawn Код:
forward cheatann(playerid);
public cheatann(playerid)    
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
// JETPACK
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
    {
        format(string, sizeof(string), "ANTICHEAT: [%d]%s has a JETPACK!",playerid, sendername);
        ABroadCast(COLOR_DARKRED, string, 7);
        return 1;
    }
// WEAPONS
    new accheckwp = GetPlayerWeapon(playerid);
    if(accheckwp == 35 || accheckwp == 36 || accheckwp == 37 || accheckwp == 38 || accheckwp == 44 || accheckwp == 45)
    {
        format(string, sizeof(string), "ANTICHEAT: [%d]%s has a FORBIDDEN GUN!", playerid, sendername);
        ABroadCast(COLOR_DARKRED, string, 7);
        return 1;
    }
    return 1;

}


SetTimer("cheatann", 5000, 1);
Reply


Messages In This Thread
Timer - by JohnFTW - 07.05.2014, 17:07
Re: Timer - by TheSimpleGuy - 07.05.2014, 17:17
Re: Timer - by Calgon - 08.05.2014, 02:08
Re: Timer - by JohnFTW - 08.05.2014, 16:40

Forum Jump:


Users browsing this thread: 1 Guest(s)