SERV. 0.3.1
I wonder that the function
setPlayerPromotionLevel (cid, 1)
Works to remove promotion
Example:
Promotion 2
need to be 1.
This works?
What function should I use?
code example:
I wonder that the function
setPlayerPromotionLevel (cid, 1)
Works to remove promotion
Example:
Promotion 2
need to be 1.
This works?
What function should I use?
code example:
PHP:
function onLogin(cid)
voc = getPlayerVocation(cid)
tempo = os.time()
promotime = getPlayerStorageValue(cid,10000)
if voc >= 10 and promotime <= tempo then
setPlayerPromotionLevel(cid, getPlayerPromotionLevel(cid) - 1)
setPlayerStorageValue(cid,10000,1)
doPlayerSetTown(cid, 1)
city = { x = 703, y = 600, z =7 }
doTeleportThing(cid, city)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voc ".. voc .."!!!")
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voc ".. voc .."!!!")
end
if voc < 10 then
setPlayerStorageValue(cid,10000,1)
end
return TRUE
end