Ir para conteúdo

Featured Replies

  • Respostas 23
  • Visualizações 1.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Desculpe, falha minha. Remova todos os creature events look ou qualquer outro relacionado a isso. lookplayer.lua (data/creaturescripts/scripts): function onLook(cid, thing, position, lookDistance)

  • edit coloque isso na sua script na parte de cima function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents

  • Cria um arquivo chamado LookPlayer em Creaturescripts e poem: function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents,

Postado

não está funcionando nem quando dou look em min mesmo nem em outro player


Remova/desative esse script e faça o seguinte..

viporfree.lua (data/creaturescripts/scripts):
function onLook(cid, thing, position, lookDistance)
    if isPlayer(thing.uid) then
        if getPlayerPremiumDays(thing.uid) > 0 then
            doPlayerSetSpecialDescription(thing.uid,'[VIP]')
        else
            doPlayerSetSpecialDescription(thing.uid,'[FREE]')
        end
    end
    return true
end




Tag - creaturescripts.xml (data/creaturescripts):

<event type="look" name="VipOrFree" event="script" value="viporfree.lua"/>




Adicione o registro do creature event em login.lua (data/creaturescripts/scripts):

registerCreatureEvent(cid, "VipOrFree")

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

n da error mas nao acontece nada tem certeza que nao tem q registra nada com OnLogin ?

Callback de onLogin não registra creature event, e nesse caso só precisa registrar o do look mesmo.

Mantenha tudo como está (arquivo, tag, registro), só substitua o script anterior por este:

local stor = 39993

function onLook(cid, thing, position, lookDistance)
    if isPlayer(thing.uid) then
        if getPlayerStorageValue(thing.uid, stor) > 0 then
            doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][VIP]')
        else
            doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][FREE]')
        end
    end
    return true
end

function onLogin(cid)
    if isPremium(cid) and getPlayerStorageValue(cid, stor) < 1 then
        setPlayerStorageValue(cid, stor, 1)
    elseif not isPremium(cid) and getPlayerStorageValue(cid, stor) > 0 then
        setPlayerStorageValue(cid, stor, -1)
    end
    return true
end

Apenas adicione a tag do creature event login em creaturescripts.xml (data/creaturescripts):

<event type="login" name="VipOrFreeStor" event="script" value="viporfree.lua"/>

Editado por Suicide (veja o histórico de edições)

The corrupt fear us.

The honest support us.

The heroic join us.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo