Potrzebował bym żeby ktoś mógł mi napisać plugin który zmienia kolor wiadomości wysyłanej do admina przez say_team@.....
Czyli gracz pisze do admina że ziomek ma wh, i adminowi sie wyświetla np. na czerwono cała ta wiadomość, celem jest zwiększenie uwagi adminów na to co ludzie do nich piszą.
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
1
2 odpowiedzi w tym temacie
#2
Napisano 30.06.2010 22:54
adminchat.sma
dołącz ColorChat.inc
na górze dopisz
Potem znajdź funkcję
końcowy fragment jest istotny
i skompiluj lokalnie
dołącz ColorChat.inc
na górze dopisz
#include <ColorChat>
Potem znajdź funkcję
public cmdSayAdmin(id) { new said[2] read_argv(1, said, 1) if (said[0] != '@') return PLUGIN_CONTINUE new message[192], name[32], authid[32], userid new players[32], inum read_args(message, 191) remove_quotes(message) get_user_authid(id, authid, 31) get_user_name(id, name, 31) userid = get_user_userid(id) log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message[1]) log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message[1]) if (is_user_admin(id)) format(message, 191, "(%L) %s : %s", id, "ADMIN", name, message[1]) else format(message, 191, "(%L) %s : %s", id, "PLAYER", name, message[1]) get_players(players, inum) for (new i = 0; i < inum; ++i) { // dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag) client_print(players[i], print_chat, "%s", message) } client_print(id, print_chat, "%s", message) return PLUGIN_HANDLED }
końcowy fragment jest istotny
for (new i = 0; i < inum; ++i) { // dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag) client_print(players[i], print_chat, "%s", message) } client_print(id, print_chat, "%s", message)zamień na
for (new i = 0; i < inum; ++i) { // dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag) ColorChat(players[i], RED, "%s", message) } ColorChat(id, RED, "%s", message)
i skompiluj lokalnie
#3
Napisano 01.07.2010 00:09
Dzięki bardzo, działa:)
Zamieszczam już gotowy plik jeżeli ktoś by potrzebował.
Zamieszczam już gotowy plik jeżeli ktoś by potrzebował.
Załączone pliki
-
adminchat.amxx 16,57 KB
44 Ilość pobrań
-
adminchat.sma 11,25 KB
76 Ilość pobrań
adminchat.amxx