Hello, i've a script that you buy promotion by a talkactions... the scripts works but.. when the server closes/open the player appears without promotion... why this happens? HELP ME
Here is my script
Help!
SORRY MY BAD ENGLISH!
Here is my script
Code:
function onSay(cid, param)
if getPlayerLevel(cid) >= 20 then
if getPlayerMoney(cid) >= 20000 then
if(getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4) == TRUE then
doPlayerRemoveMoney(cid, 20000)
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are now promoted.")
else
doPlayerSendTextMessage(cid, 22, "You are already promoted.")
end
else
doPlayerSendTextMessage(cid, 22, "You need 20,000 gold pieces to buy promotion.")
end
else
doPlayerSendTextMessage(cid, 22, "You need level 20 or more to buy promotion.")
end
end
Help!
SORRY MY BAD ENGLISH!