Hello, i create one script to training my skills and this script after a say !vipteste , connection lost with the server...i dont know why..
Lua:
function onSay(cid, words, param, channel)
level = getPlayerLevel(cid)
sto = 399710
lvmin = 100
vip = 1
local Info = db.getResult("SELECT `vipteste` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
if(Info:getID() ~= -1) then
while(true) do
if level >= lvmin then
doPlayerAddPremiumDays(cid, 1)
db.executeQuery("UPDATE `otserv`.`accounts` SET `vipteste` = '1' WHERE `accounts`.`id` =" .. getPlayerAccountId(cid) .. ";")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ganhou 1 dia de VIP para TEST, Aproveite!!.")
setPlayerStorageValue(cid,sto,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
else
doPlayerSendCancel(cid, "Voce precisa de level ".. lvmin .." para testar a VIP.")
end
end
end
end