nevix
Tunzodus.net
Looking for help how to count players if specified zone?
My script but doesnt work:
My script but doesnt work:
Code:
centerPos = {x = 32345, y = 32222, z = 7}
function onUse(cid, item, fromPosition, itemEx, toPosition)
count = 0
local spectators = getSpectators(centerPos, 2, 2, false)
if spectators ~= nil then
for _, spectator in ipairs(spectators) do
if isPlayer(spectator) then
count = count + 1
end
end
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Info."..count.."")
return true
end