/* Plugin generated by AMXX-Studio COMMAND : amx_superslap <target> <power> <interval> <times> Example : amx_superslap SAMURAI 0 1 5 -> it will slap SAMURAI 5 times with 0 dmg and an inteval of 1 second ACCESS : ADMIN_SLAY ( can be edited - defined ) CREDTIS : SAMURAI */ #include <amxmodx> #include <amxmisc> new const PLUGIN[] = "SUPER SLAP" new const AUTHOR[] = "Anakin" #define VERSION "1.0" #define ACCESS ADMIN_SLAY new show_act,type public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_dictionary("superslap.txt") register_concmd("amx_superslap","superslap_cmd",ACCESS,"- <gracz> <moc> <razy>") show_act = get_cvar_pointer("amx_show_activity"); type = register_cvar("announce_type","2"); } public superslap_cmd(id){ if(!(get_user_flags(id) & ACCESS)){ console_print(id,"%L",LANG_PLAYER,"NO_ACCESS") return PLUGIN_HANDLED } new arg[24],arg2[4],arg3[4] read_argv(1,arg,23) read_argv(2,arg2,3) read_argv(3,arg3,3) new slappower = str_to_num(arg2) new times = str_to_num(arg3) new target = cmd_target(id, arg, 8) if(!target){ console_print(id,"%L",LANG_PLAYER,"NOTFOUND",arg) return PLUGIN_HANDLED } if(read_argc() < 4){ console_print(id,"%L",LANG_PLAYER,"SUPERSLAP_USAGE") return PLUGIN_HANDLED } new name[32],name2[32] get_user_name(id,name,31) get_user_name(target,name2,31) new array[2] array[0] = target array[1] = slappower switch(get_pcvar_num(show_act)){ case 1: { switch(get_pcvar_num(type)){ case 1: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET",name2,slappower,times) } case 2: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET2",name,name2,slappower,times) } } } case 2: { switch(get_pcvar_num(type)){ case 1: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET2",name,name2,slappower,times) } case 2: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET2",name,name2,slappower,times) } } } } set_task(0.1, "superslap", 0, array, 2, "a", times); return PLUGIN_HANDLED } public superslap(array[2]){ new target = array[0] new powerslap = array[1] user_slap(target,powerslap,1) }
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.
|
Guest Message by DevFuse
SLAP PO KLIKNIĘCIU BINDA -- get_user_aiming?
Temat rozp.
camilost
, 24.11.2009 11:22
6 odpowiedzi w tym temacie
#1
Napisano 24.11.2009 11:22
Robię kumplowi serwer ZI prosił mnie, abym zrobił mu tak plugin ze slapami jak na pewnym serwerze(np. STER ZI), gdy admin celuje na gracza i wciśnie zbindowany button do slapów(np. amx_sslap % dmg razy) Gdzie % powinno sie samo ustawiać nick jak się celuje -- Celuje na gracza, klikam bind i gracz dostaje slapa 0dmg 7razy. Przerobiłem plugin SUPER SLAP, (skróciłem o 1komendę i chciałbym mieć jeszcze tą funkcję lecz nie potrafię tego zrobić . Jak coś to pytajcie jak nie rozumiecie. Chory jestem więc mam czas
#2
Napisano 24.11.2009 13:54
sprawdź
amx_aimslap
Załączone pliki
#3
Napisano 24.11.2009 15:06
Nie działa żadnych errorów nie ma:P Nie rusza nic Kilka razy próbowałem
#4
Napisano 24.11.2009 15:08
Odpowiem za kolegę, nie działa. Sprawdziłem bo mnie ten plugin zaciekawił
#5
Napisano 24.11.2009 15:10
Nie latwiej zrobic amx_slap nick 0 (cos w tym stylu?) standardowym plugiem amxx'a i tylko formatowac to w petli + wait by nie slapnelo 100x w jednej klatce?
#6
Napisano 24.11.2009 15:15
Nie : /. Na ZM gra wiele ludziów ;d Ktoś zablokuje celujesz na niego klikasz binda i ukarany. Nastepny to samo robi celujesz klikasz ukarany;d Szybko i zgrabnie
[ Dodano: 24-11-2009, 16:34 ]
Możliwe, że nie działał ponieważ nawet zwyczajnie nie działał (W ogóle nie slapował , nawet komenda amx_superslap nic nie dała) Poprawiłem plugin tak że slapuje normalnie, ileś tam razy itd.
R3X spróbuj jeszcze raz zrobić to z tym kodem poniżej W tamtym nie było co ile ma slapować sekund Aby slaplo np. 7 razy za 10 dmg wpisujemy w konsole amx_superslap nick 10 0 7.
amx_superslap
Spróbuj tak aby bind mógł być taki:
amx_aimslap
Tamto byłoby chyba dobre ale nie było w pluginie tego
Kod SMA poprawionego:
[ Dodano: 24-11-2009, 16:34 ]
Możliwe, że nie działał ponieważ nawet zwyczajnie nie działał (W ogóle nie slapował , nawet komenda amx_superslap nic nie dała) Poprawiłem plugin tak że slapuje normalnie, ileś tam razy itd.
R3X spróbuj jeszcze raz zrobić to z tym kodem poniżej W tamtym nie było co ile ma slapować sekund Aby slaplo np. 7 razy za 10 dmg wpisujemy w konsole amx_superslap nick 10 0 7.
amx_superslap
Spróbuj tak aby bind mógł być taki:
amx_aimslap
Tamto byłoby chyba dobre ale nie było w pluginie tego
Kod SMA poprawionego:
/* Plugin generated by AMXX-Studio COMMAND : amx_superslap <target> <power> <interval> <times> Example : amx_superslap SAMURAI 0 1 5 -> it will slap SAMURAI 5 times with 0 dmg and an inteval of 1 second ACCESS : ADMIN_SLAY ( can be edited - defined ) CREDTIS : SAMURAI */ #include <amxmodx> #include <amxmisc> new const PLUGIN[] = "SUPER SLAP" new const AUTHOR[] = "Anakin" #define VERSION "1.0" #define ACCESS ADMIN_SLAY new show_act,type public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_dictionary("superslap.txt") register_concmd("amx_superslap","superslap_cmd",ACCESS,"- <gracz> <moc> <odstep> <razy>") show_act = get_cvar_pointer("amx_show_activity"); type = register_cvar("announce_type","2"); } public superslap_cmd(id){ if(!(get_user_flags(id) & ACCESS)){ console_print(id,"%L",LANG_PLAYER,"NO_ACCESS") return PLUGIN_HANDLED } new arg[24],arg2[4],arg3[4],arg4[4] read_argv(1,arg,23) read_argv(2,arg2,3) read_argv(3,arg3,3) read_argv(4,arg4,3) new slappower = str_to_num(arg2) new times = str_to_num(arg4) new interval = str_to_num(arg3) new target = cmd_target(id, arg, 8) if(!target){ console_print(id,"%L",LANG_PLAYER,"NOTFOUND",arg) return PLUGIN_HANDLED } if(read_argc() < 4){ console_print(id,"%L",LANG_PLAYER,"SUPERSLAP_USAGE") return PLUGIN_HANDLED } new name[32],name2[32] get_user_name(id,name,31) get_user_name(target,name2,31) new array[2] array[0] = target array[1] = slappower switch(get_pcvar_num(show_act)){ case 1: { switch(get_pcvar_num(type)){ case 1: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET",name2,slappower,times) } case 2: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET2",name,name2,slappower,times) } } } case 2: { switch(get_pcvar_num(type)){ case 1: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET2",name,name2,slappower,times) } case 2: { client_print(0,print_chat,"%L",LANG_PLAYER,"SUPERSLAP_TARGET2",name,name2,slappower,times) } } } } set_task(float(interval), "superslap", 0, array, 2, "a", times); return PLUGIN_HANDLED } public superslap(array[2]){ new target = array[0] new powerslap = array[1] user_slap(target,powerslap,1) }
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych