Seguinte, eu tenho o seguinte scrip para que quando algum player colocar VIP ele automaticamente receba a vocação VIP:
function onLogin(cid) if vip.hasVip(cid) == TRUE then if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then doPlayerSetVocation(cid,getPlayerVocation(cid)+4) end elseif vip.hasVip(cid) == FALSE then if(isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then doPlayerSetVocation(cid,getPlayerVocation(cid)-4) end end return TRUE end
O problema é que esse scrip não altera nada no banco de dados, assim quando olhamos no site o player ainda continua como Elite Knight etc... Na database um Elite Knight por exemplo possue vocação 4 e promotion 1. Eu precisaria mudar a vocação para 8 e o promotion continuar 1. Dessa forma apareceria no site a vocação VIP.
Resumindo, preciso de um scrip que seja algo assim:
function onLogin(cid) if vip.hasVip(cid) == TRUE then if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then DB.STORAGE +4 NO CAMPO VOCAÇÃO end elseif vip.hasVip(cid) == FALSE then if(isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then DB.STORAGE -4 NO CAMPO VOCAÇÃO end end return TRUE end
Alguém poderia me ajudar?