Fix loop limit error

Resolves the "attempt to get length" error, which caused that the robbery didn't stop when being too far from the zone, and sending notification to police officers.

Tested and working.
This commit is contained in:
Laszlo Dindeleux
2018-03-07 15:16:35 +01:00
committed by GitHub
parent 9911afa14b
commit 8ec35a5b62
+1 -1
View File
@@ -11,7 +11,7 @@ end
RegisterServerEvent('esx_holdup:toofar')
AddEventHandler('esx_holdup:toofar', function(robb)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local xPlayers = ESX.GetPlayers()
rob = false
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])