[Ajuda] Como muda - 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] Como muda (
/showthread.php?tid=655935)
Como muda -
elTioFrame - 03.07.2018
como muda quando o player fala ? tipo o normal so server samp й o (nome do player): (e oq ele falou) , mas como posso mudar isso?
Re: Como muda -
Vithinn - 03.07.2018
Utilizando a public OnPlayerText vocк pode alterar isto.
Encontrei um tutorial um tanto quanto antigo e em inglкs, mas poderб te ajudar em algo:
https://sampforum.blast.hk/showthread.php?tid=335123
e a pбgina na wiki da prуpria public:
https://sampwiki.blast.hk/wiki/OnPlayerText
Re: Como muda -
elTioFrame - 03.07.2018
eu fiz exatamente oq ta lб no wiki mas tem um porйm se eu usar esse metedo vai utilizar SendClientMessageToAll ai n vai ter o limite de distantacia pra ver essa mensagem pq eu usei a funзгo LimitGlobalChatRadius(200.0); pra simular um chat local...
Re: Como muda -
Ermanhaut - 03.07.2018
SendMessageToAllInRange
Re: Como muda -
Vithinn - 03.07.2018
Ontem eu acabei dormindo, devem haver outras formas bem mais eficazes, porйm, tente utilizar:
PHP код:
public OnPlayerText(playerid, text[])
{
new playerName[MAX_PLAYER_NAME],
Float:posX,
Float:posY,
Float:posZ,
message[128]
;
GetPlayerName(playerid, playerName, sizeof(playerName));
GetPlayerPos(playerid, posX, posY, posZ);
format(message, sizeof(message), "%s [%d] diz: %s", playerName, playerid, text);
for(new i; i <= GetPlayerPoolSize(); i++)
{
if(IsPlayerInRangeOfPoint(i, 200.0, posX, posY, posZ))
{
SendClientMessage(i, -1, message);
}
}
return 0;
}