AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Hud text is now supported in csgo! (https://forums.alliedmods.net/showthread.php?t=295215)

Bulletford 03-19-2017 12:24

Hud text is now supported in csgo!
 
Found here:
https://www.reddit.com/r/csmapmakers...fc&sh=0e748dfc

Tested it myself, it works if you use the game_text entity, sourcemod hudmessage natives are still blocked.

CamerDisco 03-19-2017 13:01

Re: Hud text is now supported in csgo!
 
nice info!
I'm waiting

sneaK 03-19-2017 13:06

Re: Hud text is now supported in csgo!
 
Whoa, this is huge. Hallelujah!

Bulletford 03-19-2017 13:19

Re: Hud text is now supported in csgo!
 
Anybody interested in testing can use this code:

Anything past .7 on the X axis seems to be cut off

Code:

#include <sourcemod>
#include <sdktools>

public void OnPluginStart()
{
    RegConsoleCmd("sm_hudmessage", testmessage);
}

public Action testmessage(int client, int args)
{
        char arg1[64];
        char arg2[64];
        GetCmdArg(1, arg1, sizeof(arg1));
        GetCmdArg(2, arg2, sizeof(arg2));
        int ent = CreateEntityByName("game_text");
        DispatchKeyValue(ent, "channel", "1");
        DispatchKeyValue(ent, "color", "255 255 255");
        DispatchKeyValue(ent, "color2", "0 0 0");
        DispatchKeyValue(ent, "effect", "0");
        DispatchKeyValue(ent, "fadein", "1.5");
        DispatchKeyValue(ent, "fadeout", "0.5");
        DispatchKeyValue(ent, "fxtime", "0.25");               
        DispatchKeyValue(ent, "holdtime", "5.0");
        DispatchKeyValue(ent, "message", "this is a test message\nThis is a new line test");
        DispatchKeyValue(ent, "spawnflags", "0");       
        DispatchKeyValue(ent, "x", arg1);
        DispatchKeyValue(ent, "y", arg2);               
        DispatchSpawn(ent);
        SetVariantString("!activator");
        AcceptEntityInput(ent,"display",client);
        return Plugin_Handled;
}


Franc1sco 03-19-2017 14:04

Re: Hud text is now supported in csgo!
 
Finally! I will test it asap :)

sneaK 03-19-2017 14:37

Re: Hud text is now supported in csgo!
 
Some added information: https://developer.valvesoftware.com/wiki/Game_text

Has anyone been able to get the Text Channel (text size) to work?

Deathknife 03-19-2017 15:09

Re: Hud text is now supported in csgo!
 
Seems to support up to 6 messages at once and channels can be any int.
http://i.imgur.com/qKssSzm.png

Maxximou5 03-19-2017 15:48

Re: Hud text is now supported in csgo!
 
Nice! This was surely an unexpected pleasure.

Bulletford 03-19-2017 16:27

Re: Hud text is now supported in csgo!
 
Seems like it cuts off the right side on widescreen resolutions

Neuro Toxin 03-19-2017 16:58

Re: Hud text is now supported in csgo!
 
Yay!


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

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