#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #define PLUGIN "Admin Assassin" #define VERSION "1.1" #define AUTHOR "solo" #define SPEED 450.0 #define RENDER 100 #define RENDERK 40 new bool:assassin[33] new Float:speed = SPEED // Speed while assassin mode is enabled new render = RENDER // Invisibility if as_rendering is 1 new renderk = RENDERK // invisibility with kinfe if as_rendering is 1 new as_rendering // Cvar new as_gravity // Cvar public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_concmd("amx_as", "cmd_assassin", ADMIN_SLAY, "<authid, nick or #userid> <on|off> - set assassin mode on player") register_event("CurWeapon", "set_speed", "be", "1=0") register_event("ResetHUD", "set_abilities", "be") as_rendering = register_cvar("as_rendering", "1") as_gravity = register_cvar("as_gravity", "40") } public set_speed(id) { if (assassin[id]) { set_user_maxspeed(id, speed) if (get_pcvar_num(as_rendering)) { new ammo, clip new weapon = get_user_weapon(id, clip, ammo) if (weapon == CSW_KNIFE) { set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, renderk) } else { set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, render) } } else if (!get_pcvar_num(as_rendering)) { set_entity_visibility(id, 0) } } } public set_abilities(id) { if (assassin[id]) { if (get_pcvar_num(as_rendering)) { set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, render) } else if (!get_pcvar_num(as_rendering)) { set_entity_visibility(id, 0) } new Float:usergrav = get_pcvar_float(as_gravity) / 100 set_user_footsteps(id, 1) set_user_gravity(id, usergrav) set_user_maxspeed(id, speed) } } public cmd_assassin(id, level, cid) { if (!cmd_access(id,level,cid,3)) { return PLUGIN_HANDLED } new target[24], status[4] read_argv(1, target, 23) read_argv(2, status, 3) new Player = cmd_target(id, target, 2) if (equal(status, "on")) { cmd_abilities(Player, 1, id) } if(equal(status, "off")) { cmd_abilities(Player, 0, id) } return PLUGIN_HANDLED } public cmd_abilities (id, status, admin) { new name[2][32] get_user_name(id, name[0], 31) get_user_name(admin, name[1], 31) if (status == 1) { if (assassin[id]) { console_print(admin, "Assassin mode is already enabled on client %s", name[0]) return PLUGIN_HANDLED } else { if (get_pcvar_num(as_rendering)) { set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, render) } else if (!get_pcvar_num(as_rendering)) { set_entity_visibility(id, 0) } new Float:usergrav = get_pcvar_float(as_gravity) / 100 set_user_footsteps(id, 1) set_user_gravity(id, usergrav) set_user_maxspeed(id, speed) assassin[id] = true console_print(admin, "Assassin mode has been enabled on client %s", name[0]) switch(get_cvar_num("amx_show_activity")) { case 1 : client_print(0,print_chat,"[AMXX] ADMIN: Enable assassin mode on player %s",name[0]); case 2 : client_print(0,print_chat,"[AMXX] ADMIN %S: Enable assassin mode on player %s",name[1],name[0]); } return PLUGIN_HANDLED } } if (status == 0) { if (!assassin[id]) { console_print(admin, "Assassin mode is already disabled on client %s", name[0]) return PLUGIN_HANDLED } else { if (get_pcvar_num(as_rendering)) { set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255) } if (!get_pcvar_num(as_rendering)) { set_entity_visibility(id, 1) } set_user_footsteps(id, 0) set_user_gravity(id, 1.0) set_user_maxspeed(id, 320.0) assassin[id] = false console_print(admin, "Assassin mode has been disabled on client %s", name[0]) switch(get_cvar_num("amx_show_activity")) { case 1 : client_print(0,print_chat,"[AMXX] ADMIN: Disable assassin mode on player %s",name[0]); case 2 : client_print(0,print_chat,"[AMXX] ADMIN %S: Disable assassin mode on player %s",name[1],name[0]); } return PLUGIN_HANDLED } } return PLUGIN_HANDLED } public client_connect(id) { assassin[id] = false } public client_disconnect(id) { assassin[id] = false } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1061 f0 fs16 n par } */
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
Przerobka
Temat rozp. ZBAGI, 14.01.2009 18:25
4 odpowiedzi w tym temacie
#1
Napisano 14.01.2009 18:25
witam, może ktoś przerobić by osoba mająca "asasyna" nie była niewidzialna ?
#2
Napisano 14.01.2009 18:28
new render = RENDER // Invisibility if as_rendering is 1 as_rendering = register_cvar("as_rendering", "1")To jest zwykły cvar. Dopisz do amxx.cfg
as_rendering 0Lub zmień tą linijkę w sma:
as_rendering = register_cvar("as_rendering", "1") na as_rendering = register_cvar("as_rendering", "0")
#3
Napisano 14.01.2009 18:41
ta jak jest as_rendering 1 to jest przezroczysty
a jak jest as_rendering 0 to jest w ogóle niewidzialny
a jak jest as_rendering 0 to jest w ogóle niewidzialny
#4
Napisano 14.01.2009 18:57
W takim razie próbuj tego:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #define PLUGIN "Admin Assassin" #define VERSION "1.1" #define AUTHOR "solo" #define SPEED 450.0 #define RENDER 100 #define RENDERK 40 new bool:assassin[33] new Float:speed = SPEED // Speed while assassin mode is enabled new as_gravity // Cvar public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_concmd("amx_as", "cmd_assassin", ADMIN_SLAY, "<authid, nick or #userid> <on|off> - set assassin mode on player") register_event("CurWeapon", "set_speed", "be", "1=0") register_event("ResetHUD", "set_abilities", "be") as_gravity = register_cvar("as_gravity", "40") } public set_speed(id) { if (assassin[id]) set_user_maxspeed(id, speed) } public set_abilities(id) { if (assassin[id]) { new Float:usergrav = get_pcvar_float(as_gravity) / 100 set_user_footsteps(id, 1) set_user_gravity(id, usergrav) set_user_maxspeed(id, speed) } } public cmd_assassin(id, level, cid) { if (!cmd_access(id,level,cid,3)) { return PLUGIN_HANDLED } new target[24], status[4] read_argv(1, target, 23) read_argv(2, status, 3) new Player = cmd_target(id, target, 2) if (equal(status, "on")) { cmd_abilities(Player, 1, id) } if(equal(status, "off")) { cmd_abilities(Player, 0, id) } return PLUGIN_HANDLED } public cmd_abilities (id, status, admin) { new name[2][32] get_user_name(id, name[0], 31) get_user_name(admin, name[1], 31) if (status == 1) { if (assassin[id]) { console_print(admin, "Assassin mode is already enabled on client %s", name[0]) return PLUGIN_HANDLED } else { new Float:usergrav = get_pcvar_float(as_gravity) / 100 set_user_footsteps(id, 1) set_user_gravity(id, usergrav) set_user_maxspeed(id, speed) assassin[id] = true console_print(admin, "Assassin mode has been enabled on client %s", name[0]) switch(get_cvar_num("amx_show_activity")) { case 1 : client_print(0,print_chat,"[AMXX] ADMIN: Enable assassin mode on player %s",name[0]); case 2 : client_print(0,print_chat,"[AMXX] ADMIN %S: Enable assassin mode on player %s",name[1],name[0]); } return PLUGIN_HANDLED } } if (status == 0) { if (!assassin[id]) { console_print(admin, "Assassin mode is already disabled on client %s", name[0]) return PLUGIN_HANDLED } else { set_user_footsteps(id, 0) set_user_gravity(id, 1.0) set_user_maxspeed(id, 320.0) assassin[id] = false console_print(admin, "Assassin mode has been disabled on client %s", name[0]) switch(get_cvar_num("amx_show_activity")) { case 1 : client_print(0,print_chat,"[AMXX] ADMIN: Disable assassin mode on player %s",name[0]); case 2 : client_print(0,print_chat,"[AMXX] ADMIN %S: Disable assassin mode on player %s",name[1],name[0]); } return PLUGIN_HANDLED } } return PLUGIN_HANDLED } public client_connect(id) { assassin[id] = false } public client_disconnect(id) { assassin[id] = false } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1061 f0 fs16 n par } */
#5
Napisano 15.01.2009 16:30
o to mi też było potrzebe.
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych