/* Plugin_adminmessage Written by Shady Milkman, concept by Kleen13 */ #include <core> #include <console> #include <string> #include <admin> #include <adminlib> #include <sound> new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.0"; new Message[MAX_TEXT_LENGTH]; public admin_message(HLCommand, HLData, HLUserName, UserIndex) { new Data[MAX_DATA_LENGTH]; convert_string(HLData, Data, MAX_DATA_LENGTH); strcpy(Message,Data,MAX_TEXT_LENGTH); /* put the message.wav folder in <moddir>\sounds\misc */ playsoundall("misc\message.wav"); set_timer("say_message",2,0); } public say_message(){ centersay(Message,10,0,255,0); } public plugin_init() { plugin_registerinfo("Message Plugin","Plays a sound and gives a message.",STRING_VERSION); plugin_registercmd("admin_message","admin_message",ACCESS_KICK,"admin_message <msg> : Tells everybody to get the hell out..."); return PLUGIN_CONTINUE; }