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

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

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

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

> Правила форума

Этот раздел, как вы могли заметить по названию, предназначен для решения вопросов по поводу уже существующих модов и плагинов.
Пожалуйста, если у вас проблема с написанием плагина, не путайте этот раздел с разделом по скриптингу.
Для поиска плагинов и модов существует соответствующий раздел.

Название темы должно соответствовать содержанию. Темы с названием типа "Помогите", "Вопрос", "парни подскажите..." - будут удалены.
Все темы, не относящиеся к "Вопросам по модам и плагинам", будут удалены или перемещены в соответствующий раздел.

Правила оформления темы:
1. Помимо заголовка не забудьте верно сформулировать свой вопрос.
2. Выложите исходник (в тег кода + ) или ссылку на плагин который вызывает у вас вопросы.
3. Выложите лог с ошибками (если имеется) под спойлер

Как сделать, чтобы Текст был в углу экрана на сервере кс?

, Текст на сервере
Статус пользователя sasha3
сообщение 12.1.2013, 21:31
Сообщение #1
Стаж: 14 лет

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

Как сделать, чтобы Текст был в углу экрана на сервере кс, как на скрине, или как переместить текст,, который с "?" туда, где и Обнулить счет F3?
Скрытый текст



Отредактировал: sasha3, - 12.1.2013, 21:32
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя logotip
сообщение 12.1.2013, 21:40
Сообщение #2
Стаж: 14 лет

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

в плагине imessage измени расположение сообщения и всё
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя sasha3
сообщение 12.1.2013, 21:43
Сообщение #3
Стаж: 14 лет

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

Цитата(logotip @ 12.1.2013, 21:40) *
в плагине imessage измени расположение сообщения и всё

У меня другой плагин, а можешь скинуть пожалуйста ссылочку на плагин ?
Мой плагин - permanent_message.amxx

Отредактировал: sasha3, - 12.1.2013, 21:43
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя aphk
сообщение 12.1.2013, 21:48
Сообщение #4


Стаж: 16 лет

Сообщений: 213
Благодарностей: 65
Полезность: 248

Покажи исходник плагина, посмотрим.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя sasha3
сообщение 12.1.2013, 21:49
Сообщение #5
Стаж: 14 лет

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

Цитата(aphk @ 12.1.2013, 21:48) *
Покажи исходник плагина, посмотрим.



Скрытый текст

#include <amxmodx>
#include <amxmisc>

new cvar_message, cvar_color, cvar_location, cvar_effects, cvar_show, cvar_cmd, hudsync

public plugin_init() {
register_plugin("Permanent message", "1.1", "He3aBuCuM")
cvar_message = register_cvar("amx_permanent_message", "Меню сервера на F4")
cvar_color = register_cvar("amx_permanent_message_color", "255 255 255")
cvar_location = register_cvar("amx_permanent_message_location", "3")
cvar_effects = register_cvar("amx_permanent_message_effects", "0")
cvar_show = register_cvar("amx_permanent_message_show", "0")
cvar_cmd = register_cvar("amx_permanent_message_cmd", "1")
register_concmd("amx_perm_msg", "cmdChangeMsg", ADMIN_LEVEL_A)
hudsync = CreateHudSyncObj()
set_task(1.0, "show_hud", 0, "", 0, "b")
}

public show_hud() {
new message[200], location, eff, show, players[32], inum
static red, green, blue
get_pcvar_string(cvar_message, message, charsmax(message))
get_hud_color(red, green, blue)
location = get_pcvar_num(cvar_location)
eff = clamp(get_pcvar_num(cvar_effects), 0, 2)
show = get_pcvar_num(cvar_show)
get_players(players, inum)

replace_all(message, charsmax(message), "%new%", "^n")
replace_all(message, charsmax(message), "/n", "^n")

switch(location) {
case 1: set_hudmessage(red, green, blue, 0.01, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 2: set_hudmessage(red, green, blue, -1.0, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 3: set_hudmessage(red, green, blue, 0.99, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 4: set_hudmessage(red, green, blue, 0.01, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 5: set_hudmessage(red, green, blue, -1.0, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 6: set_hudmessage(red, green, blue, 0.99, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 7: set_hudmessage(red, green, blue, 0.01, 0.75, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 8: set_hudmessage(red, green, blue, -1.0, 0.75, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 9: set_hudmessage(red, green, blue, 0.99, 0.70, eff, 1.0, 1.0, 0.1, 0.2, -1)
}

for(new i=0; i<inum; ++i) {
switch(show) {
case 0: ShowSyncHudMsg(0, hudsync, message)
case 1: {
if(!is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 2: {
if(is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 3: {
if(is_user_admin(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 4: {
if(!is_user_admin(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 5: {
if(is_user_admin(players[i]) && is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 6: {
if(is_user_admin(players[i]) && !is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 7: {
if(!is_user_admin(players[i]) && is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 8: {
if(!is_user_admin(players[i]) && !is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
default: ShowSyncHudMsg(0, hudsync, message)
}
}
return PLUGIN_CONTINUE
}

public cmdChangeMsg(id, level, cid) {
if(!get_pcvar_num(cvar_cmd) || !cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

new args[200], name[32]
read_args(args, charsmax(args))
remove_quotes(args)
get_user_name(id, name, charsmax(name))

set_pcvar_string(cvar_message, args)
log_amx("The admin ^"%s^" change the permanent message to ^"%s^"", name, args)

return PLUGIN_CONTINUE
}

get_hud_color(&r, &g, &b) {
new color[20]
static red[5], green[5], blue[5]
get_pcvar_string(cvar_color, color, charsmax(color))
parse(color, red, charsmax(red), green, charsmax(green), blue, charsmax(blue))

r = str_to_num(red)
g = str_to_num(green)
b = str_to_num(blue)
}


Отредактировал: sasha3, - 12.1.2013, 21:49
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя logotip
сообщение 12.1.2013, 21:52
Сообщение #6
Стаж: 14 лет

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

Плагин imessage
Код
/* AMX Mod X
*   Info. Messages Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>

#define X_POS         -1.0
#define Y_POS         0.20
#define HOLD_TIME     12.0

new Array:g_Values
new Array:g_Messages
new g_MessagesNum
new g_Current

#define charsof(%1) (sizeof(%1)-1)

new amx_freq_imessage;

public plugin_init()
{
    g_Messages=ArrayCreate(384);
    g_Values=ArrayCreate(3);
    register_plugin("Info. Messages", AMXX_VERSION_STR, "AMXX Dev Team")
    register_dictionary("imessage.txt")
    register_dictionary("common.txt")
    register_srvcmd("amx_imessage", "setMessage")
    amx_freq_imessage=register_cvar("amx_freq_imessage", "10")
    
    new lastinfo[8]
    get_localinfo("lastinfomsg", lastinfo, 7)
    g_Current = str_to_num(lastinfo)
    set_localinfo("lastinfomsg", "")
}

public infoMessage()
{
    if (g_Current >= g_MessagesNum)
        g_Current = 0
        
    // No messages, just get out of here
    if (g_MessagesNum==0)
    {
        return;
    }
    
    new values[3];
    new Message[384];
    
    ArrayGetString(g_Messages, g_Current, Message, charsof(Message));
    ArrayGetArray(g_Values, g_Current, values);
    
    new hostname[64];
    
    get_cvar_string("hostname", hostname, 63);
    replace(Message, 380, "%hostname%", hostname);
    
    set_hudmessage(values[0], values[1], values[2], X_POS, Y_POS, 0, 0.5, HOLD_TIME, 2.0, 2.0, -1);
    
    show_hudmessage(0, "%s", Message);
    
    client_print(0, print_console, "%s", Message);
    ++g_Current;
    
    new Float:freq_im = get_pcvar_float(amx_freq_imessage);
    
    if (freq_im > 0.0)
        set_task(freq_im, "infoMessage", 12345);
}

public setMessage()
{

    new Message[384];
    
    remove_task(12345)
    read_argv(1, Message, 380)
    
    while (replace(Message, 380, "\n", "^n")) {}
    
    new mycol[12]
    new vals[3];
    
    read_argv(2, mycol, 11)        // RRRGGGBBB
    vals[2] = str_to_num(mycol[6])
    
    mycol[6] = 0
    vals[1] = str_to_num(mycol[3])
    
    mycol[3] = 0
    vals[0] = str_to_num(mycol[0])
    
    g_MessagesNum++
    
    new Float:freq_im = get_pcvar_float(amx_freq_imessage)
    
    ArrayPushString(g_Messages, Message);
    ArrayPushArray(g_Values, vals);
    
    if (freq_im > 0.0)
        set_task(freq_im, "infoMessage", 12345)
    
    return PLUGIN_HANDLED
}

public plugin_end()
{
    new lastinfo[8]

    num_to_str(g_Current, lastinfo, 7)
    set_localinfo("lastinfomsg", lastinfo)
}





Положение зависит от этой переменной

#define X_POS -1.0
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя sasha3
сообщение 12.1.2013, 21:53
Сообщение #7
Стаж: 14 лет

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

Цитата(logotip @ 12.1.2013, 21:52) *
Плагин imessage
Код
/* AMX Mod X
*   Info. Messages Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>

#define X_POS         -1.0
#define Y_POS         0.20
#define HOLD_TIME     12.0

new Array:g_Values
new Array:g_Messages
new g_MessagesNum
new g_Current

#define charsof(%1) (sizeof(%1)-1)

new amx_freq_imessage;

public plugin_init()
{
    g_Messages=ArrayCreate(384);
    g_Values=ArrayCreate(3);
    register_plugin("Info. Messages", AMXX_VERSION_STR, "AMXX Dev Team")
    register_dictionary("imessage.txt")
    register_dictionary("common.txt")
    register_srvcmd("amx_imessage", "setMessage")
    amx_freq_imessage=register_cvar("amx_freq_imessage", "10")
    
    new lastinfo[8]
    get_localinfo("lastinfomsg", lastinfo, 7)
    g_Current = str_to_num(lastinfo)
    set_localinfo("lastinfomsg", "")
}

public infoMessage()
{
    if (g_Current >= g_MessagesNum)
        g_Current = 0
        
    // No messages, just get out of here
    if (g_MessagesNum==0)
    {
        return;
    }
    
    new values[3];
    new Message[384];
    
    ArrayGetString(g_Messages, g_Current, Message, charsof(Message));
    ArrayGetArray(g_Values, g_Current, values);
    
    new hostname[64];
    
    get_cvar_string("hostname", hostname, 63);
    replace(Message, 380, "%hostname%", hostname);
    
    set_hudmessage(values[0], values[1], values[2], X_POS, Y_POS, 0, 0.5, HOLD_TIME, 2.0, 2.0, -1);
    
    show_hudmessage(0, "%s", Message);
    
    client_print(0, print_console, "%s", Message);
    ++g_Current;
    
    new Float:freq_im = get_pcvar_float(amx_freq_imessage);
    
    if (freq_im > 0.0)
        set_task(freq_im, "infoMessage", 12345);
}

public setMessage()
{

    new Message[384];
    
    remove_task(12345)
    read_argv(1, Message, 380)
    
    while (replace(Message, 380, "\n", "^n")) {}
    
    new mycol[12]
    new vals[3];
    
    read_argv(2, mycol, 11)        // RRRGGGBBB
    vals[2] = str_to_num(mycol[6])
    
    mycol[6] = 0
    vals[1] = str_to_num(mycol[3])
    
    mycol[3] = 0
    vals[0] = str_to_num(mycol[0])
    
    g_MessagesNum++
    
    new Float:freq_im = get_pcvar_float(amx_freq_imessage)
    
    ArrayPushString(g_Messages, Message);
    ArrayPushArray(g_Values, vals);
    
    if (freq_im > 0.0)
        set_task(freq_im, "infoMessage", 12345)
    
    return PLUGIN_HANDLED
}

public plugin_end()
{
    new lastinfo[8]

    num_to_str(g_Current, lastinfo, 7)
    set_localinfo("lastinfomsg", lastinfo)
}





Положение зависит от этой переменной

#define X_POS -1.0


а как узнать положение, я начинающий =)
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя logotip
сообщение 12.1.2013, 21:54
Сообщение #8
Стаж: 14 лет

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

Я сделал и проверил , но сервера нет)
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя sasha3
сообщение 12.1.2013, 21:55
Сообщение #9
Стаж: 14 лет

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

Цитата(logotip @ 12.1.2013, 21:54) *
Я сделал и проверил , но сервера нет)


не понял ?
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя aphk
сообщение 12.1.2013, 21:58
Сообщение #10


Стаж: 16 лет

Сообщений: 213
Благодарностей: 65
Полезность: 248

Ем, а разве не это положения?
case 1: set_hudmessage(red, green, blue, 0.01, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 2: set_hudmessage(red, green, blue, -1.0, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 3: set_hudmessage(red, green, blue, 0.99, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 4: set_hudmessage(red, green, blue, 0.01, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 5: set_hudmessage(red, green, blue, -1.0, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 6: set_hudmessage(red, green, blue, 0.99, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 7: set_hudmessage(red, green, blue, 0.01, 0.75, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 8: set_hudmessage(red, green, blue, -1.0, 0.75, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 9: set_hudmessage(red, green, blue, 0.99, 0.70, eff, 1.0, 1.0, 0.1, 0.2, -1)


amx_permanent_message_location "3"
Where to be the message?
1: top-left(on the radar)
2: top-middle
3: top-right
4: middle-left
5: center
6: middle-right
7: bottom-left(over health)
8: bottom-middle(over timer)
9: bottom-right(over money)

Допустим у нас стоит 3 - Сверху-Справа.

Ищем

case 3: set_hudmessage(red, green, blue, 0.99, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)

Далее попробуй изменить это 0.99, 0.15 на 1.25, 1


Извиняюсь, если не то нашептал crazy.gif
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя logotip
сообщение 12.1.2013, 21:59
Сообщение #11
Стаж: 14 лет

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

Float:x - число с плавающей точкой, координата по горизонтали(от 0.00 до 1.00, середина -1.0).
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя sasha3
сообщение 12.1.2013, 22:02
Сообщение #12
Стаж: 14 лет

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

Тогда, чтобы было в углу справа, то нужно, чтобы было написано так ?
case 3: set_hudmessage(red, green, blue, 0.99, 0.01, eff, 1.0, 1.0, 0.1, 0.2, -1) - ?
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя aphk
сообщение 12.1.2013, 22:03
Сообщение #13


Стаж: 16 лет

Сообщений: 213
Благодарностей: 65
Полезность: 248

Цитата(sasha3 @ 12.1.2013, 22:02) *
Тогда, чтобы было в углу справа, то нужно, чтобы было написано так ?
case 3: set_hudmessage(red, green, blue, 0.99, 0.01, eff, 1.0, 1.0, 0.1, 0.2, -1) - ?


Нет, ты попробуй скомпилировать так, проверь. Не получится по другому.


Компилятор по башке не даст.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя sasha3
сообщение 12.1.2013, 22:17
Сообщение #14
Стаж: 14 лет

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

Я правильно написал =)
Спс все равно вам =)
Скрин

Исходник
#include <amxmodx>
#include <amxmisc>

new cvar_message, cvar_color, cvar_location, cvar_effects, cvar_show, cvar_cmd, hudsync

public plugin_init() {
register_plugin("Permanent message", "1.1", "He3aBuCuM")
cvar_message = register_cvar("amx_permanent_message", "Меню сервера на F4")
cvar_color = register_cvar("amx_permanent_message_color", "0 0 255")
cvar_location = register_cvar("amx_permanent_message_location", "3")
cvar_effects = register_cvar("amx_permanent_message_effects", "0")
cvar_show = register_cvar("amx_permanent_message_show", "0")
cvar_cmd = register_cvar("amx_permanent_message_cmd", "1")
register_concmd("amx_perm_msg", "cmdChangeMsg", ADMIN_LEVEL_A)
hudsync = CreateHudSyncObj()
set_task(1.0, "show_hud", 0, "", 0, "b")
}

public show_hud() {
new message[200], location, eff, show, players[32], inum
static red, green, blue
get_pcvar_string(cvar_message, message, charsmax(message))
get_hud_color(red, green, blue)
location = get_pcvar_num(cvar_location)
eff = clamp(get_pcvar_num(cvar_effects), 0, 2)
show = get_pcvar_num(cvar_show)
get_players(players, inum)

replace_all(message, charsmax(message), "%new%", "^n")
replace_all(message, charsmax(message), "/n", "^n")

switch(location) {
case 1: set_hudmessage(red, green, blue, 0.01, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 2: set_hudmessage(red, green, blue, -1.0, 0.15, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 3: set_hudmessage(red, green, blue, 0.90, 0.01, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 4: set_hudmessage(red, green, blue, 0.01, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 5: set_hudmessage(red, green, blue, -1.0, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 6: set_hudmessage(red, green, blue, 0.99, -1.0, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 7: set_hudmessage(red, green, blue, 0.01, 0.75, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 8: set_hudmessage(red, green, blue, -1.0, 0.75, eff, 1.0, 1.0, 0.1, 0.2, -1)
case 9: set_hudmessage(red, green, blue, 0.99, 0.70, eff, 1.0, 1.0, 0.1, 0.2, -1)
}

for(new i=0; i<inum; ++i) {
switch(show) {
case 0: ShowSyncHudMsg(0, hudsync, message)
case 1: {
if(!is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 2: {
if(is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 3: {
if(is_user_admin(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 4: {
if(!is_user_admin(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 5: {
if(is_user_admin(players[i]) && is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 6: {
if(is_user_admin(players[i]) && !is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 7: {
if(!is_user_admin(players[i]) && is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
case 8: {
if(!is_user_admin(players[i]) && !is_user_alive(players[i]))
ShowSyncHudMsg(players[i], hudsync, message)
}
default: ShowSyncHudMsg(0, hudsync, message)
}
}
return PLUGIN_CONTINUE
}

public cmdChangeMsg(id, level, cid) {
if(!get_pcvar_num(cvar_cmd) || !cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

new args[200], name[32]
read_args(args, charsmax(args))
remove_quotes(args)
get_user_name(id, name, charsmax(name))

set_pcvar_string(cvar_message, args)
log_amx("The admin ^"%s^" change the permanent message to ^"%s^"", name, args)

return PLUGIN_CONTINUE
}

get_hud_color(&r, &g, &b) {
new color[20]
static red[5], green[5], blue[5]
get_pcvar_string(cvar_color, color, charsmax(color))
parse(color, red, charsmax(red), green, charsmax(green), blue, charsmax(blue))

r = str_to_num(red)
g = str_to_num(green)
b = str_to_num(blue)
}


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