From cb7a063aa5da1ef63d86f2acdde0facfa7d1a917 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sat, 4 Jun 2022 18:36:54 -0400 Subject: [PATCH] return the player num, not the controller num --- eid_api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index 2cddd3a3..c48facca 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -1519,8 +1519,8 @@ end -- Returns true if any player is pressing the given button (you can also specify any of the input functions) function EID:PlayersActionPressed(button, inputFunc) inputFunc = inputFunc or Input.IsActionPressed - for k,_ in pairs(EID.controllerIndexes) do - if inputFunc(button, k) then return true, k end + for k,v in pairs(EID.controllerIndexes) do + if inputFunc(button, k) then return true, v end end return false end