Ir para conteúdo
  • Cadastre-se

(Resolvido)Limitar mensagem no script


Ir para solução Resolvido por Albeck,

Posts Recomendados

Alguém pode quebrar o galho e limitar que o script não funcione no account manager?

 

function onLogin(cid)
	local bless = {" First Bless,", " Second Bless,", " Third Bless,", " Fourth Bless,", " Fifth Bless."}
	local check = "Received blessings:"
	for i = 1, #bless do
		check = getPlayerBlessing(cid, i) and check .. bless[i] or check
	end

	if check:len() > 20 then
		doPlayerSendTextMessage(cid, 20, check)
	else
		doPlayerSendTextMessage(cid, 20, "No blessings received.")
	end

	return true
end

 

Link para o post
Compartilhar em outros sites
  • Solução

@JcA

Testa ai e manda a resposta.

function onLogin(cid)
local bless = {" First Bless,", " Second Bless,", " Third Bless,", " Fourth Bless,", " Fifth Bless."}
local check = "Received blessings:"
if (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then
	return true
end
for i = 1, #bless do
	check = getPlayerBlessing(cid, i) and check .. bless[i] or check
end
if check:len() > 20 then
	doPlayerSendTextMessage(cid, 20, check)
	else
	doPlayerSendTextMessage(cid, 20, "No blessings received.")
	end
return true
end

 

Editado por Liipe Silva (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  Em 07/04/2017 em 19:06, Liipe Silva disse:

@JcA

Testa ai e manda a resposta.

function onLogin(cid)
local bless = {" First Bless,", " Second Bless,", " Third Bless,", " Fourth Bless,", " Fifth Bless."}
local check = "Received blessings:"
if (string.find(tostring(getCreatureName(cid)),"Account Manager")) then
	return true
end
	for i = 1, #bless do
		check = getPlayerBlessing(cid, i) and check .. bless[i] or check
	end
	if check:len() > 20 then
		doPlayerSendTextMessage(cid, 20, check)
		else
		doPlayerSendTextMessage(cid, 20, "No blessings received.")
		end
	return true
end

 

Mostrar mais  

 

Funcionou sim, esqueci de citar, você consegue eliminar player da staff também? group id 3, 4 e 5, 6

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96836
    Tópicos
    519581
    Posts
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo