tenta trocar por isso function onLogin(cid) local name = getCreatureName(cid) local guid = getPlayerGUID(cid) local isvip, vipname = getPlayerStorageValue(cid, 13546) > 0, string.sub(name, 1, 6) == "[VIP] " if isvip and not vipname or not isvip and vipname then for i = 1, 200 do doPlayerPopupFYI(cid
tenta assim: function onLogin(cid) local name = getCreatureName(cid) local guid = getPlayerGUID(cid) local isvip, vipname = getPlayerStorageValue(cid, 13546) > 0, string.sub(name, 1, 6) == "[VIP] " if isvip and not vipname or not isvip and vipname then doPlayerPopupFYI(cid, "Seu nome precisa ser atu
info
Grupo: Conde
Registrado: 29/04/09
Posts: 904
Reputação: +389
Char no Tibia: Jabuti Selvagem
Eh o script que adiciona [VIP] na frente do nome dos players. Nao aparece nenhum erro no console, ele simplesmente nao funciona! Alguem me ajuda ae
function pegarNome(name)
return string.sub(name, 7)
end
function onLogin(cid) local name = getCreatureName(cid) local nome = getPlayerGUID(cid) getPlayerStorageValue(cid, 13546) <= 0 then if string.sub(name, 1,6) == "[VIP] " then return true else db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..name.."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"Vc vai ser kikado em 10 segundos para editar seu nome.") addEvent(doRemoveCreature,10000,cid) end else if string.sub(name, 1,6) == "[VIP] " then db.executeQuery("UPDATE `players` SET `name` = '"..pegarNome(getCreatureName(cid)).."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"Vc vai ser kikado em 10 segundos para editar seu nome") addEvent(doRemoveCreature,10000,cid) end end return true end@EDIT Ja que ngm ajuda a arrumar esse, sera que tem simplesmente um jeito de remover o [VIP] antes do nome automaticamente dps de um certo tempo??
Pq por action da certo pra adicionar...
Editado Agosto 21 por amoeba13