Raised This Month: $ Target: $400
 0% 

[Question] What about HUD messages/channels ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 03-19-2007 , 10:34   Re: [Question] What about HUD messages/channels ?
Reply With Quote #2

try this one.
Code:
// "HudMsg" message
stock SendMsg_HudMsg(client, channel, 
                    Float:x, Float:y, 
                    aRclr, aGclr, aBclr, aTclr, 
                    bRclr, bGclr, bBclr, bTclr, 
                    effect, 
                    Float:fadein, Float:fadeout, 
                    Float:holdtime, Float:fxtime, 
                    const String:szMsg[])
{
  new Handle:hBf;
  if (!client)
     hBf = StartMessageAll("HudMsg");
  else hBf = StartMessageOne("HudMsg", client);
  if (hBf != INVALID_HANDLE)
  {
     BfWriteByte(hBf, channel); //channel
     BfWriteFloat(hBf, x); // x ( -1 = center )
     BfWriteFloat(hBf, y); // y ( -1 = center )
     // second color
     BfWriteByte(hBf, aRclr); //r1
     BfWriteByte(hBf, aGclr); //g1
     BfWriteByte(hBf, aBclr); //b1
     BfWriteByte(hBf, aTclr); //a1 // transparent?
     // init color
     BfWriteByte(hBf, bRclr); //r2
     BfWriteByte(hBf, bGclr); //g2
     BfWriteByte(hBf, bBclr); //b2
     BfWriteByte(hBf, bTclr); //a2
     BfWriteByte(hBf, effect); //effect (0 is fade in/fade out; 1 is flickery credits; 2 is write out)
     BfWriteFloat(hBf, fadein); //fadeinTime (message fade in time - per character in effect 2)
     BfWriteFloat(hBf, fadeout); //fadeoutTime
     BfWriteFloat(hBf, holdtime); //holdtime
     BfWriteFloat(hBf, fxtime); //fxtime (effect type(2) used)
     BfWriteString(hBf, szMsg); //Message
     EndMessage();
  }
}

if you using for CSS note this:
Code:
L. DukeNov 16 2006, 07:48 PM
HudMsg allows text to be printed anywhere on the screen with a specified color. This needs to be added to the fonts section of ClientScheme.res:
 
CenterPrintText
{
   "1"
   {
      "name" "Trebuchet MS"
      "tall" "14"
      "weight" "600"
      "range" "0x0000 0x007F" // Basic Latin
      "antialias" "1"
      "additive" "1"
   }
}
 
This is missing in CSS and DODS. I'm not sure about the MP SDK. 
__________________
QQ31537639

Last edited by jopmako; 03-19-2007 at 10:37.
jopmako is offline
Send a message via MSN to jopmako
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode