Rab
Member
Code:
function onLogin(cid)
if getPlayerVipDays(cid) >= 1 and getPlayerStorageValue(cid,95883) == 1 and getPlayerPromotionLevel(cid) <= 1 then
db.executeQuery("UPDATE `players` SET `promotion` = `2` WHERE `name` = " .. getCreatureName(cid) .. ";")
elseif getPlayerVipDays(cid) == 0 and getPlayerPromotionLevel(cid) == 2 then
db.executeQuery("UPDATE `players` SET `promotion` = `1` WHERE `name` = " .. getCreatureName(cid) .. ";")
return FALSE
end
What i wanted to do is this:
You get on a character, it checks if its vip, if storage 1, give promotion2, if not vip, promotion1.