PHP Code:
/* Copyright by KaLoSZyFeR */
#include <amxmodx>
#define PLUGIN "Block Messages"
#define VERSION "0.1"
#define AUTHOR "KaLoSZyFeR"
#define AMOUNT 128 // amount of texts in tables or something (I don't know how it is in english)
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_message(get_user_msgid("TextMsg"), "message")
}
new text[AMOUNT][] = {
"#Target_Bombed",
"#VIP_Escaped",
"#VIP_Assassinated",
"#Terrorists_Escaped",
"#CTs_PreventEscape",
"#Escaping_Terrorists_Neutralized",
"#Bomb_Defused",
"#CTs_Win",
"#Terrorists_Win",
"#Round_Draw",
"#All_Hostages_Rescued",
"#Target_Saved",
"#Hostages_Not_Rescued",
"#Terrorists_Not_Escaped",
"#VIP_Not_Escaped",
"#Cannot_Buy_This",
"#Not_Enough_Money",
"#Weapon_Not_Available",
"#Already_Have_Kevlar",
"#Already_Have_Kevlar_Helmet",
"#Already_Have_Kevlar_Bought_Helmet",
"#Already_Have_Helmet_Bought_Kevlar",
"#Cannot_Carry_Anymore",
"#Already_Have_One",
"#Cannot_Switch_From_VIP",
"#All_Teams_Full",
"#Terrorists_Full",
"#CTs_Full",
"#Too_Many_Terrorists",
"#Too_Many_CTs",
"#Wait_3_Seconds",
"#Only_1_Team_Change",
"#Ignore_Broadcast_Messages",
"#Ignore_Broadcast_Team_Messages",
"#Accept_All_Messages",
"#Ignore_Radio",
"#Accept_Radio",
"#Command_Not_Available",
"#Defusing_Bomb_With_Defuse_Kit",
"#Defusing_Bomb_Without_Defuse_Kit",
"#Killed_Hostage",
"#Injured_Hostage",
"#Auto_Team_Balance_Next_Round",
"#All_VIP_Slots_Full",
"#Killed_Teammate",
"#Banned_For_Killing_Teammates",
"#Cannot_Vote_Map",
"#Weapon_Cannot_Be_Dropped",
"#Terrorist_Escaped",
"#C4_Plant_At_Bomb_Spot",
"#C4_Plant_Must_Be_On_Ground",
"#C4_Arming_Cancelled",
"#Bomb_Planted",
"#C4_Activated_At_Bomb_Spot",
"#Switch_To_BurstFire",
"#Switch_To_SemiAuto",
"#Switch_To_FullAuto", /* TUTAJ KONIEC */
"#GAMESAVED",
"#Game_Commencing",
"#Game_connected",
"#Game_disconnected",
"#Game_join_terrorist",
"#Game_join_ct",
"#Game_join_terrorist_auto",
"#Game_join_ct_auto",
"#Game_scoring",
"#Game_idle_kick",
"#Game_bomb_drop",
"#Game_bomb_pickup",
"#Game_no_timelimit",
"#Game_timelimit",
"#Game_unknown_command",
"#Game_in_position",
"#Game_added_position",
"#Game_teammate_kills",
"#Game_required_votes",
"#Game_teammate_attack",
"#Game_kicked",
"#Game_vote_cast",
"#Game_vote_usage",
"#Game_vote_player_not_found",
"#Game_vote_players_on_your_team",
"#Game_vote_not_yourself",
"#Game_voted_for_map",
"#Game_votemap_usage",
"#Cannot_Vote_Need_More_People",
"#Map_Vote_Extend",
"#Cannot_Vote_With_Less_Than_Three",
"#Game_will_restart_in", /* TUTAJ KONIEC DRUGIEJ CZESCI */
"#Cant_buy",
"#VIP_cant_buy",
"#CT_cant_buy",
"#Terrorist_cant_buy",
"#Vote",
"#Votes", /* TUTAJ KONIEC TRZECIEJ CZESCI */
"#Got_defuser",
"#Got_bomb",
"#Cannot_Be_Spectator",
"#Muted",
"#Unmuted",
"#No_longer_hear_that_player",
"#Name_change_at_respawn",
"#C4_Defuse_Must_Be_On_Ground",
"#Spec_Mode1",
"#Spec_Mode2",
"#Spec_Mode3",
"#Spec_Mode4",
"#Spec_Mode5",
"#Spec_Mode6",
"#Spec_NoTarget",
"#Spec_Help_Title",
"#Spec_Slow_Motion",
"#Spec_Replay",
"#Spec_Auto",
"#Spec_Time",
"#Spec_Map",
"#Spectators",
"#Unassigned",
"#Only_CT_Can_Move_Hostages",
"#Spec_Duck",
"#Spec_Not_Valid_Choice",
"#Spec_Not_In_Spectator_Mode",
"#Spec_NoPlayers",
"#Spec_ListPlayers",
"#Selection_Not_Available",
"#Alias_Not_Avail",
"#Spec_No_PIP",
"#Cstrike_Already_Own_Weapon"
}
public message()
{
if(get_msg_argtype(2) != ARG_STRING)
{
return PLUGIN_CONTINUE
}
new arg2[32]
get_msg_arg_string(2, arg2, 31)
if(get_msg_args() == 4 )
{
new arg3[20],arg4[20]
get_msg_arg_string(3, arg3, 19)
get_msg_arg_string(4, arg4, 19)
for(new i = 0; i < AMOUNT; i++)
{
if(equal(arg2, text[i]))
{
return PLUGIN_HANDLED
}
}
}
else if(get_msg_args() == 3 )
{
new arg3[20]
get_msg_arg_string(3, arg3, 19)
for(new i = 0; i < AMOUNT; i++)
{
if(equal(arg2, text[i]))
{
return PLUGIN_HANDLED
}
}
}
else
{
for(new i = 0; i < AMOUNT; i++)
{
if(equal(arg2, text[i]))
{
return PLUGIN_HANDLED
}
}
}
return PLUGIN_CONTINUE
}