magista
RL name " Amir reda "
it works and every thing is oki but when the character relog back to elite knight again can anyone help ?
Code:
function onSay(cid, words, param)
if(getPlayerItemCount(cid, 2158) > 0) then
if(getPlayerVocation(cid) == 8) == FALSE then
doPlayerSendCancel(cid, 'You\'re not a Elite Knight, therefore you can\'t become an Destroyer.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
else
doPlayerRemoveItem(cid,2158,1)
doPlayerSetVocation(cid,16)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Congratz, you\'re now a Destroyer !')
doSendMagicEffect(getPlayerPosition(cid), 12)
end
else
doPlayerSendCancel(cid, 'You don\'t have promotion gem.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return true
end