AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   [CSS] Add the hud capibilities! (https://forums.alliedmods.net/showthread.php?t=182929)

Mitchell 04-15-2012 10:58

[CSS] Add the hud capibilities!
 
Even though i added the clientschemes update to the client, and server, i am still unable to show the hud using:
PHP Code:

            new Handle:hHudText CreateHudSynchronizer();
            
SetHudTextParams(-1, -11.0255002550);
            
ShowSyncHudText(xhHudText"Mitch Was Here");
            
CloseHandle(hHudText); 

On the end i think its sourcemod, in the docs it says that its on supported games such as TF2, HL2MP, and SourceForts. Now what im asking is to add CSS to that list.

TnTSCS 04-15-2012 11:04

Re: [CSS] Add the hud capibilities!
 
I don't think I've ever seen a CS:S server with that capability (without the use of third party software, like the ESEA client or Mumble).

Here's psychonic's reply to this issue: http://forums.alliedmods.net/showpos...8&postcount=14

So, I guess if your clients manually edit some (unknown by me) files locally, they won't see it - but if they edit the files then they'll be able to see it

After seeing Bacardi's reply, it will simply fail on CS:S

Bacardi 04-15-2012 11:07

Re: [CSS] Add the hud capibilities!
 
ShowSyncHudText
Quote:

Originally Posted by ShowSyncHudText
Notes: Shows a synchronized HUD message to a client. As of this writing, only TF, HL2MP, and SourceForts support HUD Text.

Return: -1 on failure, anything else on success. This function fails if the mod does not support it.



*edit
Here some hud things.
https://developer.valvesoftware.com/wiki/HudLayout.res

Mitchell 04-15-2012 12:14

Re: [CSS] Add the hud capibilities!
 
CSS IS Supported though, but sourcemod blocks it because it thinks its not.

Mitchell 04-15-2012 12:17

Re: [CSS] Add the hud capibilities!
 
Quote:

Originally Posted by TnTSCS (Post 1689643)
Here's psychonic's reply to this issue: http://forums.alliedmods.net/showpos...8&postcount=14

Quote:

Originally Posted by Mitchell (Post 1689637)
i added the clientschemes update to the client, and server, i am still unable to show the hud

andd...
Quote:

Originally Posted by Bacardi (Post 1689646)

Quote:

Originally Posted by Mitchell (Post 1689637)
the docs it says that its on supported games such as TF2, HL2MP, and SourceForts. Now what im asking is to add CSS to that list.

I already know about these issues.

Mitchell 04-15-2012 12:56

Re: [CSS] Add the hud capibilities!
 
I got it working

minimoney1 04-15-2012 13:11

Re: [CSS] Add the hud capibilities!
 
Quote:

Originally Posted by Mitchell (Post 1689715)

Oh wow, how did you do it?

RedSword 04-15-2012 13:26

Re: [CSS] Add the hud capibilities!
 
Quote:

Originally Posted by Mitchell (Post 1689715)

I'm curious as well :3. Example please.

Dr!fter 04-15-2012 13:41

Re: [CSS] Add the hud capibilities!
 
IIRC its in https://forums.alliedmods.net/showthread.php?t=122946 or used to be. Its a simple usermessage. As for the changes needed to the clientschema.res (or w/e it is) look at the tf2 one. They flat out refused to add it for cs:s

Mitchell 04-15-2012 13:43

Re: [CSS] Add the hud capibilities!
 
1 Attachment(s)
orrrr:
PHP Code:


new Colorz;

public 
OnPluginStart()
{
    
CreateTimer(0.1Timer_Update_TIMER_REPEAT);
    
Colorz 0;
}

public 
Action:Timer_Update(Handle:timer
{
    
    for (new 
1<= MaxClientsx++)
    {
        if (
IsClientInGame(x) && IsPlayerAlive(x))
        {
            if(
Colorz== 0)
                
SendMsg_HudMsg(x1, -1.0, -0.85255002550255025500.050.050.10.1"Mitch Was Here");
            if(
Colorz == 1)
                
SendMsg_HudMsg(x1, -1.0, -0.85025502550025525500.050.050.10.1"Mitch Was Here");
            if(
Colorz == 2)
                
SendMsg_HudMsg(x1, -1.0, -0.85002552552550025500.050.050.10.1"Mitch Was Here");
            
Colorz += 1;
            if(
Colorz 2)
                
Colorz 0;
            
        }
    }
}
// "HudMsg" message
stock SendMsg_HudMsg(clientchannel
                    
Float:xFloat:y
                    
aRclraGclraBclraTclr
                    
bRclrbGclrbBclrbTclr
                    
effect
                    
Float:fadeinFloat:fadeout
                    
Float: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();
  }



Quote:

Originally Posted by Dr!fter (Post 1689755)
They flat out refused to add it for cs:s

Do you have a topic where they said they refused to add it in?


All times are GMT -4. The time now is 20:52.

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