#include <amxmodx>
#include <fakemeta>
public plugin_init() {
register_plugin("Double Jump", "1.0", "RPK. Shark & DarkGL");
register_forward(FM_CmdStart, "CmdStart");
}
public CmdStart(id, uc_handle)
{
static moze_skoczyc;
if(!is_user_alive(id) || !(get_user_flags(id)&ADMIN_LEVEL_H))
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc & (1<<id) && cs_get_user_team(i) == CS_TEAM_CT)
{
moze_skoczyc &= ~(1<<id)
new Float:velocity[3];
pev(id, pev_velocity, velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity, velocity);
}
else if(flags & FL_ONGROUND){
moze_skoczyc |= (1<<id)
}
return FMRES_IGNORED;
}
Jak dodac aby wymagane było w bycie CT? Zeby w TT nie działało. Bo po testach okazało się ze przeszkadza predatorowi (on ma doublejump'a też ale inne configi)