/**
* Source:
* http://c-s.net.ua/forum/index.php?showtopic=54004
*/
#include <amxmodx>
#define PLUGIN "Block 'Fire in the hole!'"
#define VERSION "0.1"
#define AUTHOR "Safety1st"
public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR )
register_message( get_user_msgid( "TextMsg" ), "TextMsgHandler" )
}
public TextMsgHandler( msgid, dest, receiver ) {
#define ARG_DESTINATION_TYPE 1
#define print_radio 5
#define ARG_RADIO_STRING 5
static const szFireInTheHole[] = "#Fire_in_the_hole"
static szMsg[18]
if( get_msg_arg_int(ARG_DESTINATION_TYPE) != print_radio )
return PLUGIN_CONTINUE
get_msg_arg_string( ARG_RADIO_STRING, szMsg, charsmax(szMsg) )
if( !strcmp( szMsg, szFireInTheHole ) )
return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
/**
* Some typical radio messages:
*
* MessageBegin (TextMsg "77") (Destination "One<1>") (Args "5") (Entity "1")
* Arg 1 (Byte "5")
* Arg 2 (String "1")
* Arg 3 (String "#Game_radio")
* Arg 4 (String "Player Nick")
* Arg 5 (String "#Fire_in_the_hole")
* MessageEnd (TextMsg "77")
*
* MessageBegin (TextMsg "77") (Destination "One<1>") (Args "5") (Entity "1")
* Arg 1 (Byte "5")
* Arg 2 (String "1")
* Arg 3 (String "#Game_radio")
* Arg 4 (String "Player Nick")
* Arg 5 (String "#Go_go_go")
* MessageEnd (TextMsg "77")
*/