local config = {
str = "You need a promotion to level higher!"
};
function onAdvance(cid, skill, oldLevel, newLevel)
if getPlayerLevel(cid) > 750 and getPlayerVocation(cid) < 9 then
doPlayerAddLevel(cid, -1)
DoPlayerSendTextMessage(cid, STATUS_CONSOLE_MESSAGE_BLUE, (config.str))
end
return TRUE
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel > 750 and getPlayerVocation(cid) < 9 then
doPlayerSendTextMessage(cid, STATUS_CONSOLE_MESSAGE_BLUE, "You need a higher promotion!")
end
return false
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel > 750 and getPlayerPromotionLevel(cid) < 2 then
return not doPlayerSendTextMessage(cid, STATUS_CONSOLE_MESSAGE_BLUE, "You need a higher promotion!")
end
return true
end
better but...might wanna take that "not" out.