Проблема с HUD

Статус
В этой теме нельзя размещать новые ответы.

asd

Сообщения
151
Реакции
17
Помог
3 раз(а)
Основная информация

Проблема: Не можно сменить координаты и цвет текст

Ошибка:
Не можно сменить координаты и цвет текст
Дополнительная информация

Amx Mod X: ReAMXX

Билд:
Код:
ReHLDS version: 3.0.0.567-dev


ReGamedll:
Код:
ReGameDLL version: 5.2.0.177-dev


Список модулей:
PHP:
[ 1] MySQL 1.8.3-Re AMX Mod X Dev Team
[ 2] FakeMeta 1.8.3-Re AMX Mod X Dev Team
[ 3] Ham Sandwich 1.8.3-Re AMX Mod X Dev Team
[ 4] Engine 1.8.3-Re AMX Mod X Dev Team
[ 5] ReAimDetector 0.2.0 ReHLDS Team
[ 6] CSX 1.8.3-Re AMX Mod X Dev Team
[ 7] CStrike 1.8.3-Re AMX Mod X Dev Team
[ 8] nVault 1.8.3-Re AMX Mod X Dev Team
[ 9] ReAPI 5.1.0.103- Asmodai & s1lent
[10] Fun 1.8.3-Re AMX Mod X Dev Team
[11] Sockets2 1.8.1.3746 HLSW Dev Team


Список плагинов:
HTML:
[ 1] Admin Load 3.9.1 F@nt0M adminload_3_9_1
[ 2] FreshBans 1.3.8b kanagava fresh_bans_138_
[ 3] unknown unknown unknown rc_log.amxx
[ 4] ScreenMaker 1.1 neygomon screen_maker.amxx
[ 5] VIP RBS 15.07.18 SKAJIbnEJIb vip_rbs.amxx
[ 6] unknown unknown unknown reaimdetector.amxx
[ 7] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx
[ 8] Slots Reservation 1.8.3-Re AMXX Dev Team adminslots.amxx
[ 9] Multi-Lingual System 1.8.3-Re AMXX Dev Team multilingual.am
[ 10] Menus Front-End 1.8.3-dev+ AMXX Dev Team menufront.amxx
[ 11] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx
[ 12] Players Menu 1.8.3-Re AMXX Dev Team plmenu.amxx
[ 13] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx
[ 14] Plugin Menu 1.8.3-Re AMXX Dev Team pluginmenu.amxx
[ 15] Admin Chat 1.8.3-Re AMXX Dev Team adminchat.amxx
[ 16] Anti Flood 1.8.3-Re AMXX Dev Team antiflood.amxx
[ 17] Scrolling Message 1.8.3-Re AMXX Dev Team scrollmsg.amxx
[ 18] Info. Messages 1.8.3-Re AMXX Dev Team imessage.amxx
[ 19] Admin Votes 1.8.3-Re AMXX Dev Team adminvote.amxx
[ 20] Pause Plugins 1.8.3-Re AMXX Dev Team pausecfg.amxx
[ 21] Stats Configuration 1.8.3-Re AMXX Dev Team statscfg.amxx
[ 22] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx
[ 23] CS Misc. Stats 1.8.3-Re AMXX Dev Team miscstats.amxx running
[ 24] StatsX (MastaMan Editi 1.8.2 AMXX Dev Team & statsx_shell.am
[ 25] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx
[ 26] AFK Control 1.4.1 [Rnd neygomon afk_control.amx
[ 27] Rock to Ban 1.01 Safety1st rock2ban.amxx
[ 28] Auto RR 1.3 h1k3 rr_auto.amxx
[ 29] Nice Killer 1.6 Got Milk? / HoHo nice_killer.amx
[ 30] Ping Control 1.31 neygomon ping_control.am
[ 31] Instant AutoTeamBalanc 1.2.0 ConnorMcLeod instant_autotea
[ 32] Parachute 1.3 KRoT@L/JTP10181 amx_parachute.a
[ 33] Lite Admin ESP 1.0 Safety1st admin_esp.amxx
[ 34] Reset Score 1.0 h1k3 newresetscore.a
[ 35] dhudinfo 0.1 h1k3 dhudinfo.amxx
[ 36] Map Manager: Sub Plugi 0.1 Mistrick mapmanager_subp
[ 37] Map Manager 2.5.61 Mistrick mapmanager.amxx
[ 38] Fade Screen 20.15 LegenDa fade_screen.amx
[ 39] UA 2.0 vk.com/uacsonlin amx_gag.amxx
[ 40] [reAPI] Flash Control 1.1 neugomon flash_control.amxx
[ 41] mute 1.0 Aziz mute.amxx
[ 42] DemoRecoder 1.1 neygomon amx_dem


Список метамодулей:
PHP:
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-R
[ 2] Rechecker RUN - rechecker_mm_i38 v2.3
[ 3] WHBlocker RUN - whblocker_mm_i38 v1.5.668
[ 4] ReSRDetector RUN - resrdetector_mm_ v0.1.0
[ 5] ReAuthCheck fail - reauthcheck_mm_i v0.1.5
[ 6] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9
[ 7] Reunion RUN - reunion_mm_i386. v0.1.75
[ 8] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3
[ 9] MySQL RUN - mysql_amxx_i386. v1.8.3-R
[10] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-R
[11] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-R
[12] Engine RUN - engine_amxx_i386 v1.8.3-R
[13] ReAimDetector RUN - reaimdetector_am v0.2.0
[14] CSX RUN - csx_amxx_i386.so v1.8.3-R
[15] CStrike RUN - cstrike_amxx_i38 v1.8.3-R
[16] ReAPI RUN - reapi_amxx_i386. v5.1.0.1
[17] Fun RUN - fun_amxx_i386.so v1.8.3-R


Исходник:
Код:
#include <amxmodx> 
#include <engine>

#define PLUGIN "girls online"
#define VERSION "1.0"
#define AUTHOR "6e3yMnbIu`"

new bool:g_bAdminNick
new bool:is_admin_connected[33]
new g_msg[512]

new g_admin_enable
new g_online_color
new g_offline_color
new g_msg_xypos

new g_SyncAdmin
new g_iAdminCount
new g_iMaxPlayers

new g_ClassName[] = "admin_msg"
#define strbreak argbreak

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

register_think(g_ClassName,"ForwardThink")

g_admin_enable = register_cvar("sa_plugin_on","1")
g_online_color = register_cvar("sa_online_color","10 130 10")
g_offline_color = register_cvar("sa_offline_color","255 0 0")
g_msg_xypos = register_cvar("sa_msg_xypos","0.01 0.40")

g_SyncAdmin = CreateHudSyncObj()
g_iMaxPlayers = get_maxplayers()

new iEnt = create_entity("info_target")
entity_set_string(iEnt, EV_SZ_classname, g_ClassName)
entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_G)
{
is_admin_connected[id] = true
g_iAdminCount++
set_admin_msg()
}
if(g_iAdminCount == 0)
set_admin_msg()
}

