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

What's cid?

Status
Not open for further replies.
You would be better off telling us what you want to do with that script, so we can help you get there.
 
Last edited:
ok
Code:
function onThink(interval)
	return doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
end
 
escape() = when player press esc (C++ code)

Code:
function onThink(interval)
	if escape() then
		doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	end
	return true
end
 
Lua:
local config = {
	toTown = true, -- teleport them to their town temple?
	position = {x = 100, y = 100, z = 7} -- IF ABOVE IS FALSE, then teleport here
}

function onThink(cid, interval)
	for _, pid in ipairs(getPlayersOnline())
		if(getCreatureStorage(pid, storage) > 0) then -- You can change this "if statement" to whatever you want to do.
			doTeleportThing(pid, config.toTown and getTownTemplePosition(getPlayerTown(pid)) or config.position)
		end
	end
	return true
end
 
Lua:
local config = {
	toTown = true, -- teleport them to their town temple?
	position = {x = 100, y = 100, z = 7} -- IF ABOVE IS FALSE, then teleport here
}

function onThink(cid, interval)
	for _, pid in ipairs(getPlayersOnline())
		if(getCreatureStorage(pid, storage) > 0) then -- You can change this "if statement" to whatever you want to do.
			doTeleportThing(pid, config.toTown and getTownTemplePosition(getPlayerTown(pid)) or config.position)
		end
	end
	return true
end

worked *-*
thanks
 
Status
Not open for further replies.
Back
Top