-
-
Save Andrey2470T/1f276a7f812b240ca20a8bc0743d495f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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