/* * Fsay v1.0beta (May 19th, 2002) * * Author: <[NN]>Soul (sefanja_severin@hotmail.com, http://nn.kicks-ass.net/) * * Show a nice finger along with your message. * * * * Commands: * admin_fsay [color] <msg>: like admin_csay, but preceeded by a nice ASCII-art middle finger ;) * */ #include <core> #include <console> #include <string> #include <admin> #include <adminlib> new STRING_VERSION[MAX_DATA_LENGTH] = "1.0beta"; /* * * * * * * * * * * * * Admin Mod Functions * * * * * * * * * * * * */ public admin_fsay(HLCommand,HLData,HLUserName,UserIndex) { // Description of this function: Show the message with a finger // - Add a finger to the user's message // - Check if the user has specified a color (default color is white) // - Display the message // - Log the action new Command[MAX_COMMAND_LENGTH]; new Data[MAX_DATA_LENGTH]; new User[MAX_NAME_LENGTH]; new Message[MAX_DATA_LENGTH]; // Message as sent by the user new Color[MAX_DATA_LENGTH]; // Optional color of the message new fMessage[MAX_DATA_LENGTH]; // Message, preceeded by some sort of finger? convert_string(HLCommand,Command,MAX_COMMAND_LENGTH); convert_string(HLData,Data,MAX_DATA_LENGTH); convert_string(HLUserName,User,MAX_NAME_LENGTH); strbreak(Data, Color, Message, MAX_DATA_LENGTH); snprintf(fMessage, MAX_DATA_LENGTH, "_\n| |\n_| |_\n/ | | | |-.\n ( )\n\n%s", Message); if ( streq(Color,"red") ) { centersay(fMessage, 10, 250,10,10); } else if ( streq(Color,"blue") ) { centersay(fMessage, 10, 10,10,250); } else if ( streq(Color,"green") ) { centersay(fMessage, 10, 10,250,10); } else if ( streq(Color,"white") ) { centersay(fMessage, 10, 250,250,250); } else if ( streq(Color,"yellow") ) { centersay(fMessage, 10, 250,250,10); } else if ( streq(Color,"purple") ) { centersay(fMessage, 10, 250,10,250); } else { snprintf(fMessage, MAX_DATA_LENGTH, "_\n| |\n_| |_\n/ | | | |-.\n ( )\n\n%s", Data); centersay(fMessage, 10, 250,250,250); } log_command(User,Command,Data); return PLUGIN_HANDLED; } /* * * * * * * * * * * * Handle Functions * * * * * * * * * * * */ public plugin_init() { // Description of this function: Initialize this script plugin_registerinfo("Fsay - by <[NN]>Soul", "Shows a middle finger along with your message.", STRING_VERSION); plugin_registercmd("admin_fsay", "admin_fsay", ACCESS_SAY, "admin_fsay [color] <msg>: like admin_csay, but preceeded by a nice ASCII-art middle finger."); return PLUGIN_CONTINUE; }