Dankoo
Active Member
- Joined
- Sep 4, 2010
- Messages
- 1,007
- Reaction score
- 27
I've created an talkaction, that when the player says !vip, it shows how many VIP days are left, and an animation talking he's VIP
so, when a player log in the same animation appears, but the problem is, the animation appears to all VIP players when someone say !VIP or log in, here's the script:
talkaction:
<talkaction words="!vip;/vip" event="script" value="viptalk.lua"/>
And login's:
creatures
<event type="login" name="VipEffect" event="script" value="vipEffect.lua"/>
How can I make it to appear only to the player that said !vip, and if possible, an exhaustion of 30~60 sec too
so, when a player log in the same animation appears, but the problem is, the animation appears to all VIP players when someone say !VIP or log in, here's the script:
talkaction:
<talkaction words="!vip;/vip" event="script" value="viptalk.lua"/>
LUA:
function onSay(cid, words, param)
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
if getPlayerVipDays(cid) >= 1 then
doSendMagicEffect(getPlayerPosition(cid), 27)
doPlayerSendTextMessage(cid, 19, "Você tem ".. getPlayerVipDays(cid) .." dias de VIP.")
doSendAnimatedText(getPlayerPosition(cid), "VIP!", TEXTCOLOR_RED)
end
end
return true
end
And login's:
creatures
<event type="login" name="VipEffect" event="script" value="vipEffect.lua"/>
LUA:
--- Script by Kekox
function onLogin(cid)
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
if getPlayerVipDays(cid) >= 1 then
doSendMagicEffect(getPlayerPosition(cid), 27)
doSendAnimatedText(getPlayerPosition(cid), "VIP!", TEXTCOLOR_RED)
end
end
return true
end
How can I make it to appear only to the player that said !vip, and if possible, an exhaustion of 30~60 sec too