[FilterScript] Anti double say chat - 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)
+----- Forum: Lançamentos/Releases (
https://sampforum.blast.hk/forumdisplay.php?fid=56)
+----- Thread: [FilterScript] Anti double say chat (
/showthread.php?tid=409542)
Anti double say chat -
Dwayne-Pheonix - 21.01.2013
Filterscript simples, que tem a funзгo de impedir que o jogador envie mais de uma mensagem ao servidor ( como se fosse um double post )
pawn Код:
#include <a_samp>
main() { }
enum chat_info { name[25], lastname[25] };
new Chat[MAX_PLAYERS][chat_info];
public OnPlayerConnect(playerid) {
GetPlayerName(playerid, Chat[playerid][name], 25);
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
Chat[playerid][name] = EOS;
return 1;
}
public OnPlayerText(playerid, text[]) {
if(!strcmp(Chat[0][lastname], Chat[playerid][name], false)) return false;
format(Chat[0][lastname], 25, Chat[playerid][name]);
return 1;
}
Pastebin:
http://pastebin.com/2Zp3NCtw
Idealizado e criado por Dwayne Phoenix ( Nгo testado e sem hook nas callbacks )
Notas:
* Apenas criei a variavel de armazenamento do ultimo jogador que digitou no chat dentro da array para deixar o codigo mais organizado.
* Nгo deixei em cуdigos uteis pelo motivo de aqui poder ser discutido
Re: Anti double say chat -
ViniBorn - 21.01.2013
Pequeno hein
Re: Anti double say chat -
dPlaYer_ - 21.01.2013
What the fuck?
Re: Anti double say chat -
Schocc - 21.01.2013
Se for um Filterscript remova o
main() { }
Re : Anti double say chat -
[JD]BlackFire - 22.01.2013
cуdigo ъtil!
Re: Anti double say chat -
Maklister - 22.01.2013
Interessante amigo.
Re: Anti double say chat -
JapaN* - 22.01.2013
Area Errada, Poste
Aqui. <
Respuesta: Anti double say chat -
[NVC]iTrevaS - 22.01.2013
Bem ъtil, por isso cуdigo ъtil
Re: Anti double say chat -
HeyHoLetsGo - 22.01.2013
Nem curti, porque vai ser muito ruim falar 1 frase por vez cara, no SA-MP й bate papo cara, e nгo um tуpico onde prejudica falar mais de uma vez, o mбximo que poderнa ter nisso й um anti-flood...
Mas valeu o trabalho!
AW: Anti double say chat -
Blackazur - 22.01.2013
Bom Trabalho.