- Ошибка
-
Не могу понять, почему не хочет сделать цветными буквами строку.
- ОС
- Windows
- Amx Mod X
-
AMX Mod X 1.10.0.5435
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.10.0.759-dev
Build date: 15:34:13 Jun 22 2021 (2628)
- ReGamedll
-
ReGameDLL version: 5.20.0.516-dev
Build date: 21:01:54 Jun 14 2021
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
Currently loaded plugins:
[ 1] SafeNameAndChat RUN - safenameandchat.dll v1.1 ini ANY
ANY
[ 2] Reunion RUN - reunion_mm.dll v0.1.0.137 ini Start
Never
[ 3] ReAuthCheck RUN - reauthcheck_mm.dll v0.1.6 ini Start
Never
[ 4] Revoice RUN - revoice_mm.dll v0.1.0.34 ini Start
Never
[ 5] AMX Mod X RUN - amxmodx_mm.dll v1.10.0.5435 ini Start
ANY
[ 6] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl
ANY
[ 7] ReSemiclip RUN - resemiclip_mm.dll v2.3.9 ini Chlvl
ANY
[ 8] WHBlocker RUN - whblocker_mm.dll v1.5.697 ini Chlvl
ANY
[ 9] CStrike RUN - cstrike_amxx.dll v1.10.0.5435 pl5 ANY
ANY
[10] Ham Sandwich RUN - hamsandwich_amxx.dll v1.10.0.5435 pl5 ANY
ANY
[11] CSX RUN - csx_amxx.dll v1.10.0.5435 pl5 ANY
ANY
[12] Fun RUN - fun_amxx.dll v1.10.0.5435 pl5 ANY
ANY
12 plugins, 12 running
- Список плагинов
-
Currently loaded plugins:
[ 1] 0 Admin Base 1.10.0.543 AMXX Dev Team
admin.amxx running
[ 2] 1 Admin Commands 1.10.0.543 AMXX Dev Team
admincmd.am running
[ 3] 2 Slots Reservation 1.10.0.543 AMXX Dev Team
adminslots. running
[ 4] 3 Menus Front-End 1.10.0.543 AMXX Dev Team
menufront.a running
[ 5] 4 Commands Menu 1.10.0.543 AMXX Dev Team
cmdmenu.amx running
[ 6] 5 Players Menu 1.10.0.543 AMXX Dev Team
plmenu.amxx running
[ 7] 6 Maps Menu 1.10.0.543 AMXX Dev Team
mapsmenu.am running
[ 8] 7 Plugin Menu 1.10.0.543 AMXX Dev Team
pluginmenu. running
[ 9] 8 Admin Chat 1.10.0.543 AMXX Dev Team
adminchat.a running
[ 10] 9 Anti Flood 1.10.0.543 AMXX Dev Team
antiflood.a running
[ 11] 10 Scrolling Message 1.10.0.543 AMXX Dev Team
scrollmsg.a running
[ 12] 11 Info. Messages 1.10.0.543 AMXX Dev Team
imessage.am running
[ 13] 12 Admin Votes 1.10.0.543 AMXX Dev Team
adminvote.a running
[ 14] 13 NextMap 1.10.0.543 AMXX Dev Team
nextmap.amx running
[ 15] 14 Nextmap Chooser 1.10.0.543 AMXX Dev Team
mapchooser. running
[ 16] 15 TimeLeft 1.10.0.543 AMXX Dev Team
timeleft.am running
[ 17] 16 Pause Plugins 1.10.0.543 AMXX Dev Team
pausecfg.am running
[ 18] 17 Stats Configuration 1.10.0.543 AMXX Dev Team
statscfg.am running
[ 19] 18 Restrict Weapons 1.10.0.543 AMXX Dev Team
restmenu.am running
[ 20] 19 StatsX 1.10.0.543 AMXX Dev Team
statsx.amxx running
[ 21] 20 Lite VoteBan 1.4 neygomon
lite_voteba running
[ 22] 21 Reset Score 1.0 Silenttt unknown
resetscore. running
22 plugins, 22 running
- Автор плагина
- Silenttt
- Версия плагина
- 1.0
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define adtime 600.0 //Default of 10 minuites
new pcvar_Advertise
new pcvar_Display
public plugin_init()
{
register_plugin("Reset Score", "1.0", "Silenttt")
//You may type /resetscore or /restartscore
register_clcmd("say /rs", "reset_score")
register_clcmd("say /resetscore", "reset_score")
register_clcmd("say /restartscore", "reset_score")
//This command by default will be set at 0
//Change it to 1 in server.cfg if you want
//A message to be shown to advertise this.
pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
//This command by default is also 0
//Change it to 1 in server.cfg if you want
//It to show who reset their scores when they do it
pcvar_Display = register_cvar("sv_rsdisplay", "0")
if(get_cvar_num("sv_rsadvertise") == 1)
{
set_task(adtime, "advertise", _, _, _, "b")
}
}
public reset_score(id)
{
//These both NEED to be done twice, otherwise your frags wont
//until the next round
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
if(get_pcvar_num(pcvar_Display) == 1)
{
new name[33]
get_user_name(id, name, 32)
client_print(0, print_chat, "%s обнулил свой счёт", name)
}
else
{
client_print(id, print_chat, "Ваш счёт успешно обнулён")
}
}
public advertise()
{
set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Напишите в чате /resetscore или /rs для обнуления вашего счёта")
}
public client_putinserver(id)
{
if(get_pcvar_num(pcvar_Advertise) == 1)
{
set_task(10.0, "connectmessage", id, _, _, "a", 1)
}
}
public connectmessage(id)
{
if(is_user_connected(id))
{
client_print(id, print_chat, "Напишите в чате /resetscore или /rs для обнуления вашего счёта")
}
}
Перепробовал много чего, и "^1", и "!1", и другое, вместо цветного текста в игре, просто пробелы.
В этой теме было размещено решение! Перейти к решению.