19.09.2011, 07:40
This won't actually detect if the player is drivebying, it will detect if someone has parked on the top of another player / choppers them. You can fix this by doing
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if (issuerid != INVALID_PLAYER_ID && (weaponid == 32 || weaponid == 28 || weaponid == 29) && KOPDB_hasOPDB && (GetPlayerState(issuerid) == PLAYER_STATE_PASSENGER || GetPlayerState(issuerid) == PLAYER_STATE_DRIVER))
CallLocalFunction("OnPlayerDriveBy", "ddd", issuerid, playerid, 0);
return (KOPDB_hasOPTD) ? KOPDB_CallOPTD() : 0;
}