Ta ae:
-- ScriptByskull --function onSay(cid, words, param)
if doPlayerRemoveItem(cid, 8302, 1) == TRUE then
local days = 3
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13540)
local timenow = os.time()
if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 13540, time)
local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem "..quantity .." dias de VIP restantes.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa da vip orb para colocar vip.")
end
return TRUE
end


info
Grupo: Campones
Registrado: 04/03/11
Posts: 15
Reputação: 0
Galeraa, meu Server já tem Sistema de Vip, é 1kk = 30 Dias, eu queria mudar, pra em vez de dinheiro ser o item (Vip Orb é o nome, Id 8302)...
o Script é esse;
1 VIP ORB = 3 Dias de Vip
-- ScriptByskull --
function onSay(cid, words, param)
local price = 1000000
if doPlayerRemoveMoney(cid, 1000000) == TRUE then
local days = 30
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13540)
local timenow = os.time()
if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados
".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 13540, time)
local quantity = math.floor((getPlayerStorageValue(cid, 13540) -
timenow)/(24 * 60 * 60))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem "..
quantity .." dias de VIP restantes.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de
"..price.." gp's para colocar vip.")
end
return TRUE
end
VALEU x)