----------------------------------------------------------------------
-- A script made by Clary [COLOR="Red"]80[/COLOR]% by a request from jpkulik
---------------------------- Start Config ----------------------------
local COUNT = 3 -- How many items you get.
local ITEMID = 2160 -- Item sold id.
local PDAYS = 1 -- The premium days lost on use.
----------------------------- End Config -----------------------------
function onUse(cid, item, fromPos, item2, toPos)
if item.actionid == 29002 and item.itemid == 1945 [COLOR="Red"]then[/COLOR]
[COLOR="Red"]if[/COLOR] getPlayerPremiumDays(cid) >= PDAYS then
doPlayerAddItem(cid, ITEMID, COUNT)
doPlayerRemovePremiumDays(cid, PDAYS)
doPlayerSendTextMessage(cid, 22, "You have buy 30k for 3 premium account days.")
[COLOR="Red"]doSendMagicEffect(getPlayerPosition(cid), [COLOR="Blue"]55[/COLOR])[/COLOR]
doTransformItem(item.uid,1946)
[COLOR="Red"]else
doPlayerSendTextMessage(cid, 22, "You dont have enough premium days left.")
end[/COLOR]
else
doTransformItem(item.uid, 1945)
end
end
----------------------------------------------------------------------
-- A script made by Clary 100%
---------------------------- Start Config ----------------------------
local COUNT = 3 -- How many items you get.
local ITEMID = 2160 -- Item sold id.
local PDAYS = 1 -- The premium days lost on use.
----------------------------- End Config -----------------------------
function onUse(cid, item, fromPos, item2, toPos)
if item.actionid == 29002 and item.itemid == 1945 and getPlayerPremiumDays(cid) >= PDAYS then
doPlayerAddItem(cid, ITEMID, COUNT)
doPlayerRemovePremiumDays(cid, PDAYS)
doSendMagicEffect(getPlayerPosition(cid), 55) doPlayerSendTextMessage(cid, 22, "You have buy 30k for 3 premium account days.")
doTransformItem(item.uid,1946)
else
doPlayerSendTextMessage(cid, 22, "You dont have enough premium days left.")
doSendMagicEffect(getPlayerPosition(cid),POFF)
end
else
doTransformItem(item.uid, 1945)
end
end
else
doPlayerSendTextMessage(cid, 22, "You dont have enough premium days left.")
doSendMagicEffect(getPlayerPosition(cid), 55)
as I said in the top of my post ur just making the scriptt longer.soul4soul said:the red is what i changed at the top i got rid of the 'and' in the if statement