/* This plugin is made so normal players can print up messages to people but the * message only stays up for half the time as a admin message does this is so * everyone on the server can have a sence of power */ #include <core> #include <console> #include <string> #include <admin> #include <adminlib> #define ACCESS_MSAY ACCESS_VOTE_KICK #define ACCESS_TMSAY ACCESS_VOTE_KICK new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.0"; public admin_msay(HLCommand,HLData,HLUserName,UserIndex) { new Data[MAX_DATA_LENGTH]; new Text[MAX_TEXT_LENGTH]; new User[MAX_NAME_LENGTH]; convert_string(HLData,Data,MAX_DATA_LENGTH); convert_string(HLUserName,User,MAX_NAME_LENGTH); snprintf(Text, MAX_TEXT_LENGTH, "Message from (%s): %s", User, Data); centersay(Text,5,0,500,0); return PLUGIN_HANDLED; } public admin_tmsay(HLCommand,HLData,HLUserName,UserIndex) { new Data[MAX_DATA_LENGTH]; new Text[MAX_TEXT_LENGTH]; new User[MAX_NAME_LENGTH]; convert_string(HLData,Data,MAX_DATA_LENGTH); convert_string(HLUserName,User,MAX_NAME_LENGTH); snprintf(Text, MAX_TEXT_LENGTH, "Message from (%s): %s", User, Data); typesay(Text,5,0,500,0); return PLUGIN_HANDLED; } public plugin_init() { plugin_registerinfo("Admin Message Plugin For Players","Gives Any Player Access To This Command",STRING_VERSION); plugin_registercmd("admin_msay","admin_msay",ACCESS_MSAY,"admin_msay <message> : Prints a message to everyone from a client"); plugin_registercmd("admin_tmsay","admin_tmsay",ACCESS_TMSAY,"admin_msay : Sends a message to everyone in typesay form"); return PLUGIN_CONTINUE; }