fexark
New Member
- Joined
- May 3, 2009
- Messages
- 89
- Reaction score
- 0
Please i need that scripts!
no globalevent becouse doesnt work pls! i have a talkaction, it works good but when i log out it stops doing it! xD please help, some script that i may use and then when i log it continues there pls help
Code:
--[[
Talking Tp/signs/tiles for TFS 0.2+
60% by Marki, 40% by Shawak
Idea by Shawak
]]--
local time = 5 -- 1 = 1 sec, 2 = 2 sec, ...
local config = {
--X pos,Y pos, Z pos, text
[1] = {pos = {281,2045,6}, text = {"Trainers"}},
[2] = {pos = {278,2050,6}, text = {"Citizen"}},
[3] = {pos = {281,2054,6}, text = {"Shops"}},
[17] = {pos = {282,2054,6}, text = {"Depot"}},
[4] = {pos = {289,2054,6}, text = {"Boat"}},
[5] = {pos = {290,2045,6}, text = {"Quarters"}},
[6] = {pos = {280,2030,6}, text = {"Pvp Shop"}},
[8] = {pos = {293,2034,6}, text = {"Fantasy"}},
[9] = {pos = {293,2035,6}, text = {"Hunting"}},
[10] = {pos = {297,2035,6}, text = {"Huntings"}},
[11] = {pos = {293,2036,6}, text = {"Zones"}},
[12] = {pos = {289,2027,6}, text = {"Quests"}},
[13] = {pos = {285,2009,6}, text = {"Depot"}},
[14] = {pos = {771,1843,7}, text = {"Desert"}},
[15] = {pos = {764,1853,7}, text = {"Plains"}},
[16] = {pos = {285,2048,6}, text = {"Welcome"}},
[7] = {pos = {283,2032,7}, text = {"Vip"}}
}
local say_events = {}
local function SayText(cid)
if isPlayer(cid) == TRUE then
if say_events[getPlayerGUID(cid)] ~= nil then
for _, area in pairs(config) do
doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
end
end
return TRUE
end
function onSay(cid, words, param, channel)
if param == "on" then
for _, area in pairs(config) do
doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
doPlayerSendTextMessage(cid,19,"You set the function \"SayText\" -> ON.")
elseif param == "off" then
stopEvent(say_events[getPlayerGUID(cid)])
say_events[getPlayerGUID(cid)] = nil
doPlayerSendTextMessage(cid,19,"You set the function \"SayText\" -> OFF.")
end
return TRUE
end