Raised This Month: $51 Target: $400
 12% 

HUD message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ripex
New Member
Join Date: Sep 2009
Location: Bordeaux, france
Old 09-30-2009 , 08:59   HUD message
Reply With Quote #1

Hello,

I'm new to the sourcemod coding and I've a problem about hud (in cs:s)



I can't get a working one

I've tried :
PHP Code:
SetHudTextParams(-1.0, -1.01.0125525525512801.010.00.0);
ShowHudText(Client, -1"Money: $%d\nFrags: %d\nDeath: %s"Money[Client], Frags[Client], Death[Client]); 
I've also found that stock on this forum :

PHP Code:
stock SendMsg_HudMsg(clientchannelFloat:xFloat:yaRclraGclraBclraTclrbRclrbGclrbBclrbTclreffect,
                    
Float:fadeinFloat:fadeoutFloat:holdtimeFloat:fxtime, const String:szMsg[]) {
  new 
Handle:hBf;
  if (!
client)
     
hBf StartMessageAll("HudMsg");
  else 
hBf StartMessageOne("HudMsg"client);
  if (
hBf != INVALID_HANDLE)
  {
     
BfWriteByte(hBfchannel); //channel
     
BfWriteFloat(hBfx); // x ( -1 = center )
     
BfWriteFloat(hBfy); // y ( -1 = center )
     // second color
     
BfWriteByte(hBfaRclr); //r1
     
BfWriteByte(hBfaGclr); //g1
     
BfWriteByte(hBfaBclr); //b1
     
BfWriteByte(hBfaTclr); //a1 // transparent?
     // init color
     
BfWriteByte(hBfbRclr); //r2
     
BfWriteByte(hBfbGclr); //g2
     
BfWriteByte(hBfbBclr); //b2
     
BfWriteByte(hBfbTclr); //a2
     
BfWriteByte(hBfeffect); //effect (0 is fade in/fade out; 1 is flickery credits; 2 is write out)
     
BfWriteFloat(hBffadein); //fadeinTime (message fade in time - per character in effect 2)
     
BfWriteFloat(hBffadeout); //fadeoutTime
     
BfWriteFloat(hBfholdtime); //holdtime
     
BfWriteFloat(hBffxtime); //fxtime (effect type(2) used)
     
BfWriteString(hBfszMsg); //Message
     
EndMessage();
  }

and I call it with

PHP Code:
new String:hud[255];
Format(hud,254,"Money: $%d\nFrags: %d\nDeath: %s"Money[Client], Frags[Client], Death[Client]);
SendMsg_HudMsg(Client2, -1, -12552552551282552552551280,
    
0.000010.0000110.01.0hud); 
but also dont work ...


Could anyone help me please?

Thanks,

Ripex

Last edited by Ripex; 09-30-2009 at 09:02.
Ripex is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-30-2009 , 09:02   Re: HUD message
Reply With Quote #2

CSS does not have the HudMsg usermessage.
psychonic is offline
Ripex
New Member
Join Date: Sep 2009
Location: Bordeaux, france
Old 09-30-2009 , 09:09   Re: HUD message
Reply With Quote #3

Thanks for answering so fast.

Do you know ow could I display my data so? There is probably something similar or an otherway, isn't it?


Thanks,

Ripex
Ripex is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-30-2009 , 09:47   Re: HUD message
Reply With Quote #4

Quote:
Originally Posted by Ripex View Post
Do you know ow could I display my data so? There is probably something similar or an otherway, isn't it?
Nothing too similar, no. Hint text might work for you if you can fit in all the info you need to display.
psychonic is offline
Ripex
New Member
Join Date: Sep 2009
Location: Bordeaux, france
Old 09-30-2009 , 10:00   Re: HUD message
Reply With Quote #5

Well tranks, I'll have a try.
Ripex is offline
Reply



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 01:21.


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