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?
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;
}