Postado Novembro 25, 2014 10 anos ja está ok depois que arrumar seu post eu testo novamente. Certo, editei. The corrupt fear us. The honest support us. The heroic join us.
Postado Novembro 25, 2014 10 anos Autor Editei meu post acima não está funcionando nem quando dou look em min mesmo nem em outro player :9
Postado Novembro 25, 2014 10 anos 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 Novembro 25, 2014 10 anos Autor É amigão mesma coisa n da error mas nao acontece nada tem certeza que nao tem q registra nada com OnLogin ? e.e verifica ai direitinho pra min.
Postado Novembro 25, 2014 10 anos 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 Novembro 26, 2014 10 anos 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.