I want to delete the admin only
Here is when i had deleted:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#define FLAG_ADMIN ADMIN_LEVEL_A
new g_iJumpCount[33], bool:g_bJumped[33];
new g_pMaxJumps;
public plugin_init()
{
register_plugin("Multi Jump", "1.2", "twistedeuphoria (port to FM by hleV)");
g_pMaxJumps = register_cvar("mj_maxjumps", "1"); // 1 normal jump + amount in CVAR
register_forward(FM_PlayerPreThink, "fwPreThink");
register_forward(FM_PlayerPostThink, "fwPostThink");
}
public client_disconnect(iCl)
{
g_iJumpCount[iCl] = 0;
g_bJumped[iCl] = false;
}
public fwPreThink(iCl)
{
if (!is_user_alive(iCl) || (get_pcvar_num (get_user_flags(iCl) & FLAG_ADMIN)))
return;
static iButton, iOldButton, iFlags;
iButton = pev(iCl, pev_button);
iOldButton = pev(iCl, pev_oldbuttons);
iFlags = pev(iCl, pev_flags);
if ((iButton & IN_JUMP) && !(iFlags & FL_ONGROUND) && !(iOldButton & IN_JUMP))
if (g_iJumpCount[iCl] < get_pcvar_num(g_pMaxJumps))
{
g_iJumpCount[iCl]++;
g_bJumped[iCl] = true;
return;
}
if ((iButton & IN_JUMP) && (iFlags & FL_ONGROUND))
g_iJumpCount[iCl] = 0;
}
public fwPostThink(iCl)
{
if (!is_user_alive(iCl) || (get_pcvar_num (get_user_flags(iCl) & FLAG_ADMIN)))
return;
if (g_bJumped[iCl])
{
static Float:fVel[3];
pev(iCl, pev_velocity, fVel);
fVel[2] = random_float(265.0, 285.0); // IMO it should be lesser
set_pev(iCl, pev_velocity, fVel);
g_bJumped[iCl] = false;
}
}
__________________
I dislike this.
"A sneeze never comes alone!" <-- Important to remember.