hi otlanders, i got a problem with my VIP system, vip should end after 15 days, but it doesnt
also another problem with the V.I.P effect, if a gm used it, it appears on ghost mode, does anyone know how to remove it during ghost mode?
Thanks =)
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,11551) < 1 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 15))
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You are already a donator.")
end
return TRUE
end
also another problem with the V.I.P effect, if a gm used it, it appears on ghost mode, does anyone know how to remove it during ghost mode?
PHP:
function onThink(interval, lastExecution)
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
if getPlayerStorageValue(cid, 11551) >= 1 then
doSendMagicEffect(getPlayerPosition(cid), 27)
doSendAnimatedText(getPlayerPosition(cid), "V.I.P", 180)
end
end
return true
end
Thanks =)