is player on vehicle
#1

my anticheat will ban anyone who is wing surfing or riding on top of a car because it thinks there speed hacking / air breaking... is there a way to detect if their on top or just near a moving vehicle so people wont get anticheated by wing surfing / riding on cars?

Thanks,
Ethan
Reply
#2

pawn Код:
IsPlayerOnAnyVehicle(playerid)
{
  new Float:vehx, Float:vehy, Float:vehz, Float:plyx, Float:plyy, Float:plyz;
  GetVehiclePos(v, plyx, plyy, plyz);
  for (new v; v < MAX_VEHICLES; v++)
  {
    if (GetVehicleModel(v) >= 400) // not sure about this line
    {
      GetVehiclePos(v, vehx, vehy, vehz);
      if (PlayerToPoint(10, playerid, vehx, vehy, vehz) && vehz + 2 < plz)
      {
        return 1; // could also return the vehicle ID (v)
      }
    }
  }
  return 0;
}
Maybe something like this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)