Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Anti double say chat
- 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 )
- Idealizado e criado por Dwayne Phoenix ( Não testado e sem hook nas callbacks )
- Nota: apenas criei a variavel de armazenamento do ultimo jogador que digitou no chat dentro da array para deixar o codigo mais organizado.
- */
- #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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement