Easy Multijump

Čia galite paskelbti apie naudingus pluginus, kuriuos radote internete ar kur kitur ir manote, kad jie bus naudingi kitiems. Savo kurtus pluginus prašome skelbti "Naujai pateikti pluginai" forume.
Forum rules
1. Pluginai turi turėti išsamius aprašymus.
2. Aprašymai turi būti lietuvių kalba.
Post Reply
User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

Easy Multijump

Post by laimiukas3 »

Autorius:
  • twistedeuphoria
  • jesuspunk
Reikalavimai: cvars
amx_maxjumps "1"
amx_mjadminonly 0/1

Code: Select all

#include <amxmodx>#include <engine>#include <reapi> #define ADMINACCESS ADMIN_LEVEL_B // for amxx 1.8.2 #if AMXX_VERSION_NUM < 183    #define MAX_CLIENTS    32#endif new pCvar_amx_maxjumps, pCvar_amx_mjadminonlynew jumpnum[MAX_CLIENTS] = 0new bool:g_isAdmin[MAX_CLIENTS] = false public plugin_init(){    register_plugin("MultiJump","1.4","twistedeuphoria/jesuspunk")    pCvar_amx_maxjumps = register_cvar("amx_maxjumps","1")    pCvar_amx_mjadminonly = register_cvar("amx_mjadminonly","0")    RegisterHookChain(RG_CBasePlayer_Jump,"CBasePlayer_Jump")} public _isAdmin(id){    if(get_user_flags(id) & ADMINACCESS ) g_isAdmin[id] = true    else g_isAdmin[id] = false} public client_putinserver(id){    jumpnum[id] = 0    _isAdmin(id)} public client_infochanged(id){    _isAdmin(id)} public client_disconnected(id){    jumpnum[id] = 0    g_isAdmin[id] = false}  public CBasePlayer_Jump(id){    if(!is_user_alive(id)) return PLUGIN_HANDLED    if(get_pcvar_num(pCvar_amx_mjadminonly) && !g_isAdmin[id]) return PLUGIN_HANDLED    new obut = get_member(id,m_afButtonLast)    if(!(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP) && jumpnum[id] < get_pcvar_num(pCvar_amx_maxjumps))    {        static Float:velocity[3]        get_entvar(id,var_velocity,velocity)        velocity[2] = random_float(265.0,285.0)        set_entvar(id,var_velocity,velocity)        jumpnum[id]++    }    else if(get_entity_flags(id) & FL_ONGROUND)    {        jumpnum[id] = 0    }       return PLUGIN_CONTINUE} 
Image
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests