Detecting DriveBy
#1

How do you reliably detect if a player drive by'd for his kill?

I've tryed doing "if (IsPlayerInAnyVehicle(killerid))" and "if(reason == 29 && IsPlayerInAnyVehicle(killerid)) (29 = SMG)

Neither worked. Any idea?
Reply
#2

check anticheats for detecting driveby's.
Reply
#3

Код:
OnPlayerDeath(playerid, killerid, reason)
{
  if(IsPlayerInAnyVehicle(killerid))
  {
    if(reason == 28 || reason == 29 || reason == 32)
    {
      new Float:tmpx, Float:tmpy, Float:tmpz;
      GetPlayerPos(playerid, tmpx, tmpy, tmpz);
      SendClientMessage(killerid, 0xff0000ff, "Driveby detected. You have been kicked.");
      SendClientMessage(playerid, 0x000000ff, "You have been killed by driveby, you will now respawn where you died.");
      SpawnPlayer(playerid);
      SetPlayerHealth(playerid, 100);
      SetPlayerPos(playerid, tmpx, tmpy, tmpz);
      Kick(killerid);
      
    }
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)