/*************************************************************************** * plugin_angrysand_b1tchslap.sma Date: 05/08/2002 * * Written by Angrysand (angrysand@boneville.net) * * many thanks to Sank and Eric; i spent quite some time learning this * admin-mod scripting stuff from looking at their scripts * * * This Plugin gives admins the ability to b1tchslap a target player, which * basically means they get slapped once every second for SLAP1_TIME seconds **************************************************************************/ // Access required to b1tchslap #define ACCESS_B1TCHSLAP 64 // How long the slapping will last #define SLAP1_TIME 10 /****************************************************************************/ /************** DO NOT MODIFY CONTENTS BELOW THIS LINE !!! ******************/ /****************************************************************************/ #include <core> #include <console> #include <string> #include <admin> #include <adminlib> new STRING_VERSION[MAX_DATA_LENGTH] = "1.01"; /****************************************************************************/ /************************** Plugin Entry Point ******************************/ /****************************************************************************/ public plugin_init() { plugin_registerinfo("B1tch-slap Plugin", "Slap dem hos!", STRING_VERSION); plugin_registercmd("admin_b1tchslap", "admin_b1tchslap", ACCESS_B1TCHSLAP, "admin_b1tchslap <player>: Slaps the player around several times"); return PLUGIN_CONTINUE; } public admin_b1tchslap(HLCommand, HLData, HLUserName, UserIndex) { new Data[MAX_DATA_LENGTH]; new Text[MAX_TEXT_LENGTH]; new TargetName[MAX_NAME_LENGTH]; new Red = random(256); new Green = random(256); new Blue = random(256); //prep the incoming data/params convert_string(HLData, Data, MAX_DATA_LENGTH); //get the username if (check_user(Data) == 1) { get_username(Data,TargetName,MAX_NAME_LENGTH); snprintf(Text, MAX_TEXT_LENGTH, "Oops, %s sassed the admin. Bad move.", TargetName); typesay(Text, 5, Red, Green, Blue); //uncomment this if you want an additional pre-slap. //slap(TargetName); set_timer("Slap1_Timer", 1, SLAP1_TIME, TargetName); } else { selfmessage("Unknown player: "); selfmessage(Data); } return PLUGIN_HANDLED; } public Slap1_Timer(Timer, Repeat, HLUserName, HLParam) { new User[MAX_NAME_LENGTH]; convert_string(HLParam, User, MAX_NAME_LENGTH); slap(User); }