Raised This Month: $32 Target: $400
 8% 

Multijump for vips


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jievylook
Senior Member
Join Date: Sep 2018
Old 06-23-2019 , 00:30   Multijump for vips
Reply With Quote #1

Hi all,
I need a plugin to give multijump to a player with level B access flag

I found this code but I do not know how I can do it to give access only to the players with admin level b



PHP Code:
 // Admin access flag(s) required if "mp_multijumps_adminonly" greater than 0
#define ADMIN_MULTIJUMP ADMIN_ADMIN

#include amxmod
#include amxmisc
#include VexdUM

#define MAX_PLAYERS 32

#define m_afButtonPressed 246
#define m_flFallVelocity 251

new g_iJumpCount[MAX_PLAYERS+1]

new 
g_pCvarMultiJumpsg_pCvarTeamAllowedg_pCvarOnlyAdminsg_pCvarMaxFallVelocityg_pCvarJumpVelocity

public plugin_init() {
  
register_plugin("Multi Jumps""0.0.7""ConnorMcLeod")
  
g_pCvarMultiJumps register_cvar("mp_multijumps""1"// number of jumps
  
g_pCvarTeamAllowed register_cvar("mp_multijumps_team""3"// 0: Nobody, 1: TERRORISTS, 2: CTs, 3: ALL
  
g_pCvarOnlyAdmins register_cvar("mp_multijumps_adminonly""0"// 0: by team, 1: admins with ADMIN_MULTIJUMP access
  
g_pCvarMaxFallVelocity register_cvar("mp_multijump_maxfallvelocity""500"// max fall velocity to make work multijump
  
g_pCvarJumpVelocity register_cvar("mp_multijumps_jumpvelocity""268.328157"// jump velocity
}

public 
client_prethink(id) {
  if(!
is_user_alive(id) || !(entity_get_int(idEV_INT_button) & IN_JUMP))
    return

  new 
fFlags entity_get_int(idEV_INT_flags)

  if(
fFlags FL_ONGROUND) {
    
g_iJumpCount[id] = 0
    
return
  }

  if(
fFlags FL_WATERJUMP
  
|| entity_get_int(idEV_INT_waterlevel) >= 2
  
|| !(get_offset_int(idm_afButtonPressed) & IN_JUMP))
    return

  new 
iMulti get_cvarptr_num(g_pCvarMultiJumps)

  if(
iMulti 0) {
    if((
get_cvarptr_num(g_pCvarOnlyAdmins) <= || access(idADMIN_MULTIJUMP))
    && 
get_cvarptr_num(g_pCvarTeamAllowed) & get_offset_int(id114)) {
    
/*if((iOnlyAdmins = get_cvarptr_num(g_pCvarOnlyAdmins)) <= 0 && get_cvarptr_num(g_pCvarTeamAllowed) & get_offset_int(id, 114)
    || iOnlyAdmins > 0 && access(id, ADMIN_MULTIJUMP)) {*/
      
if(get_offset_float(idm_flFallVelocity) < get_cvarptr_float(g_pCvarMaxFallVelocity)
      && ++
g_iJumpCount[id] <= iMulti) {
        new 
Float:fVelocity[3]
        
entity_get_vector(idEV_VEC_velocityfVelocity)
        
fVelocity[2] = get_cvarptr_float(g_pCvarJumpVelocity)
        
entity_set_vector(idEV_VEC_velocityfVelocity)
      }
    }
  }

jievylook is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-23-2019 , 01:06   Re: Multijump for vips
Reply With Quote #2

Code:
#define ADMIN_MULTIJUMP ADMIN_ADMIN


Code:
#define ADMIN_MULTIJUMP ADMIN_RESERVATION
https://forums.alliedmods.net/showthread.php?t=71269
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Mikaeel123
Senior Member
Join Date: Oct 2018
Old 06-23-2019 , 02:26   Re: Multijump for vips
Reply With Quote #3

Or maybe you can use this
https://forums.alliedmods.net/showthread.php?t=10159
and Use this code in your server.cfg
Quote:
amx_cvar amx_mjadminonly 1
Mikaeel123 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode