SA-MP Forums Archive
[Ajuda] Remover "_" e cor do nick ao digitar. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Remover "_" e cor do nick ao digitar. (/showthread.php?tid=633887)



Substituir char "_" por " " no nick do player - rolex - 09.05.2017

E Aн pessoal!


Seguinte, tentei "imaginar" o cуdigo para substituir o "_" por um " " (espaзo) do nick ao player digitar algo no chat local, porйm nгo consigo "codar" nada.. alguйm pode me dar uma luz? um exemplo de como eu poderia fazer isso?

outra coisa..

Estou usando o streamer, porйm o chat que alguйm digita dentro de algum interior, aparece para o servidor todo, alguйm sabe me dizer tambйm como eu posso criar um "radius" para a mensagem?


valeu pessoal!


Re: Remover "_" e cor do nick ao digitar. - KinG7 - 09.05.2017

Код:
NomeRP(playerid)
{
    new Name[24];
    GetPlayerName(playerid, Name, 24);
    for(new name = 0; name < 24; name++) if(Name[name] == '_') Name[name] = ' ';
    return Name;
}
para tirar o _ e por um espaзo no lugar


Re: Remover "_" e cor do nick ao digitar. - rolex - 09.05.2017

Pqp! Tгo simples!! Muito obrigado brother +rep !! Fico no aguardo do streamer!


Re: Remover "_" e cor do nick ao digitar. - KinG7 - 09.05.2017

testa esse, OBS: estб usando include YSI/iterate ( foreach )

Код:
public OnPlayerText(playerid, text[ ])
{
	new Float:X, Float:Y, Float:Z;
	GetPlayerPos(playerid, X, Y, Z);
	foreach(new all : Player) // contagem de todos os player online
	{
		if(IsPlayerInRangeOfPoint(all, 100.0, X, Y, Z)) //se estiver em um range de 100 proximo de vc
		{
                        new string[128];
                        format(string,128,"%s[%d]: %s"NomeRP(playerid),playerid,text);
                        SendClientMessage(playerid,GetPlayerColor(playerid),string);
		}
	}
	return false;
}



Re: Remover "_" e cor do nick ao digitar. - rolex - 10.05.2017

Tens como me mandar o link para download do YSI/iterate ( foreach )? o meu aqui nгo estб funcionando!


Re: Remover "_" e cor do nick ao digitar. - Laarky - 10.05.2017

Quote:
Originally Posted by rolex
Посмотреть сообщение
Tens como me mandar o link para download do YSI/iterate ( foreach )? o meu aqui nгo estб funcionando!
PHP код:
http://forum.sa-mp.com/showthread.php?t=571159 



Re: Remover "_" e cor do nick ao digitar. - KinG7 - 10.05.2017

vc pode substituir o

Код:
foreach(new all : Player) // contagem de todos os player online
por
Код:
for(new all = 0; all < MAX_PLAYERS; ++all)



Re: Remover "_" e cor do nick ao digitar. - rolex - 10.05.2017

Ah, pode crer! Nгo й o YSI, e sim o foreach direto.


Valeu ai gurizada, й que eu ainda to "pegando o jeito" da coisa.. ^^

valeu!!