From c21cde06f767e2d2ddb150448c8e358bca206941 Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 13 Apr 2022 18:45:34 +1200 Subject: [PATCH] :racehorse: /me command - Check input first --- server/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/commands.lua b/server/commands.lua index 4cc928f..3200e7a 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -253,10 +253,10 @@ end, 'user') -- Me command QBCore.Commands.Add('me', 'Show local message', {{name = 'message', help = 'Message to respond with'}}, false, function(source, args) + if #args < 1 then TriggerClientEvent('QBCore:Notify', source, Lang:t('error.missing_args2'), 'error') return end local ped = GetPlayerPed(source) local pCoords = GetEntityCoords(ped) local msg = table.concat(args, ' ') - if msg == '' then return end if string.match(msg, "<") then TriggerClientEvent('QBCore:Notify', source, Lang:t('error.wrong_format'), 'error') return end for k,v in pairs(QBCore.Functions.GetPlayers()) do local target = GetPlayerPed(v)