PDA

View Full Version : Other ways for hud messages?


Cr3V3TT3
04-09-2005, 17:50
I see in a cheat base a way using IMatSystemSurface::DrawColoredText() to print something like a hud message.

Is there a way to send it on clients ?

Or do you see an other way ?

[CCC]Taz-Devil
04-11-2005, 09:50
thx for the tip. me i use this
void CBCDMPlugin::HudMessage(const int Iplayer, const char *mess, const int MRed,const int MGreen,const int MBlue,const int MAlpha, const int MTime ){
if ((mess) && (Iplayer<=maxplayers) && (Iplayer>-1)){
KeyValues *kv = new KeyValues( "menu" );
kv->SetString( "title", mess);
kv->SetString( "msg", "");
kv->SetColor( "color", Color(MRed, MGreen, MBlue, MAlpha));
kv->SetInt( "level", 3);
kv->SetInt( "time", MTime);
if (Iplayer==0) {
for (int i=1;i<=maxplayers ;i++){
IPlayerInfo *playerinfo=playerinfomanager->GetPlayerInfo(engine->PEntityOfEntIndex(i));
if (playerinfo && engine->PEntityOfEntIndex(i)){
if (playerinfo->IsConnected())
helpers->CreateMessage(engine->PEntityOfEntIndex(i), DIALOG_MSG, kv, this );
}
}
} else {
IPlayerInfo *playerinfo=playerinfomanager->GetPlayerInfo(engine->PEntityOfEntIndex(Iplayer));
if (playerinfo && engine->PEntityOfEntIndex(Iplayer)){
if (playerinfo->IsConnected())
helpers->CreateMessage(engine->PEntityOfEntIndex(Iplayer), DIALOG_MSG, kv, this );
}
}
kv->deleteThis();
}
}

vancelorgin
04-11-2005, 13:53
=/ Fuck all valve plugin helpers

anything vgui is client side - put it in a plugin and it will work on only you if you host a loopback server, and only then

Geesu
04-13-2005, 02:10
I was hoping it would be possible to change the StatusText that is in the bottom left of the screen (or center) when you aim at some1... but haven't found a way yet :/