Skip to content

Instantly share code, notes, and snippets.

@Andrey2470T
Last active July 18, 2018 18:25
Show Gist options
  • Save Andrey2470T/1f276a7f812b240ca20a8bc0743d495f to your computer and use it in GitHub Desktop.
Save Andrey2470T/1f276a7f812b240ca20a8bc0743d495f to your computer and use it in GitHub Desktop.
function misc.is_same_particlespawner_exists (player, particlespawner_id)
local current_player_particlespawners = player:get_meta():get_int(active_particlespawners)
local max_particlespawners_index = 0
for search_same_particlespawner, particlespawner_table in pairs(current_player_particlespawners) do
max_particlespawners_index = max_particlespawners_index + 1
if search_same_particlespawner == particlespawner_id then
return true
break -- line:140
end
if max_particlespawners_index == table.maxn(current_player_particlespawners) then
return false
break
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment