A more complicated way to use that code would be to use it this way which relies VERY heavily upon locals.....but this does more or less what you want.
local l_47_15 = l_0_21
l_0_39 = PedFindInAreaXYZ(l_47_8, l_47_9, l_47_10, 1.5)
l_47_11[1], l_47_12[2], l_47_13[3], l_47_14[4], l_47_15[5] =
l_47_11 = l_0_39
if l_47_11 then
l_47_11 = l_0_21
l_47_12 = nil
l_47_13 = nil
l_47_14 = nil
for l_47_14 = l_47_11, l_47_12, l_47_13 do
end
end
l_47_15 = PedIsValid
l_47_15 = l_47_15(l_47_14)
if l_47_15 then
l_47_15 = PedGetModel
local l_47_16 = true
for l_47_20 = l_0_27, nil, nil do
if l_47_20 == l_47_14 then
l_47_16 = false
else
end
end