Postado Maio 30, 2015 10 anos Autor com esses scripts aparece na distro que os players logam e deslogam, e no client fica tentando logar e não acontece nada
Postado Maio 30, 2015 10 anos local vocations = {297, 298, 299} --Vocações. function sendEffect(cid) if isPlayer(cid) and isInArray(vocations, getPlayerVocation(cid)) then doSendMagicEffect(getThingPos(cid), 180) addEvent(sendEffect, 3 * 1000, cid) end end function onLogin(cid) sendEffect(cid) return true end não respondo pms solicitando suporte em programação/scripting
Postado Maio 30, 2015 10 anos com esses scripts aparece na distro que os players logam e deslogam, e no client fica tentando logar e não acontece nada Foi um erro bobo, esse aqui deve funcionar: local voc = { [297] = 180, [298] = 180, [299] = 180, } function sendEffect(cid) if isPlayer(cid) and voc[getPlayerVocation(cid)] then doSendMagicEffect(getThingPos(cid), voc[getPlayerVocation(cid)]) addEvent(sendEffect, 3 * 1000, cid) end end function onLogin(cid) return sendEffect(cid) end [id da vocação] = efeito que ela vai soltar, _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Maio 30, 2015 10 anos Foi um erro bobo, esse aqui deve funcionar: local voc = { [297] = 180, [298] = 180, [299] = 180,}function sendEffect(cid) if isPlayer(cid) and voc[getPlayerVocation(cid)] then doSendMagicEffect(getThingPos(cid), voc[getPlayerVocation(cid)]) addEvent(sendEffect, 3 * 1000, cid) endendfunction onLogin(cid) return sendEffect(cid)end [id da vocação] = efeito que ela vai soltar, talvez seja porque onLogin() está retornando uma função que não possui um return, então onLogin() retorna o sendEffect e false. coloca um return true em sendEffect ou no próprio onLogin() sendEffect() return true Ou return sendEffect(), true Editado Maio 30, 2015 10 anos por HallsSantos (veja o histórico de edições)
Postado Maio 30, 2015 10 anos talvez seja p talvez seja porque onLogin() está retornando uma função que não possui um return, então onLogin() retorna o sendEffect e false. coloca um return true em sendEffect ou no próprio onLogin() sendEffect() return true Ou return sendEffect(), true Realmente pode ser isso, então, aqui está: local voc = { [297] = 180, [298] = 180, [299] = 180, } function sendEffect(cid) if isPlayer(cid) and voc[getPlayerVocation(cid)] then doSendMagicEffect(getThingPos(cid), voc[getPlayerVocation(cid)]) addEvent(sendEffect, 3 * 1000, cid) end return true end function onLogin(cid) return sendEffect(cid) end _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
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.