Mensajes: 17
Temas: 7
Registro en: Apr 2019
Reputación:
1
07/02/2021, 06:57 PM
(Última modificación: 07/02/2021, 07:02 PM por RandroidS. Edited 6 times in total.)
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
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(id) g_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(id, EV_FL_fuser2, 0.0); if(entity_get_int(id, EV_INT_button) & 2) { new flags = entity_get_int(id, EV_INT_flags);
if(flags & (1<<11)) return PLUGIN_CONTINUE; if(entity_get_int(id, EV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE; if(!(flags & (1<<9))) return PLUGIN_CONTINUE;
new Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); velocity[2] += 250.0; entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6); } return PLUGIN_CONTINUE; }
[php]
Mensajes: 3,077
Temas: 33
Registro en: May 2017
Reputación:
34
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(id) g_bAutoBhop[id] = false
public client_death(killer, victim, weapon, hitplace, tk) { 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(id, EV_FL_fuser2, 0.0); if(entity_get_int(id, EV_INT_button) & 2) { new flags = entity_get_int(id, EV_INT_flags);
if(flags & (1<<11)) return PLUGIN_CONTINUE; if(entity_get_int(id, EV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE; if(!(flags & (1<<9))) return PLUGIN_CONTINUE;
new Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); velocity[2] += 250.0; entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6); } return PLUGIN_CONTINUE; }
Mensajes: 17
Temas: 7
Registro en: Apr 2019
Reputación:
1
(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(id) g_bAutoBhop[id] = false
public client_death(killer, victim, weapon, hitplace, tk) { 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(id, EV_FL_fuser2, 0.0); if(entity_get_int(id, EV_INT_button) & 2) { new flags = entity_get_int(id, EV_INT_flags);
if(flags & (1<<11)) return PLUGIN_CONTINUE; if(entity_get_int(id, EV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE; if(!(flags & (1<<9))) return PLUGIN_CONTINUE;
new Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); velocity[2] += 250.0; entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6); } return PLUGIN_CONTINUE; }
Sigue manteniendo el efecto despues de morir
Mensajes: 3,077
Temas: 33
Registro en: May 2017
Reputación:
34
Acabo de probarlo y funciona bien.
Mensajes: 17
Temas: 7
Registro en: Apr 2019
Reputación:
1
(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>
Mensajes: 3,077
Temas: 33
Registro en: May 2017
Reputación:
34
(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(id) g_bAutoBhop[id] = false
public client_death(killer, victim, weapon, hitplace, tk) { 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(id, EV_FL_fuser2, 0.0); if(entity_get_int(id, EV_INT_button) & 2) { new flags = entity_get_int(id, EV_INT_flags);
if(flags & (1<<11)) return PLUGIN_CONTINUE; if(entity_get_int(id, EV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE; if(!(flags & (1<<9))) return PLUGIN_CONTINUE;
new Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); velocity[2] += 250.0; entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6); } return PLUGIN_CONTINUE; }
Mensajes: 17
Temas: 7
Registro en: Apr 2019
Reputación:
1
(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(id) g_bAutoBhop[id] = false
public client_death(killer, victim, weapon, hitplace, tk) { 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(id, EV_FL_fuser2, 0.0); if(entity_get_int(id, EV_INT_button) & 2) { new flags = entity_get_int(id, EV_INT_flags);
if(flags & (1<<11)) return PLUGIN_CONTINUE; if(entity_get_int(id, EV_INT_waterlevel) >= 2) return PLUGIN_CONTINUE; if(!(flags & (1<<9))) return PLUGIN_CONTINUE;
new Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); velocity[2] += 250.0; entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6); } 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
|