RSSy MYGO.pl Opublikowano Styczeń 2, 2022 o 11:35 RSSy Udostępnij Opublikowano Styczeń 2, 2022 o 11:35 Hi, is there any way that the players have automatic speed for the duration of the warm-up round? PHP Code: #include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "Simple Knife Warump" #define VERSION "1.0" #define AUTHOR "Sn!ff3r" #define TASKID 1234 new hudtimer, cvar_timer, hudhandler, mp_freezetime, value new bool:isCalentamiento; new cvar_respawnTime; new const sonido[] = "sound/carpeta/sonido.mp3" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_message(get_user_msgid("TextMsg") ,"message_TextMsg") register_event("CurWeapon","switchweapon","be","1=1","2!29") //register_dictionary("simple_warmup.txt") cvar_timer = register_cvar("warmuptimer", "40") // Duracion del calentamiento cvar_respawnTime = register_cvar("tiempo_respawn", "1.5") // Tiempo que tardarán en respawnear los usuarios mp_freezetime = get_cvar_pointer("mp_freezetime") hudhandler = CreateHudSyncObj() } public plugin_precache() { precache_generic(sonido) } public plugin_cfg() { set_task(10.0, "read_vars") } public read_vars() { value = get_pcvar_num(mp_freezetime) } public message_TextMsg(const MsgId, const MsgDest, const MsgEntity) { static message[64] get_msg_arg_string(2, message, charsmax(message)) if(equal(message, "#Game_Commencing")) { hudtimer = get_pcvar_num(cvar_timer) if(hudtimer == -1) return //formatex(message, charsmax(message), "%L", LANG_PLAYER, "WARUMP_START") Tienes desactivado el diccionario a si que esto sobre :v set_msg_arg_string(2, "Ha iniciado el calentamiento") // client_cmd(id, "mp3 play ^"%s^"", sonido) es pa todos la musica xd client_cmd(0, "mp3 play ^"%s^"", sonido) set_task(1.0, "restart", TASKID, _, _, "b") set_pcvar_num(mp_freezetime, 0) isCalentamiento = true; } if(equal(message, "#Game_will_restart_in")) { //formatex(message, charsmax(message), "%L", LANG_PLAYER, "WARUMP_END") Tienes desactivado el diccionario a si que esto sobre :v client_cmd(0, "mp3 stop") set_msg_arg_string(2, "Ha finalizado el calentamiento") isCalentamiento = false; } } public restart() { if(hudtimer <= 0) { remove_task(TASKID) set_cvar_num("sv_restartround", 1) set_pcvar_num(mp_freezetime, value) } else { set_hudmessage(255, 255, 255, -1.0, 0.15, 0, float(get_pcvar_num(cvar_timer)), 1.0, 0.1, 0.2) ShowSyncHudMsg(0, hudhandler, "Queda%s %i segundo%s para finalizar el calentamiento", hudtimer > 1 ? "n":"", hudtimer, hudtimer > 1 ? "s":"") //ShowSyncHudMsg(0, hudhandler, "%L", LANG_PLAYER, "COUNTING", hudtimer) Tienes desactivado el diccionario a si que esto sobre :v } hudtimer-- } public switchweapon(id) { if(task_exists(TASKID)) { engclient_cmd(id, "weapon_knife") } } public client_death(attacker, victim) { if(is_user_connected(victim) && isCalentamiento) set_task(get_pcvar_float(cvar_respawnTime), "respawn", victim) return PLUGIN_CONTINUE } public respawn(id) { if(isCalentamiento) ExecuteHamB(Ham_CS_RoundRespawn, id) } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi