View Single Post
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 02-05-2015 , 18:21   Re: Radio Colored (Show HP)
Reply With Quote #2

Well i made this but i don't know why it appear the message of the radio when i say those cmd in Console but when i show it in the menu the message does not read well ... you can see ...

Code:
#include <amxmodx>  new sz_Aliases[21][] = {     "coverme", "takepoint", "holdpos", "regroup", "followme", "takingfire",     "go", "fallback", "sticktog", "getinpos", "stormfront", "report",     "roger", "enemyspot", "needbackup", "sectorclear", "inposition", "reportingin", "getout", "negative", "enemydown" } new szText[64]; public plugin_init() {      register_plugin("Colored Radio Messages", "1.0", "<VeCo>")          register_message(get_user_msgid("TextMsg"), "MessageHook_TextMsg")          for( new i = 0 ; i < sizeof (sz_Aliases) ; i++)         register_clcmd( sz_Aliases[i] , "Alias_Radio" ) }  public Alias_Radio( id ){     new Command[ 16 ]     read_argv ( 0, Command, charsmax ( Command ) )         for(new i = 0; i < 21; i++){         if(equal(Command, sz_Aliases[i]))         {             switch ( i ){                 case 0 : szText = " Cover me!"                 case 1 : szText = " You take the point!"                 case 2 : szText = " Hold this position"                 case 3 : szText = " Regroup team!"                 case 4 : szText = " Follow me"                 case 5 : szText = " Taking fire need assistance"                 case 6 : szText = " Go Go Go!"                 case 7 : szText = " Team Fallback"                 case 8 : szText = " Stick together team!"                 case 9 : szText = " Get in position and wait for my go"                 case 10 :szText = " Storm the front! xD ?"                 case 11 :szText = " Reporting in team"                 case 12 :szText = " Roger that"                 case 13 :szText = " Enemy spotted"                 case 14 :szText = " Need Backup!"                 case 15 :szText = " Sector Clear!"                 case 16 :szText = " I'm in position!"                 case 17 :szText = " Reporting in"                 case 18 :szText = " Get out of there , its gonna blow!"                 case 19 :szText = " Negative"                 case 20 :szText = " Enemy Down! Wohoo"             }         }     } } public MessageHook_TextMsg(iMsg,iMsgDest, id)  {      if(get_msg_args() != 5) return PLUGIN_CONTINUE          new sz_MsgType[12]          new sz_Health = get_user_health ( id )         new szName[32]     get_user_name ( id , szName , charsmax ( szName ) )         get_msg_arg_string(3, sz_MsgType,charsmax(sz_MsgType))          if(equal(sz_MsgType,"#Game_radio"))     {         new str[64]         formatex(str, charsmax (str ), "^x03%s ^x01 (RADIO) (HP: ^x03%d^x01):^x04 %s", szName , sz_Health , szText )                 set_msg_arg_string(3, str)     }         return PLUGIN_CONTINUE  }

EDIT :

Here you go i've copied some CODE from Jhob94 Script


Code:
#include <amxmodx>  new Trie:RadioDatas public plugin_init() {      register_plugin("Colored Radio Messages", "1.0", "<VeCo>")          RadioDatas = TrieCreate()     TrieSetCell(RadioDatas, "#Taking_fire"      , register_cvar("msg_takingfire"  , "Taking Fire, Save My Ass Guys!"))     TrieSetCell(RadioDatas, "#Follow_me"            , register_cvar("msg_followme"      , "Just Follow My Ass!"))     TrieSetCell(RadioDatas, "#Regroup_team"   , register_cvar("msg_regroup"        , "Guys Regroup!"))     TrieSetCell(RadioDatas, "#Hold_this_position"      , register_cvar("msg_holdposition" , "Hold This Position! I Will Shoot You If You Move!"))     TrieSetCell(RadioDatas, "#You_take_the_point"      , register_cvar("msg_takepoint"        , "You Take The Fucking Point!"))     TrieSetCell(RadioDatas, "#Cover_me"   , register_cvar("msg_coverme"        , "Cover My Fucking Ass!"))     TrieSetCell(RadioDatas, "#Report_in_team"      , register_cvar("msg_reportteam"   , "Fast! Report In Team!"))     TrieSetCell(RadioDatas, "#Storm_the_front"    , register_cvar("msg_stormfront"  , "Storm That Shit Like A Pidgeot!"))     TrieSetCell(RadioDatas, "#Get_in_position_and_wait" , register_cvar("msg_positionwait"   , "Get In Position And Fucking Wait!"))     TrieSetCell(RadioDatas, "#Stick_together_team"    , register_cvar("msg_sticktogether"   , "Guys Stick Together! I Am Fucking Afraid!"))     TrieSetCell(RadioDatas, "#Team_fall_back"      , register_cvar("msg_teamfallback" , "Guys Fall Back! NOW!"))     TrieSetCell(RadioDatas, "#Go_go_go"   , register_cvar("msg_gogogo"  , "GO! GO! GO! I Am Naruto Dattebayo!"))     TrieSetCell(RadioDatas, "#Enemy_down"         , register_cvar("msg_enemiedown"   , "I Killed This Idiots! You Can Go Now!"))     TrieSetCell(RadioDatas, "#Negative"   , register_cvar("msg_negative"      , "No Way Man!"))     TrieSetCell(RadioDatas, "#Get_out_of_there"  , register_cvar("msg_getoutthere"    , "Man Get The Fucking Out Of There!"))     TrieSetCell(RadioDatas, "#Reporting_in"   , register_cvar("msg_reportingin"    , "Reporting In!"))     TrieSetCell(RadioDatas, "#In_position"      , register_cvar("msg_inposition"  , "I Am In The Fucking Position!"))     TrieSetCell(RadioDatas, "#Sector_clear"   , register_cvar("msg_sectorclear"    , "This Sector Is Clear Like My Purse!"))     TrieSetCell(RadioDatas, "#Need_backup"      , register_cvar("msg_needbackup"  , "I Need Backup Guys! FAST!"))     TrieSetCell(RadioDatas, "#Enemy_spotted"        , register_cvar("msg_enemiespotted" , "Some Camper Is Here! Be Careful Guys!"))     TrieSetCell(RadioDatas, "#Roger_that"         , register_cvar("msg_rogerthat"        , "Roger That!"))     TrieSetCell(RadioDatas, "#Affirmative"      , register_cvar("msg_affirmative" , "Affirmative!"))         register_message(get_user_msgid("TextMsg"), "MessageHook_TextMsg")      }  public MessageHook_TextMsg(iMsg,iMsgDest, id)  {      if(get_msg_args() != 5) return PLUGIN_CONTINUE      static message[ 200 ]     static handleCvar     new str[ 100 ]         new const messageParam = 5;     new sz_Health = get_user_health ( id )         new szName[32]     get_user_name ( id , szName , charsmax ( szName ) )     get_msg_arg_string(messageParam, message, charsmax(message))         if(TrieGetCell(RadioDatas, message, handleCvar) && get_pcvar_string(handleCvar, message, charsmax(message)))     {         formatex(str, charsmax (str ), "^x03%s ^x01 (RADIO) (HP: ^x03%d^x01):^x04 %s", szName , sz_Health , message )                 set_msg_arg_string(3, str)     }         return PLUGIN_CONTINUE  }


USE THE SECOND

Last edited by Freezo Begin; 02-05-2015 at 19:01.
Freezo Begin is offline