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

Fix Globalevent!

Zarabustor

Human Being
Joined
Sep 10, 2009
Messages
186
Reaction score
0
Location
Cancun, Mexico
Hi! this script was for tfs 3.5 and now i change to tfs 3.6 and it dont works look:

function onThink(interval, lastExecution, thinkInterval)

for _, name in ipairs(getOnlinePlayers()) do
local player = getPlayerByName(name)
if getPlayerStorageValue(player,11551) == 1 then
doSendAnimatedText(getCreaturePosition(player), "VIP!", TEXTCOLOR_RED)
doSendMagicEffect(getCreaturePosition(player), CONST_ME_GIFT_WRAPS)
end
end
return TRUE
end

<globalevent name="VIP" interval="10" event="script" value="vip.lua"/>
 
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getOnlinePlayers()) do
		if getPlayerStorageValue(cid, 11551) == 1 then
			doSendAnimatedText(getCreaturePosition(cid), "VIP!", TEXTCOLOR_RED)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end
 
hey, how did u get my script?
Lua:
function onThink(interval, lastExecution, thinkInterval)

    for _, name in ipairs(getOnlinePlayers()) do
        local player = getPlayerByName(name)
        if getPlayerStorageValue(player,11551) == 1 then
            doSendAnimatedText(getCreaturePosition(player), "VIP",math.random(1,255))
            doSendMagicEffect(getCreaturePosition(player), CONST_ME_GIFT_WRAPS)
        end
    end
return TRUE
end
that one works
 
i already checked, but idk why for tfs 3.5 works and for tfs 3.6 dont :S look:

<globalevent name="VIP" interval="10" event="script" value="vip.lua"/>

function onThink(interval, lastExecution, thinkInterval)

for _, name in ipairs(getOnlinePlayers()) do
local player = getPlayerByName(name)
if getPlayerStorageValue(player,11551) == 1 then
doSendAnimatedText(getCreaturePosition(player), "VIP",math.random(1,255))
doSendMagicEffect(getCreaturePosition(player), CONST_ME_GIFT_WRAPS)
end
end
return TRUE
end
 
[13/01/2010 20:06:29] [Error - GlobalEvent Interface]
[13/01/2010 20:06:29] data/globalevents/scripts/vip.lua:eek:nThink
[13/01/2010 20:06:29] Description:
[13/01/2010 20:06:29] (luaGetCreatureStorage) Creature not found
 
i already changed "getOnlinePlayers()" to "getPlayersOnline()" and says this error:

[13/01/2010 20:11:56] [Error - GlobalEvent Interface]
[13/01/2010 20:11:56] data/globalevents/scripts/vip.lua:eek:nThink
[13/01/2010 20:11:56] Description:
[13/01/2010 20:11:56] (luaGetCreatureStorage) Creature not found
 
i already changed "getOnlinePlayers()" to "getPlayersOnline()" and says this error:

[13/01/2010 20:11:56] [Error - GlobalEvent Interface]
[13/01/2010 20:11:56] data/globalevents/scripts/vip.lua:eek:nThink
[13/01/2010 20:11:56] Description:
[13/01/2010 20:11:56] (luaGetCreatureStorage) Creature not found
Uhm just to be sure, post the script that you're using ...
 
function onThink(interval, lastExecution, thinkInterval)

for _, name in ipairs(getOnlinePlayers()) do
local player = getPlayerByName(name)
if getPlayerStorageValue(player,11551) == 1 then
doSendAnimatedText(getCreaturePosition(player), "VIP",math.random(1,255))
doSendMagicEffect(getCreaturePosition(player), CONST_ME_GIFT_WRAPS)
end
end
return TRUE
end
 
Lua:
function onThink(interval, lastExecution, thinkInterval)

	for _, pid in ipairs(getPlayersOnline()) do
		if getPlayerStorageValue(pid, 11551) == 1 then
			doSendAnimatedText(getCreaturePosition(pid), "VIP", math.random(1,255))
			doSendMagicEffect(getCreaturePosition(pid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end

This should work!

PD: Use code tags!
 
function onThink(interval, lastExecution, thinkInterval)

for _, name in ipairs(getOnlinePlayers()) do
local player = getPlayerByName(name)
if getPlayerStorageValue(player,11551) == 1 then
doSendAnimatedText(getCreaturePosition(player), "VIP",math.random(1,255))
doSendMagicEffect(getCreaturePosition(player), CONST_ME_GIFT_WRAPS)
end
end
return TRUE
end
Some people never learn ......
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getPlayersOnline()) do
		if getPlayerStorageValue(cid, 11551) == 1 then
			doSendAnimatedText(getCreaturePosition(cid), "VIP!", TEXTCOLOR_RED)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end
#darkhaos
:mad:@@@@@@@@@@@
And, you're not using code tags either :eek:
lua tags scr3w up tabbing
 
Some people never learn ......
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getPlayersOnline()) do
		if getPlayerStorageValue(cid, 11551) == 1 then
			doSendAnimatedText(getCreaturePosition(cid), "VIP!", TEXTCOLOR_RED)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end
#darkhaos
:mad:@@@@@@@@@@@

HAHAHAHAHA!! i'm more fasterr :D! xDD!!!!
 
Back
Top