how can i set the tickcount 1 time, and other things multiple times?
#3

thnx, i already found another way with some variables and other arrays:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(PlayerInfo[playerid][EnteredCar] == 0)
        {
            PlayerInfo[playerid][TickCount] = GetTickCount();
            PlayerInfo[playerid][EnteredCar] = 1;
            PlayerInfo[playerid][GoesInVehicle]++;
            SetTimerEx("ResetEnteredCar", 2000, 0, "d", playerid);
        }
        else if(PlayerInfo[playerid][EnteredCar] == 1)
        {
            PlayerInfo[playerid][GoesInVehicle]++;
        }
    }
    return 1;
}
onplayerupdate >>
pawn Код:
if(PlayerInfo[playerid][GoesInVehicle] >= 3)
    {
        new interval = GetTickCount() - PlayerInfo[playerid][TickCount];
        if(interval < 1)
        {
            new string[100], pName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pName, sizeof(pName));
            format(string, sizeof(string), "SERVER-BAN: %s got banned by the anticheat, Reason: ******/cleo Teleport Hacks detected", pName);
            SendClientMessageToAll(BANNEDMESSAGE, string);
            ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, "Ban Information", "{FF0000}You are banned from this server!\nReason: ******/cleo Teleport Hack Detected\nif you are banned innocently, then make a screenshot of this(F8), and place a unban apply at our forums:\n{00FF00}www.streetrodzracers.tk\n\nGoodbye\n\n{0000FF}Server Owners:\n{FF0000}Niels\n{00FF00}Ruben", "Okay", "");
            BanEx(playerid, "SERVER-BAN: Teleport Hacks detected");
        }
    }
thats how i did it, untested yet, but should work . anyways thnx for your help
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)