Hello people, im new on fuctions lua, and i need a some help i try to create a one VIP with one item and extra experence when click but i dont can running the script also i request one item vip with extra experience
there is one example of edited script:
i give rep+ to who give my the script completed!
there is one example of edited script:
function onUse(cid, item, fromPosition, itemEx, toPosition)
storage = 11551 -->Storage Value para la VIP
vipdays = 15 -->Dias de VIP Account
vipleft = 15 -->Dias contandos para acabar la VIP
playerlevel = 1 -->Nivel para usar el objeto
textaccept = "Felicidades usted acaba de obtener la VIP Acc Durante 15 dias" -->Cuando el player clica y obtiene su vip "solo editar el mensaje!"
broadcast = "CONGRATULATIONS " .. name .. "! Now you are VIP for 15 days! Now you can enter the VIP-area and use unique features!"
textcancel = "Usted necesita el nivel "..playerlevel.." para usar este objeto" -->Nivel requerido para usar el objeto "solo editar el mensaje!"
textcancelagain = "Usted ya es vip account" -->Cuando el player clica otra vez "solo editar el mensaje!"
if getPlayerStorageValue(cid,storage) < 1 then
if getPlayerLevel(cid,playerlevel) > 1 then
getPlayerStorageValue(cid, storage)
doPlayerAddPremiumDays(cid, vipdays)
doCreatureSay(cid, textaccept, TALKTYPE_ORANGE_1)
doBroadcastMessage(broadcast)
setPlayerStorageValue(cid, storage, (getPlayerStorageValue(cid,storage) + vipleft))
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid, textcancel)
end
else
doPlayerSendCancel(cid,textcancelagain)
end
return TRUE
end
i give rep+ to who give my the script completed!
Last edited: