• 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!

npc on think problem

Code:
function onThink()
	local npc, _t = getNpcId(), {}
	local p, f = getThingPos(npc)
	for _, [B][COLOR="red"]cid[/COLOR][/B] in ipairs(getSpectators(p, radX, radY) or {}) do
		if isPlayer(cid) then

the script is messy (based on mine) but it should work since there's cid from the loop. add something to check where it fails (print?)
 
function onThink()
local npc, _t = getNpcId(), {}
local p, f = getThingPos(npc)
for _, cid in ipairs(getSpectators(p, radX, radY) or {}) do
if isPlayer(cid) then
i take this from one off your's scripts
sorry if you dont like
and thanks for your dedication to helping users of the forum

dont apear any error on console
just does not work
 
Back
Top