Dankoo
Active Member
- Joined
- Sep 4, 2010
- Messages
- 1,007
- Reaction score
- 27
When a VIP player log in or use !vip command, the magic effect is displayed to all VIP players
I know what's causing this, but can't fix it so far, have a look:
this is the script I've adapted etc:
the problem obviously is here:
But I've tried to replace this, and got no results, as it says the player was not found etc...
what can I use to replace?
thanks
eace:
I know what's causing this, but can't fix it so far, have a look:
this is the script I've adapted etc:
LUA:
function onSay(cid, words, param)
local config = {
exhaustion = 1,
storage = 33545
}
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
if getPlayerVipDays(cid) >= 1 and (exhaustion.check(cid, config.storage)) then
doPlayerSendCancel(cid, "Você só pode usar este comando uma vez a cada " .. config.exhaustion .. " minuto.")
return true
end
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)
exhaustion.set(cid, config.storage, config.exhaustion * 60)
end
end
return true
end
the problem obviously is here:
LUA:
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
But I've tried to replace this, and got no results, as it says the player was not found etc...
what can I use to replace?
thanks