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

>> CSGO Center Print


Post New Thread Reply   
 
Thread Tools Display Modes
ecca
Sexy Santa
Join Date: Jan 2011
Old 07-29-2015 , 10:32   Re: >> CSGO Center Print
Reply With Quote #11

I know other games support center messages, but i've never got it to work in csgo. Even when i tried your script, it won't print it center just in hintbox and chat.

I even tried a loop for the sake, didn't get a center message

PHP Code:
for (new i=1<= 1000i++) {
    
PrintValveTranslationToAll(i"#SFUI_Notice_Alert_Freeze_Pause"); 

Quote:
Originally Posted by Dr. Api View Post
I saw a hunger game server with a message a the top and this message was shaking and changing color too.
Usermessage should do the trick.
Maybe an overlay?
__________________

Last edited by ecca; 07-29-2015 at 10:39.
ecca is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-29-2015 , 10:46   Re: >> CSGO Center Print
Reply With Quote #12

Quote:
Originally Posted by Powerlord View Post
Whoops, it's "msg_dst" instead of msg_dest in CS:GO.

Probably a typo from when I originally wrote it.
Now works but the msg not appear in the center like in the video but can appear in the say chat, in the hint text and in the console text.

Also I tested with
Code:
PrintValveTranslationToOne(client, 0, "#SFUI_Notice_Alert_Match_Restarting");
PrintValveTranslationToOne(client, 5, "#SFUI_Notice_Alert_Match_Restarting");
PrintValveTranslationToOne(client, 6, "#SFUI_Notice_Alert_Match_Restarting");
And nothing appear

EDIT:
and with
Code:
	new number = 7;
	while(number < 100)
	{
		PrintValveTranslationToOne(client, number, "#SFUI_Notice_Alert_Match_Restarting");
		number++;
	}
Nothing appear
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 07-29-2015 at 10:50.
Franc1sco is offline
Send a message via MSN to Franc1sco
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 07-29-2015 , 11:36   Re: >> CSGO Center Print
Reply With Quote #13

See what I found:

PHP Code:
//=============================================================================
// CStrike15 User Messages
//=============================================================================
enum ECstrike15UserMessages

    
CS_UM_HudText        4;
    
CS_UM_TextMsg        7;
    
CS_UM_HudMsg        8;
}
message CCSUsrMsg_HudText
{
    
optional string text 1;
}
message CCSUsrMsg_TextMsg
{
    
optional int32 msg_dst 1;
    
repeated string params 3;
}
message CCSUsrMsg_HudMsg
{
    
optional int32 channel 1;
    
optional CMsgVector2D pos 2;
    
optional CMsgRGBA clr1 3;
    
optional CMsgRGBA clr2 4;
    
optional int32 effect 5;
    
optional float fade_in_time 6;
    
optional float fade_out_time 7;
    
optional float hold_time 9;
    
optional float fx_time 10;
    
optional string text 11


Last edited by claudiuhks; 07-29-2015 at 12:00.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 08-01-2015 , 01:15   Re: >> CSGO Center Print
Reply With Quote #14

Quote:
Originally Posted by claudiuhks View Post
See what I found:

PHP Code:
//=============================================================================
// CStrike15 User Messages
//=============================================================================
enum ECstrike15UserMessages

    
CS_UM_HudText        4;
    
CS_UM_TextMsg        7;
    
CS_UM_HudMsg        8;
}
message CCSUsrMsg_HudText
{
    
optional string text 1;
}
message CCSUsrMsg_TextMsg
{
    
optional int32 msg_dst 1;
    
repeated string params 3;
}
message CCSUsrMsg_HudMsg
{
    
optional int32 channel 1;
    
optional CMsgVector2D pos 2;
    
optional CMsgRGBA clr1 3;
    
optional CMsgRGBA clr2 4;
    
optional int32 effect 5;
    
optional float fade_in_time 6;
    
optional float fade_out_time 7;
    
optional float hold_time 9;
    
optional float fx_time 10;
    
optional string text 11

I tested hudmsg using a similar stock like this but dont work

EDIT:

My test code
PHP Code:
#include <sourcemod> 

public OnPluginStart() 

    
RegConsoleCmd("sm_testa"Testa); 


public 
Action:Testa(clientargs

    
HudMsgCsgo(client1, -1.0, -0.85, {0,255,255,255}, {0,255,255,255}, 01.01.04.14.1"Fran mola")
}  

stock HudMsgCsgo(clientchannelFloat:xFloat:y, const firstcolor[4], const secondcolor[4], effectFloat:fadeinFloat:fadeoutFloat:holdtimeFloat:fxtime, const String:msg[])
{
    new 
Handle:hudhandle INVALID_HANDLE;
    
    if(
client == 0hudhandle StartMessageAll("HudMsg");
    else 
hudhandle StartMessageOne("HudMsg"client);
    
    new 
String:texte[255];
    
VFormat(textesizeof(texte), msg13);
    
    if(
hudhandle != INVALID_HANDLE)
    {
        
PbSetInt(hudhandle"channel"channel);
        
        new 
Float:pos[2]; pos[0] = xpos[1] = y;
        
        
PbSetVector2D(hudhandle"pos"pos);
        
PbSetColor(hudhandle"clr1"firstcolor);
        
PbSetColor(hudhandle"clr2"secondcolor);
        
PbSetInt(hudhandle"effect"effect);
        
        
PbSetFloat(hudhandle"fade_in_time"fadein);
        
PbSetFloat(hudhandle"fade_out_time"fadeout);
        
PbSetFloat(hudhandle"hold_time"holdtime);
        
PbSetFloat(hudhandle"fx_time"fxtime);
        
        
PbSetString(hudhandle"text"msg);
        
        
EndMessage();
    }

No log errors but nothing appear
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 08-01-2015 at 01:24.
Franc1sco is offline
Send a message via MSN to Franc1sco
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 08-12-2015 , 11:47   Re: >> CSGO Center Print
Reply With Quote #15

Any progress on this ?
ImACow is offline
pronominal
Junior Member
Join Date: Jan 2015
Old 07-19-2016 , 07:52   Re: >> CSGO Center Print
Reply With Quote #16

Not possible until valve fixes this in the client.dll
Source: https://github.com/ValveSoftware/csg...nux/issues/657
pronominal 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 11:45.


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