/*Plugin_kick2 by Rufius*/ #include <core> #include <console> #include <string> #include <admin> #include <adminlib> #include <sound> new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.0"; /*The one 2 fall*/ /*The short*/ new Name2[MAX_NAME_LENGTH]; /*Full name*/ new TargetName[MAX_NAME_LENGTH]; /*The evil admin*/ new User[MAX_NAME_LENGTH]; new Text1[MAX_TEXT_LENGTH]; new Text2[MAX_NAME_LENGTH]; public admin_kick2(HLCommand, HLData, HLUserName, UserIndex) { convert_string(HLData,Name2,MAX_DATA_LENGTH); convert_string(HLUserName,User,MAX_NAME_LENGTH); get_username(Name2,TargetName,MAX_NAME_LENGTH); if(check_immunity(TargetName)==1) { snprintf(Text1, MAX_TEXT_LENGTH, "Laf. You can't Kick '%s', you silly bear.", TargetName); say(Text1); /* return PLUGIN_HANDLED;*/ } else { /*put the goodbye.wav folder in <moddir>\sound\misc*/ playsoundall("misc\goodbye.wav"); say_warning(); set_timer("do_kick",2,0); } } public say_warning(){ centersay("Goodbye",10,0,255,0); } public do_kick(){ message(TargetName, "You have been a bad boy!!!!."); kick(TargetName); snprintf(Text2, MAX_TEXT_LENGTH, "[ADMIN] %s was Kicked by %s.", TargetName, User); say(Text2); } public plugin_init() { plugin_registerinfo("Kicks target","Just for fun.",STRING_VERSION); plugin_registercmd("admin_kick2","admin_kick2",ACCESS_KICK,"admin_kick2 <target>: Says goodbye and kicks target."); return PLUGIN_CONTINUE; }