Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

С админа на випа переделать

, Admin_online
Статус пользователя Kamikadze312
сообщение 9.3.2012, 18:33
Сообщение #1
Стаж: 14 лет

Сообщений: 37
Благодарностей: 3
Полезность: 63

Хотельсь бы переделать плагин , но сам незнаю как. Один человек сказал что этот плагин сделан только для админов , так ли это ?? или возможно переделать ? Функция плагина в том что при заходе админа на сервер в чате и выше чата появляется надпись что зашел админ .
#include <amxmodx>

// Registering plug-in
#define PLUGIN "Admin OnLine (AOL)"
#define VERSION "1.2" // [21.05.2007]
#define AUTHOR "[CkA] jas0n"

/*


Описание:
Когда администор сервера присоединяется к игре - у всех игроков будет написано на экране что админ online

Настройка плагина:
Открываем исходник, смотрим настройки.

Чтобы убирать эти возможности - комментируем их //
Т.е. ставим перед #define значки //

Само сообщение, которое будет видно в чате (^x01 - желтый, ^x03 - цвет команды, ^x04 - зеленый)
#define A_CONNECT "^x04 ADMIN [^x03%s^x04] is OnLine!"

// Показывать сообщения на экране что админ присоединился
#define ANN2HUD
// Показывать сообщения в чате когда админ присоединился
#define ANN2CHAT
// проигрывать песенку когда админ присоединился
#define PLAYSND

Название песенки (по умолчанию - в папке valve/sound/vox)
new sound[] = "vox\administration.wav"
*/

// Constants section. Comment '//' defines to disable feature
#define ANN2HUD // show hud message when admin connected
#define ANN2CHAT // show hud message when best player connected (need ps_stats base)
#define PLAYSND // play sound then admin connected

//================================================================

#if defined ANN2CHAT

#define A_CONNECT "^x04 Админ [^x03%s^x04] В игре!!"

enum ChatColor
{
CHATCOLOR_YELLOW = 1, // Yellow
CHATCOLOR_GREEN, // Green Color
CHATCOLOR_TEAM_COLOR, // Red, grey, blue
CHATCOLOR_GREY, // grey
CHATCOLOR_RED, // Red
CHATCOLOR_BLUE, // Blue
}

new g_TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}

new g_msgSayText
new g_msgTeamInfo
#endif

#if defined PLAYSND
new sound[] = "adm_vip_con\tls.wav"
#endif

public client_putinserver(id) {
new name[32], sflags[32]

get_user_name(id,name,31)
get_flags(get_user_flags(id),sflags,31)

#if defined ANN2HUD
new text[128]

format(text,127,"Админ %s В игре!!", name)
if (contain(sflags,"u")!=-1)
{
set_hudmessage(255, 0, 32, 0.05, 0.60, 1, 5.0, 5.0, 0.3, 0.3, 3)
show_hudmessage(0,"%s",text)
}
else if (contain(sflags,"cde")!=-1)
{
set_hudmessage(0, 100, 255, 0.05, 0.60, 1, 5.0, 5.0, 0.7, 0.7, 3)
show_hudmessage(0,"%s",text)
}
#endif

#if defined ANN2CHAT
if (contain(sflags,"u")!=-1)
{
colorChat(0, CHATCOLOR_RED, A_CONNECT, name)
}
else if (contain(sflags,"cde")!=-1)
{
colorChat(0, CHATCOLOR_BLUE, A_CONNECT, name)
}
#endif

#if defined PLAYSND
if (contain(sflags,"l")!=-1 || contain(sflags,"cde")!=-1)
{
playsound ()
}
#endif

return PLUGIN_CONTINUE
}

#if defined ANN2CHAT
//
// за что им огромное спасиба!
colorChat(id, ChatColor:color, const msg[], {Float,Sql,Result,_}:...) {
new team, index, MSG_Type
new bool:teamChanged = false
new message[192]

switch(color)
{
case CHATCOLOR_YELLOW: // Yellow
{
message[0] = 0x01;
}
case CHATCOLOR_GREEN: // Green
{
message[0] = 0x04;
}
default: // Grey, Red, Blue
{
message[0] = 0x03;
}
}

vformat(message[1], 190, msg, 4);

if (id == 0)
{
index = findAnyPlayer();
MSG_Type = MSG_ALL;
}
else
{
index = id;
MSG_Type = MSG_ONE;
}

if (index != 0)
{
team = get_user_team(index);
if (color == CHATCOLOR_RED && team != 1)
{
messageTeamInfo(index, MSG_Type, g_TeamName[1])
teamChanged = true
}
else if (color == CHATCOLOR_BLUE && team != 2)
{
messageTeamInfo(index, MSG_Type, g_TeamName[2])
teamChanged = true
}
else if (color == CHATCOLOR_GREY && team != 0)
{
messageTeamInfo(index, MSG_Type, g_TeamName[0])
teamChanged = true
}
messageSayText(index, MSG_Type, message);
if (teamChanged)
{
messageTeamInfo(index, MSG_Type, g_TeamName[team]);
}
}
}

messageSayText(id, type, message[])
{
message_begin(type, g_msgSayText, _, id)
write_byte(id)
write_string(message)
message_end()
}

messageTeamInfo(id, type, team[])
{
message_begin(type, g_msgTeamInfo, _, id)
write_byte(id)
write_string(team)
message_end()
}

findAnyPlayer()
{
new players[32], inum

get_players(players, inum)

for (new a = 0; a < inum; ++a)
{
if(is_user_connected(players[a]))
return players[a];
}

return 0
}
#endif

#if defined PLAYSND
public plugin_precache()
{
precache_sound(sound)

return PLUGIN_CONTINUE
}

playsound()
{
client_cmd(0 , "stopsound")
client_cmd(0, "spk ^"%s^"",sound)
}
#endif

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

#if defined ANN2CHAT
g_msgSayText = get_user_msgid("SayText")
g_msgTeamInfo = get_user_msgid("TeamInfo")
#endif

return PLUGIN_CONTINUE
}

/*


Описание:
Когда администор сервера присоединяется к игре - у всех игроков будет написано на экране что админ online

Настройка плагина:
Открываем исходник, смотрим настройки.

Чтобы убирать эти возможности - комментируем их //
Т.е. ставим перед #define значки //

Само сообщение, которое будет видно в чате (^x01 - желтый, ^x03 - цвет команды, ^x04 - зеленый)
#define A_CONNECT "^x04 ADMIN ^x01[^x03%s^x01] ^x04is OnLine!"

// Показывать сообщения на экране что админ присоединился
#define ANN2HUD
// Показывать сообщения в чате когда админ присоединился
#define ANN2CHAT
// проигрывать песенку когда админ присоединился
#define PLAYSND

Название песенки (по умолчанию - в папке valve/sound/vox)
new sound[] = "vox\administration.wav"
*/
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя Connect1507
сообщение 9.3.2012, 18:50
Сообщение #2
Стаж: 14 лет

Сообщений: 172
Благодарностей: 2
Полезность: 22

а какие фалаги ты используешь для випа?

Попробуй это такие же флаги как и у админов (u,s,c,d,e) или я могу ошибаться......


скрытый текст
#include <amxmodx>

// Registering plug-in
#define PLUGIN "Vip OnLine (AOL)"
#define VERSION "1.2" // [21.05.2007]
#define AUTHOR "Fix"

#define A_CONNECT "^x04 VIP [^x03%s^x04] is OnLine!"
#define ANN2HUD
#define ANN2CHAT
#define PLAYSND

new sound[] = "vox\administration.wav"

// Constants section. Comment '//' defines to disable feature
#define ANN2HUD // show hud message when admin connected
#define ANN2CHAT // show hud message when best player connected (need ps_stats base)
#define PLAYSND // play sound then admin connected

//================================================================

#if defined ANN2CHAT

#define A_CONNECT "^x04 Вип [^x03%s^x04] В игре!!"

enum ChatColor
{
CHATCOLOR_YELLOW = 1, // Yellow
CHATCOLOR_GREEN, // Green Color
CHATCOLOR_TEAM_COLOR, // Red, grey, blue
CHATCOLOR_GREY, // grey
CHATCOLOR_RED, // Red
CHATCOLOR_BLUE, // Blue
}

new g_TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}

new g_msgSayText
new g_msgTeamInfo
#endif

#if defined PLAYSND
new sound[] = "adm_vip_con\tls.wav"
#endif

public client_putinserver(id) {
new name[32], sflags[32]

get_user_name(id,name,31)
get_flags(get_user_flags(id),sflags,31)

#if defined ANN2HUD
new text[128]

format(text,127,"Вип %s В игре!!", name)
if (contain(sflags,"u")!=-1)
{
set_hudmessage(255, 0, 32, 0.05, 0.60, 1, 5.0, 5.0, 0.3, 0.3, 3)
show_hudmessage(0,"%s",text)
}
else if (contain(sflags,"cde")!=-1)
{
set_hudmessage(0, 100, 255, 0.05, 0.60, 1, 5.0, 5.0, 0.7, 0.7, 3)
show_hudmessage(0,"%s",text)
}
#endif

#if defined ANN2CHAT
if (contain(sflags,"u")!=-1)
{
colorChat(0, CHATCOLOR_RED, A_CONNECT, name)
}
else if (contain(sflags,"cde")!=-1)
{
colorChat(0, CHATCOLOR_BLUE, A_CONNECT, name)
}
#endif

#if defined PLAYSND
if (contain(sflags,"l")!=-1 || contain(sflags,"cde")!=-1)
{
playsound ()
}
#endif

return PLUGIN_CONTINUE
}

#if defined ANN2CHAT
//
// за что им огромное спасиба!
colorChat(id, ChatColor:color, const msg[], {Float,Sql,Result,_}:...) {
new team, index, MSG_Type
new bool:teamChanged = false
new message[192]

switch(color)
{
case CHATCOLOR_YELLOW: // Yellow
{
message[0] = 0x01;
}
case CHATCOLOR_GREEN: // Green
{
message[0] = 0x04;
}
default: // Grey, Red, Blue
{
message[0] = 0x03;
}
}

vformat(message[1], 190, msg, 4);

if (id == 0)
{
index = findAnyPlayer();
MSG_Type = MSG_ALL;
}
else
{
index = id;
MSG_Type = MSG_ONE;
}

if (index != 0)
{
team = get_user_team(index);
if (color == CHATCOLOR_RED && team != 1)
{
messageTeamInfo(index, MSG_Type, g_TeamName[1])
teamChanged = true
}
else if (color == CHATCOLOR_BLUE && team != 2)
{
messageTeamInfo(index, MSG_Type, g_TeamName[2])
teamChanged = true
}
else if (color == CHATCOLOR_GREY && team != 0)
{
messageTeamInfo(index, MSG_Type, g_TeamName[0])
teamChanged = true
}
messageSayText(index, MSG_Type, message);
if (teamChanged)
{
messageTeamInfo(index, MSG_Type, g_TeamName[team]);
}
}
}

messageSayText(id, type, message[])
{
message_begin(type, g_msgSayText, _, id)
write_byte(id)
write_string(message)
message_end()
}

messageTeamInfo(id, type, team[])
{
message_begin(type, g_msgTeamInfo, _, id)
write_byte(id)
write_string(team)
message_end()
}

findAnyPlayer()
{
new players[32], inum

get_players(players, inum)

for (new a = 0; a < inum; ++a)
{
if(is_user_connected(players[a]))
return players[a];
}

return 0
}
#endif

#if defined PLAYSND
public plugin_precache()
{
precache_sound(sound)

return PLUGIN_CONTINUE
}

playsound()
{
client_cmd(0 , "stopsound")
client_cmd(0, "spk ^"%s^"",sound)
}
#endif

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

#if defined ANN2CHAT
g_msgSayText = get_user_msgid("SayText")
g_msgTeamInfo = get_user_msgid("TeamInfo")
#endif

return PLUGIN_CONTINUE
}

/*


Описание:
Когда администор сервера присоединяется к игре - у всех игроков будет написано на экране что админ online

Настройка плагина:
Открываем исходник, смотрим настройки.

Чтобы убирать эти возможности - комментируем их //
Т.е. ставим перед #define значки //

Само сообщение, которое будет видно в чате (^x01 - желтый, ^x03 - цвет команды, ^x04 - зеленый)
#define A_CONNECT "^x04 ADMIN ^x01[^x03%s^x01] ^x04is OnLine!"

// Показывать сообщения на экране что админ присоединился
#define ANN2HUD
// Показывать сообщения в чате когда админ присоединился
#define ANN2CHAT
// проигрывать песенку когда админ присоединился
#define PLAYSND

Название песенки (по умолчанию - в папке valve/sound/vox)
new sound[] = "vox\administration.wav"
*/


Отредактировал: Connect1507, - 9.3.2012, 18:50
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Kamikadze312
сообщение 9.3.2012, 18:50
Сообщение #3
Стаж: 14 лет

Сообщений: 37
Благодарностей: 3
Полезность: 63

"bt" "a"
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Connect1507
сообщение 9.3.2012, 19:13
Сообщение #4
Стаж: 14 лет

Сообщений: 172
Благодарностей: 2
Полезность: 22

Поменял флаги:

скрытый текст
#include <amxmodx>

// Registering plug-in
#define PLUGIN "Vip OnLine (AOL)"
#define VERSION "1.0" // [21.05.2007]
#define AUTHOR "Connect"

/*


Описание:
Когда администор сервера присоединяется к игре - у всех игроков будет написано на экране что админ online

Настройка плагина:
Открываем исходник, смотрим настройки.

Чтобы убирать эти возможности - комментируем их //
Т.е. ставим перед #define значки //

Само сообщение, которое будет видно в чате (^x01 - желтый, ^x03 - цвет команды, ^x04 - зеленый)
#define A_CONNECT "^x04 VIP [^x03%s^x04] is OnLine!"

// Показывать сообщения на экране что админ присоединился
#define ANN2HUD
// Показывать сообщения в чате когда админ присоединился
#define ANN2CHAT
// проигрывать песенку когда админ присоединился
#define PLAYSND

Название песенки (по умолчанию - в папке valve/sound/vox)
new sound[] = "vox\administration.wav"
*/

// Constants section. Comment '//' defines to disable feature
#define ANN2HUD // show hud message when admin connected
#define ANN2CHAT // show hud message when best player connected (need ps_stats base)
#define PLAYSND // play sound then admin connected

//================================================================

#if defined ANN2CHAT

#define A_CONNECT "^x04 Вип [^x03%s^x04] В игре!!"

enum ChatColor
{
CHATCOLOR_YELLOW = 1, // Yellow
CHATCOLOR_GREEN, // Green Color
CHATCOLOR_TEAM_COLOR, // Red, grey, blue
CHATCOLOR_GREY, // grey
CHATCOLOR_RED, // Red
CHATCOLOR_BLUE, // Blue
}

new g_TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}

new g_msgSayText
new g_msgTeamInfo
#endif

#if defined PLAYSND
new sound[] = "adm_vip_con\tls.wav"
#endif

public client_putinserver(id) {
new name[32], sflags[32]

get_user_name(id,name,31)
get_flags(get_user_flags(id),sflags,31)

#if defined ANN2HUD
new text[128]

format(text,127,"Вип %s В игре!!", name)
if (contain(sflags,"b")!=-1)
{
set_hudmessage(255, 0, 32, 0.05, 0.60, 1, 5.0, 5.0, 0.3, 0.3, 3)
show_hudmessage(0,"%s",text)
}
else if (contain(sflags,"cde")!=-1)
{
set_hudmessage(0, 100, 255, 0.05, 0.60, 1, 5.0, 5.0, 0.7, 0.7, 3)
show_hudmessage(0,"%s",text)
}
#endif

#if defined ANN2CHAT
if (contain(sflags,"b")!=-1)
{
colorChat(0, CHATCOLOR_RED, A_CONNECT, name)
}
else if (contain(sflags,"at")!=-1)
{
colorChat(0, CHATCOLOR_BLUE, A_CONNECT, name)
}
#endif

#if defined PLAYSND
if (contain(sflags,"l")!=-1 || contain(sflags,"at")!=-1)
{
playsound ()
}
#endif

return PLUGIN_CONTINUE
}

#if defined ANN2CHAT
//
// за что им огромное спасиба!
colorChat(id, ChatColor:color, const msg[], {Float,Sql,Result,_}:...) {
new team, index, MSG_Type
new bool:teamChanged = false
new message[192]

switch(color)
{
case CHATCOLOR_YELLOW: // Yellow
{
message[0] = 0x01;
}
case CHATCOLOR_GREEN: // Green
{
message[0] = 0x04;
}
default: // Grey, Red, Blue
{
message[0] = 0x03;
}
}

vformat(message[1], 190, msg, 4);

if (id == 0)
{
index = findAnyPlayer();
MSG_Type = MSG_ALL;
}
else
{
index = id;
MSG_Type = MSG_ONE;
}

if (index != 0)
{
team = get_user_team(index);
if (color == CHATCOLOR_RED && team != 1)
{
messageTeamInfo(index, MSG_Type, g_TeamName[1])
teamChanged = true
}
else if (color == CHATCOLOR_BLUE && team != 2)
{
messageTeamInfo(index, MSG_Type, g_TeamName[2])
teamChanged = true
}
else if (color == CHATCOLOR_GREY && team != 0)
{
messageTeamInfo(index, MSG_Type, g_TeamName[0])
teamChanged = true
}
messageSayText(index, MSG_Type, message);
if (teamChanged)
{
messageTeamInfo(index, MSG_Type, g_TeamName[team]);
}
}
}

