code
dano = {}
local player = source
function bloquear(source)
dano[player] = 1
setTimer(tirar,8000,1,source)
end
addEventHandler ( "onPlayerDamage", root, bloquear )
function tirar(source)
dano[player] = 0
end
function clientPickupHit(thePlayer,pickup, matchingDimension)
local pickupType = getPickupType( source )
if (dano[player] == 1) then
if (pickupType == 0) or (pickupType == 1) then
outputChatBox("Não é possivel pegar pickup em combate!",player, 255, 0, 0)
cancelEvent()
end
end
end
addEventHandler("onPickupHit", root, clientPickupHit)
error: table index is nil
thx for help, i finished.