#include <amxmodx> public plugin_init() { register_plugin("PLUGIN","VERSION","AUTHOR") register_clcmd("say /bh", "bh") } public bh(id) {
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Jak napisać to
#1
Napisano 20.10.2008 20:03
#2
Napisano 22.10.2008 09:09
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <fakemeta> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "MaKeL" new skok[33] = 0 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_forward(FM_PlayerPreThink , "Forward_FM_PlayerPreThink") } public client_PreThink ( id ) { if(!is_user_alive(id)) return PLUGIN_HANDLED if((get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP)) { if(skok[id] == 0 ) { 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) skok[id] = 1 } } if(get_entity_flags(id) & FL_ONGROUND) { skok[id] = 0 } return PLUGIN_CONTINUE }
#3
Napisano 22.10.2008 12:07
new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2]+=268.3 entity_set_vector(id,EV_VEC_velocity,velocity)
makel9, twoj kod pozwalal skonczyc w przepasc na mapie kz i uratowac sie przez podskok nad sama ziemia. Ten kodzik po prostu zwieksza o tyle predkosc wznoszenia, ile ma sie faktycznie sil w nogach ;-)
#4
Napisano 22.10.2008 16:12
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <fakemeta> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "MaKeL" new skok[33] = 0 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_forward(FM_PlayerPreThink , "Forward_FM_PlayerPreThink") } public client_PreThink ( id ) { if(!is_user_alive(id)) return PLUGIN_HANDLED if((get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP)) { if(skok[id] == 0 ) { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2]+=268.3 entity_set_vector(id,EV_VEC_velocity,velocity) skok[id] = 1 } } if(get_entity_flags(id) & FL_ONGROUND) { skok[id] = 0 } return PLUGIN_CONTINUE }
Edit:
A tak zadziała może wiesz?
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <fakemeta> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "MaKeL" new skok[33] = 0 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /bh", "bh") } public bh( id ) { if(!is_user_alive(id)) return PLUGIN_HANDLED if((get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP)) { if(skok[id] == 0 ) { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2]+=268.3 entity_set_vector(id,EV_VEC_velocity,velocity) skok[id] = 1 } } if(get_entity_flags(id) & FL_ONGROUND) { skok[id] = 0 } return PLUGIN_CONTINUE }
#5
Napisano 22.10.2008 16:44
PS. new skok[33] = 0 // nie potrzebne =0 bo przy deklaracji wartosci sa i tak zerowane...
#6
Napisano 22.10.2008 17:09
#7
Napisano 22.10.2008 17:19
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <fakemeta> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "MaKeL" new skok[33] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_forward(FM_PlayerPreThink , "Forward_FM_PlayerPreThink") } public client_PreThink ( id ) { if(!is_user_alive(id)) return PLUGIN_HANDLED if((get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP)) { if(skok[id] == 0 ) { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2]+=268.3 entity_set_vector(id,EV_VEC_velocity,velocity) skok[id] = 1 } } if(get_entity_flags(id) & FL_ONGROUND) { skok[id] = 0 } return PLUGIN_CONTINUE }
#8
Napisano 22.10.2008 18:29
#9
Napisano 22.10.2008 18:52
#include <amxmodx> #include <fakemeta> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "MaKeL" new skok[33] new jumps[33] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_forward(FM_PlayerPreThink , "Forward_FM_PlayerPreThink") register_cvar("amx_max_jumps","1") } public client_PreThink ( id ) { if(!is_user_alive(id)) return PLUGIN_HANDLED if((get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP)) { if(skok[id] == 0 && jumps[id]<get_cvar_num("amx_max_jumps") { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2]+=268.3 entity_set_vector(id,EV_VEC_velocity,velocity) skok[id] = 1 jumps[id]++ } } if(get_entity_flags(id) & FL_ONGROUND) { skok[id] = 0 jumps[id] = 0 } return PLUGIN_CONTINUE }Zmienasz cvarem...
#10
Napisano 22.10.2008 20:55
#11
Napisano 22.10.2008 21:16
#include <amxmodx>
#include <fakemeta>
#include <engine>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "MaKeL"
new skok[33]
new jumps[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_PlayerPreThink , "Forward_FM_PlayerPreThink")
register_cvar("amx_max_jumps","1")
}
public client_PreThink ( id )
{
if(!is_user_alive(id))
return PLUGIN_HANDLED
if((get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP))
{
if(skok[id] == 0 && jumps[id])
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2]+=268.3
entity_set_vector(id,EV_VEC_velocity,velocity)
skok[id] = 1
jumps[id]++
}
}
if(get_entity_flags(id) & FL_ONGROUND)
{
skok[id] = 0
jumps[id] = 0
}
return PLUGIN_CONTINUE
}
Teraz powinno działać poprawnie
#12
Napisano 22.10.2008 21:22
Załączone pliki
#13
Napisano 22.10.2008 21:25
#14
Napisano 22.10.2008 21:27
#15
Napisano 22.10.2008 21:32
P.S mafia też dostanie za ten trud
#16
Napisano 22.10.2008 21:52
[ Dodano: 22-10-2008, 23:01 ]
#include <amxmodx> #include <fakemeta> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "MaKeL" new skok[33] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_forward(FM_PlayerPreThink , "Forward_FM_PlayerPreThink") register_cvar("amx_max_jumps","1") } public client_PreThink ( id ) { if(!is_user_alive(id)) return PLUGIN_HANDLED if((get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP)) { if(skok[id] < get_cvar_num("amx_max_jumps")) { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2]+=268.3 entity_set_vector(id,EV_VEC_velocity,velocity) skok[id]++ } } else if(get_entity_flags(id) & FL_ONGROUND) skok[id] = 0 return PLUGIN_CONTINUE }
#17
Napisano 22.10.2008 22:40
P.S Miczu wiesz jak zrobić coś takiego że unsera będzie podpalało i zabierało 5 hp w ciągu 1 sekundy aż będzie dead
#18
Napisano 22.10.2008 23:29
P.S Miczu wiesz jak zrobić coś takiego że unsera będzie podpalało i zabierało 5 hp w ciągu 1 sekundy aż będzie dead
to masz w amx_super
burn
#19
Napisano 23.10.2008 13:55
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych