Utilize esse script.
function pegarNome(name)
return string.sub(name, 7)
end
function onLogin(cid)
local name = getCreatureName(cid)
local nome = getPlayerGUID(cid)
if isVip(cid) 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,"You go kicked in 10 seconds for update you name.")
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,"You go kicked in 10 seconds for update you name.")
addEvent(doRemoveCreature,10000,cid)
end
end
return true
end
Bota a tag no xml
<event type="login" name="vipname" event="script" value="vipname.lua"/>