jo esme yra tokia jog zaidejas paspaudes klavisa gali begti keletas sekundziu greiciau tai veikai viskas ok
taciau kai baigiasi laikas vel gali kartoti iskarto nezinau kaip persidaryti kad reiktu tarkim palaukt kokias 5sek , ir dar toks dalykas
tuo metu kai begi leidzia saudyt be garso tai tokie dalykai
tiesa ieskau dar info bet nerandu gal nukreipsit kolegos noriu pasidaryt hud judanti tuo metu kai zmogus bega nezinau ar costum buna
bet kiek pamenu is senu laiku bent toks kaip bomba defusint tikrai buna

Code: Select all
#include <amxmodx>#include <fakemeta> static const PLUGIN[] = "Speed"static const VERSION[] = "0.1"static const AUTHOR[] = "aZT" #define SPRINT_SPEED 400.0#define DEFAULT_SPEED 250.0 new const g_SpeedLowSound[64] = "misc/sprint.wav" new bool:freezetimenew bool:cl_speed[33]new cl_weapon[33] new g_fCvarTimenew g_fCvarLowSpeed public plugin_init(){ register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "eNewRound", "a", "1=0", "2=0") register_logevent("RoundStart", 2, "1=Round_Start") register_event("CurWeapon", "event_weapon", "be", "1=1") register_forward(FM_PlayerPreThink, "Fwd_PlayerPreThink") register_concmd("+sprint", "ClientCommand_StartSprint") register_concmd("-sprint", "ClientCommand_StopSprint") g_fCvarTime = register_cvar("sprint_time", "3.0") g_fCvarLowSpeed = register_cvar("sprint_low", "150.0") server_cmd("sv_maxspeed 1000.0")} public plugin_precache() precache_sound(g_SpeedLowSound) public eNewRound() freezetime = true public RoundStart() freezetime = false public event_weapon(Client){ static wpn; wpn = read_data(2) static button; button = pev(Client, pev_button) if (wpn != cl_weapon[Client]) { if (cl_speed[Client] && !freezetime) { fm_set_user_maxspeed(Client, SPRINT_SPEED) if (button & IN_ATTACK) { client_cmd(Client, "-attack") client_cmd(Client, "unbind MOUSE1") } } }} public Fwd_PlayerPreThink(Client){ if (cl_speed[Client] && !freezetime) set_pev(Client, pev_viewmodel2, "") /*else if (!cl_speed[Client]) { static wpn, wname[32] wpn = get_user_weapon(Client) get_weaponname(wpn, wname, 31) replace(wname, 31, "weapon_", "") set_pev(Client, pev_viewmodel2, "models/v_%s.mdl", wname) }*/} public ClientCommand_StartSprint(Client){ if (!freezetime) { cl_speed[Client] = true fm_set_user_maxspeed(Client, SPRINT_SPEED) client_cmd(Client, "unbind MOUSE1") new Float:time; time = get_pcvar_float(g_fCvarTime) set_task(time, "Stamina", Client) }} public Stamina(Client){ if (cl_speed[Client] && !freezetime) { cl_speed[Client] = false new Float:lower_speed lower_speed = get_pcvar_float(g_fCvarLowSpeed) fm_set_user_maxspeed(Client, lower_speed) set_task(lower_speed, "ClientCommand_StartSprint", Client) emit_sound(Client, CHAN_VOICE, g_SpeedLowSound, 1.0, ATTN_NORM, 0, PITCH_NORM) }} public ClientCommand_StopSprint(Client){ cl_speed[Client] = false if (!freezetime) { fm_set_user_maxspeed(Client, DEFAULT_SPEED) client_cmd(Client, "lastinv; wait; wait; lastinv") } client_cmd(Client, "bind ^"MOUSE1^" ^"+attack^"")} stock fm_set_user_maxspeed(index, Float:speed = -1.0){ engfunc(EngFunc_SetClientMaxspeed, index, speed) set_pev(index, pev_maxspeed, speed) return 1}