←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Modyfikacja
przerobienie pluginu na flage t

Zablokowany

  • +
  • -
LCA - zdjęcie LCA 19.07.2011

Proszę o przerobienie pluginu tak aby osoby z flagą T mogły używać tego pluginu



#include <amxmodx>
#include <engine>
#include <colorchat>
#include <hamsandwich>

#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
#define autobhopkeys (1<<0)|(1<<1)

new bool:bhop_enabled[33]

public plugin_init()
{
register_plugin("Bunny Hop", "1.0", "CheesyPeteza & Lucky")

register_menucmd(register_menuid("autobhopon"), autobhopkeys, "autobhopselecton")
register_clcmd("say /bh", "autobhop_menu")
set_task(120.0, "autobhop_advert", 100, _, _, "b")
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
}

public autobhop_advert(id)
{
ColorChat(0, GREEN, "^4[www.mps.xaa.pl]^3 Wpisz^4 /bh^3, aby wlaczyc^4 auto bh!")
}

public client_connect(id)
{
bhop_enabled[id] = false
}
public Spawn(id)
{
autobhop_menu(id);
}
public autobhop_menu(id)
{
show_menu(id, autobhopkeys, "\rWlaczyc auto bh?^n^n\r1. \wTak^n\r2. Nie^n", -1, "autobhopon")
}

public autobhopselecton(id, key)
{
if(key == 0)
{
bhop_enabled[id] = true
}
else if(key == 1)
{
bhop_enabled[id] = false
}
}

public client_PreThink(id)
{
if(bhop_enabled[id] == true)
{
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 & FL_WATERJUMP)
return PLUGIN_CONTINUE
if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
return PLUGIN_CONTINUE
if ( !(flags & FL_ONGROUND) )
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
}
Odpowiedz

  • +
  • -
MarWit - zdjęcie MarWit 19.07.2011

Łap


#include <amxmodx> 
#include <engine>
#include <colorchat>
#include <hamsandwich>

#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
#define autobhopkeys (1<<0)|(1<<1)

#define FLAGA ADMIN_LEVEL_H

new bool:bhop_enabled[33]

public plugin_init()
{
register_plugin("Bunny Hop", "1.0", "CheesyPeteza & Lucky")

register_menucmd(register_menuid("autobhopon"), autobhopkeys, "autobhopselecton")
register_clcmd("say /bh", "autobhop_menu", FLAGA, "")
set_task(120.0, "autobhop_advert", 100, _, _, "b")
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
}

public autobhop_advert(id)
{
ColorChat(0, GREEN, "^4[www.mps.xaa.pl]^3 Wpisz^4 /bh^3, aby wlaczyc^4 auto bh!")
}

public client_connect(id)
{
bhop_enabled[id] = false
}
public Spawn(id)
{
if(get_user_flags(id) == FLAGA){
autobhop_menu(id);
}
}
public autobhop_menu(id)
{
if(get_user_flags(id) == FLAGA){
show_menu(id, autobhopkeys, "\rWlaczyc auto bh?^n^n\r1. \wTak^n\r2. Nie^n", -1, "autobhopon")
} else {
client_print(id, print_chat, "Nie masz dostepu do tej komendy.")
}
}

public autobhopselecton(id, key)
{
if(key == 0)
{
bhop_enabled[id] = true
}
else if(key == 1)
{
bhop_enabled[id] = false
}
}

public client_PreThink(id)
{
if(bhop_enabled[id] == true)
{
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 & FL_WATERJUMP)
return PLUGIN_CONTINUE
if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
return PLUGIN_CONTINUE
if ( !(flags & FL_ONGROUND) )
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
}
Odpowiedz

  • +
  • -
LCA - zdjęcie LCA 19.07.2011

nie działa auto bh poprawisz?
Odpowiedz

  • +
  • -
Misiaczek ;c - zdjęcie Misiaczek ;c 19.07.2011


#include <amxmodx>
#include <engine>
#include <colorchat>
#include <hamsandwich>

#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
#define autobhopkeys (1<<0)|(1<<1)

#define FLAGA ADMIN_LEVEL_H
new bool:bhop_enabled[33]

public plugin_init()
{
register_plugin("Bunny Hop", "1.0", "CheesyPeteza & Lucky")

register_menucmd(register_menuid("autobhopon"), autobhopkeys, "autobhopselecton")
register_clcmd("say /bh", "autobhop_menu", FLAGA)
set_task(120.0, "autobhop_advert", 100, _, _, "b")
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
}

public autobhop_advert(id)
{
ColorChat(0, GREEN, "^4[www.mps.xaa.pl]^3 Wpisz^4 /bh^3, aby wlaczyc^4 auto bh!")
}

public client_connect(id)
{
bhop_enabled[id] = false
}
public Spawn(id)
{
if(get_user_flags(id) & FLAGA)
{
autobhop_menu(id);
}
}
public autobhop_menu(id)
{
show_menu(id, autobhopkeys, "\rWlaczyc auto bh?^n^n\r1. \wTak^n\r2. Nie^n", -1, "autobhopon")
}

public autobhopselecton(id, key)
{
if(key == 0)
{
bhop_enabled[id] = true
}
else if(key == 1)
{
bhop_enabled[id] = false
}
}

public client_PreThink(id)
{
if(bhop_enabled[id] == true)
{
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 & FL_WATERJUMP)
return PLUGIN_CONTINUE
if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
return PLUGIN_CONTINUE
if ( !(flags & FL_ONGROUND) )
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
}
Odpowiedz

  • +
  • -
LCA - zdjęcie LCA 20.07.2011

poprawi ktoś? teraz każdy może używac bh a chodzi o to aby tylko osoby z flagą t mogły używac
Odpowiedz
Zablokowany