Data / Talkactions / Talkactions.xml
PD: El doSendAnimatedText no sirve para 8.70+ así que si tienen un server de esas versiones, simplemente eliminen las lineas de doSendAnimatedText y ya.
Los créditos del verdadero creador de el script son de:
[Tienes que estar registrado y conectado para ver este vínculo]
- Código:
<talkaction words="!vip" event="script" value="Vip Effect.lua"/>
- Código:
local time = 5 -- SEGUNDOS -- intervalo de tiempo (en este caso es 5, asi que cada 5 segundos saldra el efecto y el texto VIP)
local txt = "VIP!" --texto VIP
local eff = 27 --efecto VIP
local say_events = {}
local function SayText(cid)
if isPlayer(cid) == TRUE then
if say_events[getPlayerGUID(cid)] ~= nil then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),txt,TEXTCOLOR_RED)
doSendMagicEffect(getCreaturePosition(cid), 40)
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
end
end
return TRUE
end
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
if param == "on" then
if getPlayerStorageValue(cid, 12391) >= 1 then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),txt,TEXTCOLOR_RED)
doSendMagicEffect(getCreaturePosition(cid), 40)
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,"You turned on the VIP Effect.")
else
doPlayerSendCancel(cid, "You can't use this command.")
end
elseif param == "off" then
if getPlayerStorageValue(cid, 12391) >= 1 then
stopEvent(say_events[getPlayerGUID(cid)])
say_events[getPlayerGUID(cid)] = nil
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,"You turned off the VIP Effect.")
else
doPlayerSendCancel(cid, "You can't use this command.")
end
end
return TRUE
end
PD: El doSendAnimatedText no sirve para 8.70+ así que si tienen un server de esas versiones, simplemente eliminen las lineas de doSendAnimatedText y ya.
Los créditos del verdadero creador de el script son de:
[Tienes que estar registrado y conectado para ver este vínculo]