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

tp text help

xavierek

New Member
Joined
Apr 11, 2009
Messages
209
Reaction score
0
PHP:
function onThink(interval, lastExecution)
function sendText(pos, text)
	doSendAnimatedText(pos, text, math.random(01,255))
end
local info = {
[1] = {text = "TP text 1", pos = {x=463,y=490,z=6}},
[2] = {text = "TP text 2", pos = {x=462,y=489,z=6}}
}

for i, a in ipairs(info) do
	text = info[a].text
	pos = info[a].pos
	addEvent(sendText, 500, pos, text)
end

return TRUE
end
what is dont work i get error in line 11 atempt to index field "" text = info[a].text""
 
Code:
local t = {
	[{x=463,y=490,z=6}] = 'TP text 1',
	[{x=462,y=489,z=6}] = 'TP text 2'
}
function onThink(interval, lastExecution)
	for pos, text in pairs(t) do
		doSendAnimatedText(pos, text, math.random(255))
	end
	return true
end
 
globalevents.xml
PHP:
<globalevent name="EffectTile" interval="3000" script="effectile.lua"/>

create: Effectile.lua

PHP:
local config = {
positions = {
["Your text"] = { x = 32372, y = 32243, z = 7 },

},

effects = {
CONDITION_PARAM_DELAYED



}
}

function onThink(cid, interval, lastExecution)
for text, pos in pairs(config.positions) do
doSendMagicEffect(pos, math.random(1, #config.effects))
doSendAnimatedText(pos, text, math.random(1, 255))
end

return TRUE
end
 
Back
Top