/* * Bud-froggy Productions -- July 22nd, 2001 * Bomb Announcer® * * Announces Bomb planting * * Place in logd_ */ #include <core> #include <console> #include <string> #include <admin> #include <adminlib> #define ACCESS_CONSOLE 131072 new STRING_VERSION[MAX_DATA_LENGTH] = "v1"; public logd_bombsay(HLCommand,HLData,HLUserName,UserIndex) { new Data[MAX_DATA_LENGTH]; new Message[MAX_TEXT_LENGTH]; new sID[MAX_DATA_LENGTH]; convert_string(HLData, Data, MAX_DATA_LENGTH); strbreak(Data, sID, Data, MAX_DATA_LENGTH); if(strcmp(Data, "Planted_The_Bomb") == 0) { new Name[MAX_NAME_LENGTH]; new iID = strtonum( sID ); if( !playerinfo(iID,Name,MAX_NAME_LENGTH) ) { return PLUGIN_FAILURE; } snprintf(Message, MAX_TEXT_LENGTH, "%s set us up the bomb!!!", Name); centersay(Message, 12, 10, 255, 255); } return PLUGIN_HANDLED; } public plugin_init() { plugin_registerinfo("Bomb Planting Announcer","Announces who planted the bomb.",STRING_VERSION); plugin_registercmd("logd_bombsay", "logd_bombsay", ACCESS_CONSOLE, ""); exec( "logd_reg 60 admin_command logd_bombsay" ); return PLUGIN_CONTINUE; }