public client_disconnect(id)
{
if(is_admin_connected[id])
{
is_admin_connected[id] = false
g_iAdminCount--
set_admin_msg()
}
}

public client_infochanged(id)
{
if(is_admin_connected[id])
{
static NewName[32], OldName[32]
get_user_info(id, "name", NewName, 31)
get_user_name(id, OldName, 31)

if(!equal(OldName, NewName))
{
g_bAdminNick = true
}
}
}

public set_admin_msg()
{
static g_iAdminName[32], pos, i
pos = 0
pos += formatex(g_msg[pos], 511-pos, "Кол-во Девушек на сервере: %d", g_iAdminCount)

for(i = 1 ; i <= g_iMaxPlayers ; i++)
{
if(is_admin_connected)
{
get_user_name(i, g_iAdminName, 31)
pos += formatex(g_msg[pos], 511-pos, "^n%s", g_iAdminName)
}
}
}

public admins_online()
{
if(get_pcvar_num(g_admin_enable))
{
static r, g, b, Float:x,Float:y
HudMsgPos(x,y)

if (g_iAdminCount > 0)
{
HudMsgColor(g_online_color, r, g, b)
set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
}
else
{
HudMsgColor(g_offline_color, r, g, b)
set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
}
}
return PLUGIN_HANDLED
}

public ForwardThink(iEnt)
{
admins_online()

if(g_bAdminNick)
{
set_admin_msg()
g_bAdminNick = false
}
entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public HudMsgColor(cvar, &r, &g, &b)
{
static color[16], piece[5]
get_pcvar_string(cvar, color, 15)

strbreak( color, piece, 4, color, 15)
r = str_to_num(piece)

strbreak( color, piece, 4, color, 15)
g = str_to_num(piece)
b = str_to_num(color)
}

public HudMsgPos(&Float:x, &Float:y)
{
static coords[16], piece[10]
get_pcvar_string(g_msg_xypos, coords, 40)

strbreak(coords, piece, 9, coords, 15)
x = str_to_float(piece)
y = str_to_float(coords)
}


Комментарий:
Непонимаю где сделал ошибку, не могу сменить цвет и координаты текста.
 

Вложения

Сообщения
2,288
Реакции
1,740
Помог
31 раз(а)
asd, а это на что?
Код:
    g_admin_enable = register_cvar("sa_plugin_on","1")
g_online_color = register_cvar("sa_online_color","10 130 10")
g_offline_color = register_cvar("sa_offline_color","255 0 0")
g_msg_xypos = register_cvar("sa_msg_xypos","0.01 0.40")
 

asd

Сообщения
151
Реакции
17
Помог
3 раз(а)
Pokemoshka, Не работает, потому и пишу)
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
asd, как меняли? Пропиивалы в конфиг или просто в исходнике?. Если в кфг то какос?
 

asd

Сообщения
151
Реакции
17
Помог
3 раз(а)
fantom, Только в исходнике.
Кфг к плагину нету.
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
asd, квар через консоль сервера или в amxx.cfg пропиши и посмотри на результат
 

asd

Сообщения
151
Реакции
17
Помог
3 раз(а)
w0w, Нету результату)
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу