policial = {
cost = 200000,
level = 20,
text = "Promoted to policial",
}
policialdeelite = {
cost = 200000,
level = 20,
text = "Promoted to policial de elite",
}
if getPlayerVocation(cid) == 1 then
voc = policial
doPlayerAddOutfit(cid,194,1)
elseif getPlayerVocation(cid) == 2 then
voc = policialdeelite
doPlayerAddOutfit(cid,195,1)
voc = nil
end
if voc ~= nil then
if getPlayerLevel(cid) >= voc.level then
if doPlayerRemoveMoney(cid,voc.cost) == TRUE then
setPlayerPromotionLevel(cid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
doSendAnimatedText(getCreaturePosition(cid),voc.text,49)
else
doPlayerSendTextMessage(cid,18,"You need "..voc.cost.." to promote.")
end
else
doPlayerSendTextMessage(cid,18,"You need level "..voc.level.." to promote.")
end
else
doPlayerSendTextMessage(cid,18,"You already promoted.")
end
return TRUE