Plugin zmiana koloru czatu
Skromny
30.06.2010
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ą.
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ą.
R3X
30.06.2010
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
Skromny
01.07.2010
Dzięki bardzo, działa:)
Zamieszczam już gotowy plik jeżeli ktoś by potrzebował.
Zamieszczam już gotowy plik jeżeli ktoś by potrzebował.