• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Insert in table players in area ~= cid

milbradt

New Member
Joined
Dec 25, 2011
Messages
177
Solutions
1
Reaction score
4
Code:
        local player = {}
        for _, pid in pairs(getPlayersOnline()) do
            if isInRange(getPlayerPosition(pid), positionTop, positionBot) then
                if getPlayerGUID(cid) ~= pid then
                    table.insert(player, pid)
                end
            end
        end

I do not want to put myself in the table.
how do I do that?
 
Code:
        local player = {}
        for _, pid in pairs(getPlayersOnline()) do
            if isInRange(getPlayerPosition(pid), positionTop, positionBot) then
                if getPlayerGUID(cid) ~= pid then
                    table.insert(player, pid)
                end
            end
        end

I do not want to put myself in the table.
how do I do that?
Use if cid ~= pid. Remove that getPlayerGUID.
 
Back
Top