From 4c7f615e03b048021abcb17f530f195d06b77a58 Mon Sep 17 00:00:00 2001 From: Avarian Knight Date: Tue, 6 Apr 2021 14:54:57 -0500 Subject: [PATCH] don't emit 3dme:sent3dme if it gets blocked --- server/server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/server.js b/server/server.js index 55b4a5c..ef822d1 100644 --- a/server/server.js +++ b/server/server.js @@ -45,13 +45,15 @@ RegisterCommand('me', (source, args) => { // make sure they're not on cooldown (they could try spamming the command) if (!meCooldown[source] || meCooldown[source] < GetGameTimer()) { meCooldown[source] = GetConvarInt('3dme_cooldown', 1500) + GetGameTimer() - // useful for logging - emit('3dme:sent3dme', source, message) // enable support for pma-voice, if the player has toggled it. const proximity = Player(source).state.proximity * (GetConvar('voice_useNativeAudio', 'false') === 'true' && 3 || 1) if (GetConvarInt('3dme_enableProximity', 0) && Math.floor(proximity) > GetConvarInt('3dme_maxRange', 25)) return emit('3dme:voiceRangeExploit', source) + // useful for logging + emit('3dme:sent3dme', source, message) + + const plyCoords = GetEntityCoords(GetPlayerPed(source)) const players = getPlayers() players.forEach((plySrc) => {