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