Quitar efecto al morir
#1
este bhop lo tengo en una tienda, que al comprarlo lo activa, pero al morir siempre lo sigue teniendo xd, quisiera saber como quitarlo para cuando muera, volver a comprarlo  Cutecry

Código PHP:
new bool:g_bAutoBhop[33];

public 
plugin_init()
{
    register_plugin("test""test""Cheesy Peteza & didoWEE");
    register_clcmd("say /bhop""Menu");
    register_clcmd("say_team /bhop""Menu");
}
public 
plugin_natives()    register_native("tienda_bunny""bunnyhop"1

public 
client_putinserver(idg_bAutoBhop[id] = false

public bunnyhop(id){

g_bAutoBhop[id] = true
}

public 
client_PreThink(id)
{
    if(!is_user_alive(id)) return PLUGIN_CONTINUE;
    if(!g_bAutoBhop[id]) return PLUGIN_CONTINUE;

    entity_set_float(idEV_FL_fuser20.0);
    if(entity_get_int(idEV_INT_button) & 2)
    {
        new flags entity_get_int(idEV_INT_flags);

        if(flags & (1<<11)) return PLUGIN_CONTINUE;
        if(entity_get_int(idEV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE;
        if(!(flags & (1<<9))) return PLUGIN_CONTINUE;

        new Float:velocity[3];
        entity_get_vector(idEV_VEC_velocityvelocity);
        velocity[2] += 250.0;
        entity_set_vector(idEV_VEC_velocityvelocity);

        entity_set_int(idEV_INT_gaitsequence6);
    }
    return PLUGIN_CONTINUE;
}

[
php
Responder
#2
Código PHP:
new bool:g_bAutoBhop[33];

public 
plugin_init()
{
    
register_plugin("test""test""Cheesy Peteza & didoWEE");
    
register_clcmd("say /bhop""Menu");
    
register_clcmd("say_team /bhop""Menu");
}
public 
plugin_natives()    register_native("tienda_bunny""bunnyhop"1

public 
client_putinserver(idg_bAutoBhop[id] = false

public client_death(killervictimweaponhitplacetk)
{
    
g_bAutoBhop[victim] = false;
}

public 
bunnyhop(id){

g_bAutoBhop[id] = true
}

public 
client_PreThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE;
    if(!
g_bAutoBhop[id]) return PLUGIN_CONTINUE;

    
entity_set_float(idEV_FL_fuser20.0);
    if(
entity_get_int(idEV_INT_button) & 2)
    {
        new 
flags entity_get_int(idEV_INT_flags);

        if(
flags & (1<<11)) return PLUGIN_CONTINUE;
        if(
entity_get_int(idEV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE;
        if(!(
flags & (1<<9))) return PLUGIN_CONTINUE;

        new 
Float:velocity[3];
        
entity_get_vector(idEV_VEC_velocityvelocity);
        
velocity[2] += 250.0;
        
entity_set_vector(idEV_VEC_velocityvelocity);

        
entity_set_int(idEV_INT_gaitsequence6);
    }
    return 
PLUGIN_CONTINUE;

Responder
#3
(07/02/2021, 07:57 PM)Chema escribió:
Código PHP:
new bool:g_bAutoBhop[33];

public 
plugin_init()
{
    register_plugin("test""test""Cheesy Peteza & didoWEE");
    register_clcmd("say /bhop""Menu");
    register_clcmd("say_team /bhop""Menu");
}
public 
plugin_natives()    register_native("tienda_bunny""bunnyhop"1

public 
client_putinserver(idg_bAutoBhop[id] = false

public client_death(killervictimweaponhitplacetk)
{
 
g_bAutoBhop[victim] = false;
}

public 
bunnyhop(id){

g_bAutoBhop[id] = true
}

public 
client_PreThink(id)
{
    if(!is_user_alive(id)) return PLUGIN_CONTINUE;
    if(!g_bAutoBhop[id]) return PLUGIN_CONTINUE;

    entity_set_float(idEV_FL_fuser20.0);
    if(entity_get_int(idEV_INT_button) & 2)
    {
        new flags entity_get_int(idEV_INT_flags);

        if(flags & (1<<11)) return PLUGIN_CONTINUE;
        if(entity_get_int(idEV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE;
        if(!(flags & (1<<9))) return PLUGIN_CONTINUE;

        new Float:velocity[3];
        entity_get_vector(idEV_VEC_velocityvelocity);
        velocity[2] += 250.0;
        entity_set_vector(idEV_VEC_velocityvelocity);

        entity_set_int(idEV_INT_gaitsequence6);
    }
    return PLUGIN_CONTINUE;


Sigue manteniendo el efecto despues de morir Whatdone
Responder
#4
Acabo de probarlo y funciona bien.
Responder
#5
(07/02/2021, 08:45 PM)Chema escribió: Acabo de probarlo y funciona bien.

no se que estoy haciendo mal entonces, lo copie tal cual
Utilize estos includes
#include <amxmodx>
#include <amxmisc>
#include <engine>
Responder
#6
(07/02/2021, 09:00 PM)RandroidS escribió: no se que estoy haciendo mal entonces, lo copie tal cual
Utilize estos includes
#include <amxmodx>
#include <amxmisc>
#include <engine>

Compila este plugin y en plugins.ini colócalo arriba de la tienda.

Código PHP:
#include <amxmodx>
#include <engine>

new bool:g_bAutoBhop[33];

public 
plugin_init()
{
    
register_plugin("test""test""Cheesy Peteza & didoWEE");
    
register_clcmd("say /bhop""bunnyhop");
    
register_clcmd("say_team /bhop""bunnyhop");
}
public 
plugin_natives()    register_native("tienda_bunny""bunnyhop"1

public 
client_putinserver(idg_bAutoBhop[id] = false

public client_death(killervictimweaponhitplacetk)
{
 
g_bAutoBhop[victim] = false;
}

public 
bunnyhop(id){

g_bAutoBhop[id] = true
}

public 
client_PreThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE;
    if(!
g_bAutoBhop[id]) return PLUGIN_CONTINUE;

    
entity_set_float(idEV_FL_fuser20.0);
    if(
entity_get_int(idEV_INT_button) & 2)
    {
        new 
flags entity_get_int(idEV_INT_flags);

        if(
flags & (1<<11)) return PLUGIN_CONTINUE;
        if(
entity_get_int(idEV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE;
        if(!(
flags & (1<<9))) return PLUGIN_CONTINUE;

        new 
Float:velocity[3];
        
entity_get_vector(idEV_VEC_velocityvelocity);
        
velocity[2] += 250.0;
        
entity_set_vector(idEV_VEC_velocityvelocity);

        
entity_set_int(idEV_INT_gaitsequence6);
    }
    return 
PLUGIN_CONTINUE;

Responder
#7
(07/02/2021, 09:06 PM)Chema escribió: Compila este plugin y en plugins.ini colócalo arriba de la tienda.

Código PHP:
#include <amxmodx>
#include <engine>

new bool:g_bAutoBhop[33];

public 
plugin_init()
{
    register_plugin("test""test""Cheesy Peteza & didoWEE");
    register_clcmd("say /bhop""bunnyhop");
    register_clcmd("say_team /bhop""bunnyhop");
}
public 
plugin_natives()    register_native("tienda_bunny""bunnyhop"1

public 
client_putinserver(idg_bAutoBhop[id] = false

public client_death(killervictimweaponhitplacetk)
{
 
g_bAutoBhop[victim] = false;
}

public 
bunnyhop(id){

g_bAutoBhop[id] = true
}

public 
client_PreThink(id)
{
    if(!is_user_alive(id)) return PLUGIN_CONTINUE;
    if(!g_bAutoBhop[id]) return PLUGIN_CONTINUE;

    entity_set_float(idEV_FL_fuser20.0);
    if(entity_get_int(idEV_INT_button) & 2)
    {
        new flags entity_get_int(idEV_INT_flags);

        if(flags & (1<<11)) return PLUGIN_CONTINUE;
        if(entity_get_int(idEV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE;
        if(!(flags & (1<<9))) return PLUGIN_CONTINUE;

        new Float:velocity[3];
        entity_get_vector(idEV_VEC_velocityvelocity);
        velocity[2] += 250.0;
        entity_set_vector(idEV_VEC_velocityvelocity);

        entity_set_int(idEV_INT_gaitsequence6);
    }
    return PLUGIN_CONTINUE;


nada, borre todos los plugins, desactive el mod jctf, solo deje activas las armas de la tienda que vienen por defecto la tienda y el bhop.amxx
{"Gatling", 1000},
{"Plasma-Gun", 1200},
{"Balrog-III", 1400},
{"Bhop", 100}
y aun asi nada, no se que estara afectando
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)