ADM24horas
New Member
- Joined
- Oct 4, 2015
- Messages
- 70
- Reaction score
- 0
hello guys, I tried several systems that puts the [ VIP ] + name, and so far not found a fucional system and come to you a wonderful staff . I got this script from my vip system only when der use add storage + name and when the vip end the name disappeared , although if someone has named [ VIP ] Morphy not create another character with Morphy name. They understand?
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local days,removeOnUse = 5000,true
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 23510)
local timenow = os.time()
local time = getPlayerStorageValue(cid, 23510) - os.time() <= 0 and timenow + daysvalue or storageplayer + daysvalue
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 23510, time)
local quantity = math.floor((getPlayerStorageValue(cid, 23510) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
if removeOnUse == true then doRemoveItem(item.uid, 1) end
return true
end