test afk hit
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (afkCounter >= 60) {
|
||||
if (afkCounter >= 0) {
|
||||
afkStatus = true;
|
||||
globalData.IsAfk = afkStatus;
|
||||
setServerAfkStatus(afkStatus);
|
||||
|
||||
@@ -208,7 +208,7 @@ import PilotRouteList from './Jobs/PilotRouteSelect';
|
||||
PilotRouteList(globalData);
|
||||
|
||||
import weapondamageUtil from './util/weapondamage';
|
||||
weapondamageUtil();
|
||||
weapondamageUtil(globalData);
|
||||
|
||||
import soundUtil from './util/sound';
|
||||
soundUtil();
|
||||
|
||||
@@ -18,7 +18,7 @@ function isTargetInPolygon(pos): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export default function weapondamageUtil() {
|
||||
export default function weapondamageUtil(globalData: IGlobalData) {
|
||||
let blockInput = false;
|
||||
|
||||
mp.players.local.setSuffersCriticalHits(false);
|
||||
@@ -31,6 +31,10 @@ export default function weapondamageUtil() {
|
||||
if ((isTargetInPolygon(sourceEntity.position) || isInAnyNoDMPolygon) && getWantedCount() === 0) {
|
||||
return true;
|
||||
}
|
||||
if (globalData.IsAfk == true) {
|
||||
mp.gui.chat.push("afkhit");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (spawnschutzEnabled && getWantedCount() === 0) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user