Code: Select all
#include <amxmodx>#include <amxmisc>#include <dhudmessage> new const PLUGIN_NAME[] = "Auto rr"new const PLUGIN_VERSION[] = "1.0"new const PLUGIN_AUTHOR[] = "9 rpamm!?" new Timer, SecondsCvar; public plugin_init(){ register_plugin( PLUGIN_NAME , PLUGIN_VERSION, PLUGIN_AUTHOR ); register_dictionary("auto_rr.txt"); register_event("CurWeapon", "eCurWeapon", "be", "1=1", "2!29") SecondsCvar = register_cvar("auto_rr_time","60.0") Timer = floatround(get_pcvar_float(SecondsCvar)) set_task(1.0, "start_rr_timer", _, _, _, "a", floatround(get_pcvar_float(SecondsCvar)))} public eCurWeapon(id) { { engclient_cmd(id, "weapon_knife") }} public start_rr_timer(){ server_cmd("sv_gravity 400") set_dhudmessage(255, 0, 0, -1.0, 0.08, 0, 0.0, 0.01) show_dhudmessage(0, "%L", LANG_PLAYER, "RR_TIME" , Timer) if(Timer == 1) { server_cmd("sv_restartround 1") set_task(3.0, "rr_end") } Timer--} public rr_end(){ server_cmd("sv_gravity 800") set_dhudmessage( random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.78, 2, 6.0, 3.0, 0.1, 1.5, false ) show_dhudmessage(0, "%L", LANG_PLAYER, "RR_GG")}