Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[ANY] Chat Revamp BETA ( Simple Chat Processor )


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
So this plugin like the other chat processors posted in Allied Modders allows you to manipulate chat messages with a nice built-in feature to hide name changes by admins from players, but still show to admins.

I didn't have sufficient time and methods to test it but it's running on my current server so it shouldn't be bugged. For now I declare it as beta.

The forward:

Code:

public Action:CR_OnChatSent(&Sender, &bChat, String:Tag[], String:Name[], String:Message[], &Something, &OtherSomething, players[], &playersNum)

@param Sender                        The client sending the message.
@param bChat                        Unsure, I think whether or not the message is printed in console not only in chat.
@param String:Tag[]                Message display tags ( Changing will not affect who will see it, but it acts as a format of message, Example: #L4D_Chat_All, #L4D_Chat_Infected )

@param String:Name[]                Name of the sender.
@param String:Message[]        The message the client sends.
@param Something                No clue.
@param OtherSomething        No clue.
@param players[]                        List of players who will receive the message.
@param playersNum                Size of the array players[]

@Return                                Even to allow chat to send, Odd to disallow chat to send. Plugin_Stop will act as Plugin_Continue due to that.
       
@Note                                Tag in L4D2 and probably all games will contain "Name" when the chat message is a name change.

@Note                                All parameters are copied back to the forward.

Here's a funny example on how to block normies from seeing messages.

Code:


public Action:CR_OnChatSent(&Sender, &bChat, String:Tag[], String:Name[], String:Message[], &Something, &OtherSomething, players[], &playersNum)
{
        new Reduce;
        for(new i=0;i < playersNum;i++)
        {
                new target = players;
               
                if(!IsClientInGame(target))
                        continue;
               
                else if(IsFakeClient(target))
                        continue;
                       
                else if(!IsNormie(target))
                        continue;
                       
                players = -1;
                Reduce++;
        }
       
        SortIntegers(players, playersNum, Sort_Descending);
        playersNum -= Reduce;

        return Plugin_Continue;
}

The post forward is exactly the same:

Code:

public Action:CR_OnChatSent_Post(Sender, bChat, String:Tag[], String:Name[], String:Message[], Something, OtherSomething, players[], playersNum)

Remember: I didn't fully test it so bugs may appear. Also, it was only tested in Left 4 Dead 2.

Attached Files
File Type: sp Get Plugin or Get Source (ChatRevamp.sp - 7.1 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...