So, the latest update fixes game_text for CS:GO, after almost 5 years. Hammer still doesn't support the newline in game_texts though and crashes out.
But you can use a hex editor on the bsp to insert a newline character in texts, and they work just fine in-game!
Source: https://www.reddit.com/r/csmapmakers/comments/609roe/game_text_works_for_csgo_including_multiline/?st=j0go5mfc&sh=0e748dfc
[CSGO] New Custom HUD (game_text)
Re: [CSGO] New Custom HUD (game_text)
Nice find! Glad they finally got this working. The following is a working example using the messages package:
Syntax: Select all
from colors import BLUE, RED
from events import Event
from messages import HudMsg
from players.entity import Player
team_messages = {
2: HudMsg(
message='HudMsg test message for Terrorists',
x=0.2,
y=0.2,
color1=RED,
),
3: HudMsg(
message='HudMsg test message for CTs',
x=0.2,
y=0.2,
color1=BLUE,
),
}
@Event('player_say')
def _test_hudmsg(game_event):
player = Player.from_userid(game_event['userid'])
if player.team in team_messages:
team_messages[player.team].send(player.index)
-
- Junior Member
- Posts: 11
- Joined: Wed Apr 27, 2016 11:54 am
Re: [CSGO] New Custom HUD (game_text)
Is there a way to change the size of the font? Based on valve's wiki, the size would be different based on the channel, but it might not work on csgo.
Re: [CSGO] New Custom HUD (game_text)
It seems that bit is still broken, but at least they're working on it: https://github.com/ValveSoftware/csgo-o ... ssues/1351
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 42 guests