Raised This Month: $51 Target: $400
 12% 

[AYUDA] Multijump como Privilegio


  
 
 
Thread Tools Display Modes
Author Message
Fapencio
Junior Member
Join Date: Jan 2013
Old 01-10-2013 , 20:14   [AYUDA] Multijump como Privilegio
#1

Hola AM, Necesito ayuda con este plugin quiero que sea para privilegio con flag C Eso Gracias...

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ADMINACCESS ADMIN_CHAT

new jumpnum[33] = 0
new bool:dojump[33] = false

public plugin_init()
{
    
register_plugin("MultiJump","1.1","twistedeuphoria")
    
register_cvar("amx_maxjumps","1")
    
register_cvar("amx_mjadminonly","0")
}

public 
client_putinserver(id)
{
    
jumpnum[id] = 0
    dojump
[id] = false
}

public 
client_disconnect(id)
{
    
jumpnum[id] = 0
    dojump
[id] = false
}

public 
client_PreThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    
new nbut get_user_button(id)
    new 
obut get_user_oldbutton(id)
    if((
nbut IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut IN_JUMP))
    {
        if(
jumpnum[id] < get_cvar_num("amx_maxjumps"))
        {
            
dojump[id] = true
            jumpnum
[id]++
            return 
PLUGIN_CONTINUE
        
}
    }
    if((
nbut IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    {
        
jumpnum[id] = 0
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}

public 
client_PostThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    
if(dojump[id] == true)
    {
        new 
Float:velocity[3]    
        
entity_get_vector(id,EV_VEC_velocity,velocity)
        
velocity[2] = random_float(265.0,285.0)
        
entity_set_vector(id,EV_VEC_velocity,velocity)
        
dojump[id] = false
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE

Fapencio is offline
xLeoNNN
Veteran Member
Join Date: Sep 2010
Location: de_dust2
Old 01-10-2013 , 20:47   Re: [AYUDA] Multijump como Privilegio
#2

amxconst.inc

Si alguien le pasa el codigo ya echo, que despues no ande llorando que la gente llega y pide, sin querer aprender.
__________________
xLeoNNN is offline
Send a message via MSN to xLeoNNN
claans
Senior Member
Join Date: Jul 2012
Location: Argentina
Old 01-10-2013 , 21:48   Re: [AYUDA] Multijump como Privilegio
#3

PHP Code:
#define ADMINACCESS ADMIN_CHAT 
---->
#define ADMINACCESS ADMIN_KICK 
MEDIA PILA MAN , !

sl2
cLAANS.-
__________________
http://amxmodx-es.com/ Allied Modders en español
http://amxmodx-es.com/ Allied Modders in spanish
claans is offline
Send a message via MSN to claans Send a message via Skype™ to claans
Fapencio
Junior Member
Join Date: Jan 2013
Old 01-10-2013 , 23:31   Re: [AYUDA] Multijump como Privilegio
#4

Trate Pero No pude Ya habia puesto eso. No se por que Pero o le daba mas saltos a los player o les daba 1 salto y mucho mas a los admin
Fapencio is offline
Manu127
Veteran Member
Join Date: Jul 2010
Location: Argentina
Old 01-11-2013 , 09:44   Re: [AYUDA] Multijump como Privilegio
#5

Quote:
Originally Posted by Fapencio View Post
Hola AM, Necesito ayuda con este plugin quiero que sea para privilegio con flag C Eso Gracias...

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ADMINACCESS ADMIN_CHAT

new jumpnum[33] = 0
new bool:dojump[33] = false

public plugin_init()
{
    
register_plugin("MultiJump","1.1","twistedeuphoria")
    
register_cvar("amx_maxjumps","1")
    
register_cvar("amx_mjadminonly","0")
}

public 
client_putinserver(id)
{
    
jumpnum[id] = 0
    dojump
[id] = false
}

public 
client_disconnect(id)
{
    
jumpnum[id] = 0
    dojump
[id] = false
}

public 
client_PreThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    
new nbut get_user_button(id)
    new 
obut get_user_oldbutton(id)
    if((
nbut IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut IN_JUMP))
    {
        if(
jumpnum[id] < get_cvar_num("amx_maxjumps"))
        {
            
dojump[id] = true
            jumpnum
[id]++
            return 
PLUGIN_CONTINUE
        
}
    }
    if((
nbut IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    {
        
jumpnum[id] = 0
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}

public 
client_PostThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    
if(dojump[id] == true)
    {
        new 
Float:velocity[3]    
        
entity_get_vector(id,EV_VEC_velocity,velocity)
        
velocity[2] = random_float(265.0,285.0)
        
entity_set_vector(id,EV_VEC_velocity,velocity)
        
dojump[id] = false
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE

Yo que vos lo hago con hamsandwich, no te parece?
__________________
Manu127 is offline
Send a message via MSN to Manu127 Send a message via Skype™ to Manu127
YakumoHiratsuhi
Veteran Member
Join Date: Dec 2010
Location: Dreαmlαnd.
Old 01-11-2013 , 09:56   Re: [AYUDA] Multijump como Privilegio
#6

Te lo dejo con doble salto, ya hecha a andar tu imaginación si quieres que tenga más.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <hamsandwich>

#define PLUGIN "Dual Jump"
#define VERSION "1.0"
#define AUTHOR "LOLOLOLOLOLOLOL"
#define JUMP_ACCESS ADMIN_KICK

#define get_bit(%1,%2) (%2 & (1 << (%1 & 31)))
#define set_bit(%1,%2) %2 |= (1 << (%1 & 31))
#define unset_bit(%1,%2) %2 &= ~(1 << (%1 & 31))

new gb_jumped

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Player_Jump"player""fw_PlayerJump")
}

public 
client_putinserver(id
    
unset_bit(idgb_jumped)

public 
fw_PlayerJump(id)
{
    
// Tiene acceso?
    
if(access(idJUMP_ACCESS))
    {
        
// Vemos los botones que pico
        
static buttonflagsoldbutton
        button 
get_user_button(id); flags get_user_flags(id); oldbutton get_user_oldbutton(id)
        
        
// Esta saltando
        
if((button IN_JUMP) && !(flags FL_ONGROUND) && !(oldbutton IN_JUMP))
        {        
            
// Ya salto 2 veces?
            
if(!get_bit(idgb_jumped))
            {
                static 
Float:velocity[3]
                
entity_get_vector(idEV_VEC_velocityvelocity)
                
                
velocity[2] = random_float(265.0285.0)
                
entity_set_vector(idEV_VEC_velocityvelocity)
                
set_bit(idgb_jumped)
            }
        }
        
        
// Puede volver a saltar
        
if(flags FL_ONGROUND)
            
unset_bit(idgb_jumped)
    }

__________________
"Podra parecer ridiculo o imposible, pero este es el camino que seguimos los verdaderos hombres, si hay un muro en el camino, lo derribamos, si no hay camino, haremos uno, con nuestras propias manos, porque el magma de nuestro corazón arde en llamas."
YakumoHiratsuhi is offline
Send a message via MSN to YakumoHiratsuhi
 



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 03:19.


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