24.10.2012, 11:31
thnx, i already found another way with some variables and other arrays:
onplayerupdate >>
thats how i did it, untested yet, but should work
. anyways thnx for your help
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;
}
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");
}
}

