function zombieSpawning()
local x, y, z = getElementPosition(getLocalPlayer())
local material, hitX, hitY, hitZ = isObjectAroundPlayer2(getLocalPlayer(), 30, 3)
if material == 0 and not isInBuilding(x, y, z) then
triggerServerEvent("createZomieForPlayer", getLocalPlayer(), hitX, hitY, hitZ)
end
end
setTimer(zombieSpawning, 3000, 0)