Сперва находим в gamedata\scripts\bind_stalker.script вот эту функцию
--[[ --' Вывод сообщения о большой радиации if self.object.radiation >= 0.7 then local hud = get_hud() local custom_static = hud:GetCustomStatic("cs_radiation_danger") if custom_static == nil then hud:AddCustomStatic("cs_radiation_danger", true) hud:GetCustomStatic("cs_radiation_danger"):wnd():TextControl():SetTextST("st_radiation_danger") end else local hud = get_hud() local custom_static = hud:GetCustomStatic("cs_radiation_danger") if custom_static ~= nil then hud:RemoveCustomStatic("cs_radiation_danger") end end ]]-- И после неё пишем
----------------------------------------------------------------------------------------------------------- --' Вывод сообщения о малом ХП автор - Akella-96 aka SvD if self.object.health <= 0.3 then local hud = get_hud() local custom_static = hud:GetCustomStatic("cs_health_danger") if custom_static == nil then hud:AddCustomStatic("cs_health_danger", true) hud:GetCustomStatic("cs_health_danger"):wnd():TextControl():SetTextST("st_health_danger") end else local hud = get_hud() local custom_static = hud:GetCustomStatic("cs_health_danger") if custom_static ~= nil then hud:RemoveCustomStatic("cs_health_danger") end end ---------------------------------------------------------------------------------------------------------- Потом идем в gamedata\configs\ui\ui_custom_msgs.xml и в самом начале пишем
<cs_health_danger x="262" y="50" width="500" height="20" complex_mode="1"> <text font="graffiti22" r="255" g="0" b="0" a="255" align="c"/> </cs_health_danger> Далее идем в gamedata\configs\text\rus\ui_st_screen.xml в самый конец, перед </string_table> добавляем
<string id="st_health_danger"> <text>У вас мало здоровья! Примите аптечку!</text> </string> Все. Теперь при состоянии здоровья, меньшего 30% будет выводиться сообщение.
|