Raised This Month: $32 Target: $400
 8% 

[CS:GO] Issues with radio messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trum
AlliedModders Donor
Join Date: Jan 2017
Old 05-11-2020 , 04:10   [CS:GO] Issues with radio messages
Reply With Quote #1

Hay, so I'm trying to get the actual part of the radio message by hooking the RadioText event:


But I'm running into some issues while printing it, this is the output I get:


This is the code I'm using and according to this post it worked for him as he described, I'm using this site to find the structure of radio messages.

PHP Code:
public void OnPluginStart() 
{
    
HookUserMessage(GetUserMessageId("RadioText"), Event_RadioMsgtrue);
}

public 
Action Event_RadioMsg(UserMsg msg_idHandle bf, const int[] playersint playersNumbool reliablebool init)
{
    if(
GetUserMessageType() == UM_Protobuf)
    {
        
PbReadString(bf"msg_name"g_Message512);

        
PrintToServer("%s"g_Message);
    }
    else
    {
        
BfReadString(bfg_Message64);
    }

    return 
Plugin_Continue;

Does someone know how I can print "Roger that!" in the chat and not "@ (RADIO): "?
Trum is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-11-2020 , 04:35   Re: [CS:GO] Issues with radio messages
Reply With Quote #2

Can you tell more specific...

Do you want block and/or change original RadioText ?

Do you want create RadioText and print out ?

Do you want radio command be a CHAT message ?

*edit
or you want player use radio command ?
FakeClientCommandEx(client, "roger");
__________________
Do not Private Message @me

Last edited by Bacardi; 05-11-2020 at 04:38.
Bacardi is offline
Trum
AlliedModders Donor
Join Date: Jan 2017
Old 05-11-2020 , 04:44   Re: [CS:GO] Issues with radio messages
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
Can you tell more specific...

Do you want block and/or change original RadioText ?

Do you want create RadioText and print out ?

Do you want radio command be a CHAT message ?

*edit
or you want player use radio command ?
FakeClientCommandEx(client, "roger");
I would like to block all default radio messages and make my own custom, but for that I need to get the radio command that the client is executing, example; "Roger that!", "Negative", "Go go go!".

And when someone is executing a radio command my custom message will be sent instead of the default one.

Last edited by Trum; 05-11-2020 at 05:13.
Trum is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-11-2020 , 05:20   Re: [CS:GO] Issues with radio messages
Reply With Quote #4

Here is example of blocking radio command, before it start create UserMessage.
https://forums.alliedmods.net/showthread.php?p=2690841

You can edit so, it print chat message. Just check which command string it is.
__________________
Do not Private Message @me
Bacardi is offline
Trum
AlliedModders Donor
Join Date: Jan 2017
Old 05-11-2020 , 08:04   Re: [CS:GO] Issues with radio messages
Reply With Quote #5

Yeah that method worked, thanks and thanks too the people also helping out in the Discord
Trum 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 21:24.


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