jonathan.dsa
New Member
- Joined
- Nov 17, 2011
- Messages
- 61
- Reaction score
- 0
Hello dears ^^
I have made a script for give one day of VIP for players level 120 more, and only for one char of account (i use vip system of mock), but when a player get level 120,did show the message, but player dont get VIP, here is my script:
Somebody can help me with that please?
I have made a script for give one day of VIP for players level 120 more, and only for one char of account (i use vip system of mock), but when a player get level 120,did show the message, but player dont get VIP, here is my script:
local config = {
level = 120, -- Level que o player vai ser promovido. -- Storage Value que vai ser usado.
msg = "Parabéns, você recebeu 1 dia de vip!", -- Mensagem enviada quando atingir o level necessário.
msgtype = MESSAGE_EVENT_ADVANCE -- Tipo da mensagem enviada.
}
--[Fim das Configurações]--
function onAdvance(cid, oldLevel, newLevel)
if getPlayerLevel(cid) >= config.level and getGlobalStorageValue(getPlayerAccountId(cid)+326) <= 0 then
setGlobalStorageValue(getPlayerAccountId(cid)+326, 1)
vip.setVipByAccount(getPlayerAccountId(cid),1)
doPlayerSendTextMessage(cid, config.msgtype, config.msg)
end
return TRUE
end
Somebody can help me with that please?