Hello, I have this.
It's a hud message who appears left or right depends of the players team.
I put the up-down possition random but ocasionally they overwrite, I don't know how to explain it so I'll attach a screenshot.
The first image - 1 is what happend when two or more huds are displayed - look at the left side, up. [
http://steamcommunity.com/id/eliara/...74420292407965 ]
The second image is how I want them to be, when two or more messages are generated I want them under each other to look nice. [
http://steamcommunity.com/id/eliara/...74420292407965 ]
Screens are on steam cloud images gallery because I can't upload them, they are too large.
Code:
PHP Code:
announce(killer, level)
{
new streak = get_streak()
if (streak&1)
{
new name[32];
new PositionYforCT = random_num(0.15,0.70)
new PositionXforT = random_num(0.15,0.70)
get_user_name(killer, name, 32);
if ( cs_get_user_team(killer) == CS_TEAM_CT )
{
set_dhudmessage(0, 80, 150, 0.03, PositionYforCT, 2, 0.02, 6.0, 0.01, 0.1, 2);
show_dhudmessage(0, stkmessages[level], name);
}
else
{
set_dhudmessage(205, 92, 92, 0.80, PositionXforT, 2, 0.02, 6.0, 0.01, 0.1, 2);
show_dhudmessage(0, stkmessages[level], name);
}
}
if (streak&2)
{
client_cmd(0, "spk %s", stksounds[level]);
}
}
Sorry if this topic doesn't look attractive but I'm not english and I don't know it very well.
I hope there's the right section to ask help.