messageSayText(id, type, message[])
{
message_begin(type, g_msgSayText, _, id)
write_byte(id)
write_string(message)
message_end()
}

messageTeamInfo(id, type, team[])
{
message_begin(type, g_msgTeamInfo, _, id)
write_byte(id)
write_string(team)
message_end()
}

findAnyPlayer()
{
new players[32], inum

get_players(players, inum)

for (new a = 0; a < inum; ++a)
{
if(is_user_connected(players[a]))
return players[a];
}

return 0
}
#endif

#if defined PLAYSND
public plugin_precache()
{
precache_sound(sound)

return PLUGIN_CONTINUE
}

playsound()
{
client_cmd(0 , "stopsound")
client_cmd(0, "spk ^"%s^"",sound)
}
#endif

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

#if defined ANN2CHAT
g_msgSayText = get_user_msgid("SayText")
g_msgTeamInfo = get_user_msgid("TeamInfo")
#endif

return PLUGIN_CONTINUE
}

/*


Описание:
Когда администор сервера присоединяется к игре - у всех игроков будет написано на экране что админ online

Настройка плагина:
Открываем исходник, смотрим настройки.

Чтобы убирать эти возможности - комментируем их //
Т.е. ставим перед #define значки //

Само сообщение, которое будет видно в чате (^x01 - желтый, ^x03 - цвет команды, ^x04 - зеленый)
#define A_CONNECT "^x04 ADMIN ^x01[^x03%s^x01] ^x04is OnLine!"

// Показывать сообщения на экране что админ присоединился
#define ANN2HUD
// Показывать сообщения в чате когда админ присоединился
#define ANN2CHAT
// проигрывать песенку когда админ присоединился
#define PLAYSND

Название песенки (по умолчанию - в папке valve/sound/vox)
new sound[] = "vox\administration.wav"
*/


Отредактировал: Connect1507, - 9.3.2012, 19:14
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя Kamikadze312
сообщение 9.3.2012, 19:23
Сообщение #5
Стаж: 14 лет

Сообщений: 37
Благодарностей: 3
Полезность: 63

Цитата(Connect1507 @ 9.3.2012, 20:13) *
Поменял флаги:

#include <amxmodx>

// Registering plug-in
#define PLUGIN "Vip OnLine (AOL)"
#define VERSION "1.0" // [21.05.2007]
#define AUTHOR "Connect"

/*


Описание:
Когда администор сервера присоединяется к игре - у всех игроков будет написано на экране что админ online

Настройка плагина:
Открываем исходник, смотрим настройки.

Чтобы убирать эти возможности - комментируем их //
Т.е. ставим перед #define значки //

Само сообщение, которое будет видно в чате (^x01 - желтый, ^x03 - цвет команды, ^x04 - зеленый)
#define A_CONNECT "^x04 VIP [^x03%s^x04] is OnLine!"

// Показывать сообщения на экране что админ присоединился
#define ANN2HUD
// Показывать сообщения в чате когда админ присоединился
#define ANN2CHAT
// проигрывать песенку когда админ присоединился
#define PLAYSND

Название песенки (по умолчанию - в папке valve/sound/vox)
new sound[] = "vox\administration.wav"
*/

// Constants section. Comment '//' defines to disable feature
#define ANN2HUD // show hud message when admin connected
#define ANN2CHAT // show hud message when best player connected (need ps_stats base)
#define PLAYSND // play sound then admin connected

//================================================================

#if defined ANN2CHAT

#define A_CONNECT "^x04 Вип [^x03%s^x04] В игре!!"

enum ChatColor
{
CHATCOLOR_YELLOW = 1, // Yellow
CHATCOLOR_GREEN, // Green Color
CHATCOLOR_TEAM_COLOR, // Red, grey, blue
CHATCOLOR_GREY, // grey
CHATCOLOR_RED, // Red
CHATCOLOR_BLUE, // Blue
}

new g_TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}

new g_msgSayText
new g_msgTeamInfo
#endif

#if defined PLAYSND
new sound[] = "adm_vip_con\tls.wav"
#endif

public client_putinserver(id) {
new name[32], sflags[32]

get_user_name(id,name,31)
get_flags(get_user_flags(id),sflags,31)

#if defined ANN2HUD
new text[128]

format(text,127,"Вип %s В игре!!", name)
if (contain(sflags,"b")!=-1)
{
set_hudmessage(255, 0, 32, 0.05, 0.60, 1, 5.0, 5.0, 0.3, 0.3, 3)
show_hudmessage(0,"%s",text)
}
else if (contain(sflags,"cde")!=-1)
{
set_hudmessage(0, 100, 255, 0.05, 0.60, 1, 5.0, 5.0, 0.7, 0.7, 3)
show_hudmessage(0,"%s",text)
}
#endif

#if defined ANN2CHAT
if (contain(sflags,"b")!=-1)
{
colorChat(0, CHATCOLOR_RED, A_CONNECT, name)
}
else if (contain(sflags,"at")!=-1)
{
colorChat(0, CHATCOLOR_BLUE, A_CONNECT, name)
}
#endif

#if defined PLAYSND
if (contain(sflags,"l")!=-1 || contain(sflags,"at")!=-1)
{
playsound ()
}
#endif

return PLUGIN_CONTINUE
}

#if defined ANN2CHAT
//
// за что им огромное спасиба!
colorChat(id, ChatColor:color, const msg[], {Float,Sql,Result,_}:...) {
new team, index, MSG_Type
new bool:teamChanged = false
new message[192]

switch(color)
{
case CHATCOLOR_YELLOW: // Yellow
{
message[0] = 0x01;
}
case CHATCOLOR_GREEN: // Green
{
message[0] = 0x04;
}
default: // Grey, Red, Blue
{
message[0] = 0x03;
}
}

vformat(message[1], 190, msg, 4);

if (id == 0)
{
index = findAnyPlayer();
MSG_Type = MSG_ALL;
}
else
{
index = id;
MSG_Type = MSG_ONE;
}

if (index != 0)
{
team = get_user_team(index);
if (color == CHATCOLOR_RED && team != 1)
{
messageTeamInfo(index, MSG_Type, g_TeamName[1])
teamChanged = true
}
else if (color == CHATCOLOR_BLUE && team != 2)
{
messageTeamInfo(index, MSG_Type, g_TeamName[2])
teamChanged = true
}
else if (color == CHATCOLOR_GREY && team != 0)
{
messageTeamInfo(index, MSG_Type, g_TeamName[0])
teamChanged = true
}
messageSayText(index, MSG_Type, message);
if (teamChanged)
{
messageTeamInfo(index, MSG_Type, g_TeamName[team]);
}
}
}

messageSayText(id, type, message[])
{
message_begin(type, g_msgSayText, _, id)
write_byte(id)
write_string(message)
message_end()
}

messageTeamInfo(id, type, team[])
{
message_begin(type, g_msgTeamInfo, _, id)
write_byte(id)
write_string(team)
message_end()
}

findAnyPlayer()
{
new players[32], inum

get_players(players, inum)

for (new a = 0; a < inum; ++a)
{
if(is_user_connected(players[a]))
return players[a];
}

return 0
}
#endif

#if defined PLAYSND
public plugin_precache()
{
precache_sound(sound)

return PLUGIN_CONTINUE
}

playsound()
{
client_cmd(0 , "stopsound")
client_cmd(0, "spk ^"%s^"",sound)
}
#endif

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

#if defined ANN2CHAT
g_msgSayText = get_user_msgid("SayText")
g_msgTeamInfo = get_user_msgid("TeamInfo")
#endif

return PLUGIN_CONTINUE
}

/*


Описание:
Когда администор сервера присоединяется к игре - у всех игроков будет написано на экране что админ online

Настройка плагина:
Открываем исходник, смотрим настройки.

Чтобы убирать эти возможности - комментируем их //
Т.е. ставим перед #define значки //

Само сообщение, которое будет видно в чате (^x01 - желтый, ^x03 - цвет команды, ^x04 - зеленый)
#define A_CONNECT "^x04 ADMIN ^x01[^x03%s^x01] ^x04is OnLine!"

// Показывать сообщения на экране что админ присоединился
#define ANN2HUD
// Показывать сообщения в чате когда админ присоединился
#define ANN2CHAT
// проигрывать песенку когда админ присоединился
#define PLAYSND

Название песенки (по умолчанию - в папке valve/sound/vox)
new sound[] = "vox\administration.wav"
*/

Спасибо
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: