Raised This Month: $ Target: $400
 0% 

[Solved] Fake Radio Command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 12-18-2013 , 21:14   [Solved] Fake Radio Command
Reply With Quote #1

I got 2 questions ..

1. How can i generate a Fake Radio command?
Eg : Player (Radio) : Something ..

2. How to make a command coloured?
Eg : Player(<Green>Radio) : Something..
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then

Last edited by devilicioux; 12-18-2013 at 22:58. Reason: Solved
devilicioux is offline
shaliwahan
Member
Join Date: Aug 2011
Old 12-18-2013 , 21:58   Re: Fake Radio Command
Reply With Quote #2

Edit:
Here you go -

PHP Code:
formatex(szFormatcharsmax(szFormat), "%L"LANG_PLAYER"C4_ARMED_RADIO"iC4Timer)

    for(new 
1<= g_iMaxPlayersi++)
    {
        if(
g_iTeam[i] == g_iTeam[id] && !g_bBot[id])
        {
            
/* fully fake hookable radio message and event */

            
emessage_begin(MSG_ONEgMsg_TextMsg_i)
            
ewrite_byte(3)
            
ewrite_string("#Game_radio")
            
ewrite_string(szName)
            
ewrite_string(szFormat)
            
emessage_end()

            
emessage_begin(MSG_ONEgMsg_SendAudio_i)
            
ewrite_byte(id)
            
ewrite_string("%!MRAD_BLOW")
            
ewrite_short(100)
            
emessage_end()
        }
    } 

Last edited by shaliwahan; 12-18-2013 at 22:17. Reason: Snippet added.
shaliwahan is offline
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 12-18-2013 , 22:37   Re: Fake Radio Command
Reply With Quote #3

Awesome Ty First Solved .. But Still Stuck on 2nd .. Any Suggestions ?

PHP Code:
emessage_begin(MSG_BROADCASTgMsg_TextMsg_,0)
ewrite_byte(3)
ewrite_string("#Game_radio")
ewrite_string(szName)
ewrite_string(szFormat)
emessage_end() 
Edit : Tested and works fine.. Suggestions for making Radio Coloured ?
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then

Last edited by devilicioux; 12-18-2013 at 22:40.
devilicioux is offline
shaliwahan
Member
Join Date: Aug 2011
Old 12-18-2013 , 22:53   Re: Fake Radio Command
Reply With Quote #4

Quote:
Originally Posted by devilicioux View Post
Still Stuck on 2nd .. Any Suggestions ?
Haven't seen anyone do that through emessage.

You got the concept then use it with this
PHP Code:
msg_saytext(idtext[]) {
    
message_begin(MSG_ONEg_msgid_saytext_id)
    
write_byte(id)
    
write_string(text)
    
message_end()

shaliwahan is offline
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 12-18-2013 , 22:57   Re: Fake Radio Command
Reply With Quote #5

I did Check Info Zone Source for how it was printing a certain part of message as coloured ..Your way matches that So may be thats the solution.. Will give it a try ASAP and respond.. By the way Tysm
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then
devilicioux is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-19-2013 , 04:10   Re: [Solved] Fake Radio Command
Reply With Quote #6

Correct way is with TextMsg, not SayText, but you can do as you want.

PHP Code:
// czero\resource\czero_english.txt for real format
// "Game_radio"                    "^2%%s1 (RADIO): %%s2"
// "Game_radio_location"                "^3%%s1^1 @ ^3%%s2^1 (RADIO): %%s3"

{
    
emessage_begin(MSG_ONEgmsgTextMsg, .player=iPlayer)
    
ewrite_byte(PRINT_RADIO// PRINT_RADIO = 5
    
ewrite_string(szId// player index converted to string
    
ewrite_string("^3%%s1^1 @ ^3%%s2^1 (RADIO): %%s3"
    
ewrite_string(szName// %%1 is replaced with this string
    
ewrite_string(szLocation// %%2 is replaced with this string
    
ewrite_string(szMessage// %%3 is replaced with this string
    
emessage_end()

You can make an idea reading following plugin's source : http://forums.alliedmods.net/showthread.php?p=573867


Anyway, if you use amxx1.8.3, i suggest to only use client_print_color native.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 20:42.


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