hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.28. 17:19



Jelenlévő felhasználók

Jelenleg 236 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 235 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Google [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 16 hozzászólás ]  Oldal Előző 1 2
Szerző Üzenet
 Hozzászólás témája: Re: Admin Spectator ESP
HozzászólásElküldve: 2015.06.17. 21:36 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2014.09.08. 22:21
Hozzászólások: 3014
Megköszönt másnak: 96 alkalommal
Megköszönték neki: 555 alkalommal
http://www.amxmodx.org/dl.php?filename= ... indows.zip

addons/amxmodx/scripting/compile.exe-re ráhúzod a letöltött sma-t és compiled mappába teszi,azt feltöltöd a szerveredre,és ha még mindig nem megy,akkor valamit te rontottál el, csak nem tudom mit lehet ezen elrontani.

_________________
GitHub - mforce

Ők köszönték meg mforce nek ezt a hozzászólást: jokypapa (2015.06.17. 21:52)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Spectator ESP
HozzászólásElküldve: 2015.09.12. 00:38 
Offline
Őstag
Avatar

Csatlakozott: 2015.07.27. 22:56
Hozzászólások: 1367
Megköszönt másnak: 28 alkalommal
Megköszönték neki: 351 alkalommal
Két szerveren is kipróbáltam, egyiken csak ez a plugin volt bent. Viszont mind a kettőnél az "esp_menu"-ben csak a W/S (avagy előre/hátramenet) kapcsolja ki-be a plugint, de a számok egyszerűen csak elrejtik a menüt. Nem kapcsolhatóak a funkciók.

Ugyanaz a helyzet mint jokypapa-nál: az 1.4beta hibátlanul megy, de ez nem.
Fordítási gond nincs, errorlog sem.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Spectator ESP
HozzászólásElküldve: 2015.09.12. 00:53 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2014.09.08. 22:21
Hozzászólások: 3014
Megköszönt másnak: 96 alkalommal
Megköszönték neki: 555 alkalommal
Már nem használom, nem tudom így volt-e. De én nem emlékszek ilyesfajta problémára.
Ezt használom, ez nem kikapcsolható, de jóval kevesebbet eszik és csak a lényeget tudja.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. new g_iLaser;
  5. new bool:g_bAdmin[33];
  6. new bool:g_IsAlive[33];
  7.  
  8. public plugin_precache()
  9. g_iLaser = precache_model("sprites/laserbeam.spr");
  10.  
  11. public plugin_end()
  12. {
  13. new pl[32], pnum; get_players(pl, pnum);
  14. for(new i; i < pnum; i++)
  15. remove_task(pl[i]);
  16. }
  17.  
  18. public plugin_init()
  19. {
  20. register_plugin("AdminESP Lite", "1.10", "neugomon");
  21.  
  22. register_event("DeathMsg", "eDeathMsg", "a", "1>0");
  23. register_event("ResetHUD", "eResetHud", "be");
  24. register_event("TextMsg", "eSpecMode", "b", "2&#Spec_M");
  25. }
  26.  
  27. public client_putinserver(id)
  28. {
  29. g_bAdmin[id] = (get_user_flags(id) & ADMIN_KICK) ? true : false;
  30. g_IsAlive[id] = false;
  31. }
  32.  
  33. public client_disconnect(id)
  34. {
  35. if(g_bAdmin[id])
  36. remove_task(id);
  37. }
  38.  
  39. public eDeathMsg()
  40. g_IsAlive[read_data(2)] = false;
  41.  
  42. public eResetHud(id)
  43. g_IsAlive[id] = true;
  44.  
  45. public eSpecMode(id)
  46. {
  47. if(!g_bAdmin[id]) return;
  48.  
  49. if(entity_get_int(id, EV_INT_iuser1) == 4)
  50. set_task(0.3, "EspTimer", id, .flags="b");
  51. else
  52. remove_task(id);
  53. }
  54.  
  55. public EspTimer(id)
  56. {
  57. switch(g_IsAlive[id])
  58. {
  59. case false:
  60. {
  61. static iTarget; iTarget = entity_get_int(id, EV_INT_iuser2);
  62.  
  63. if(iTarget && is_user_alive(iTarget) && is_valid_ent(iTarget))
  64. SendQuadro(id, iTarget);
  65. }
  66. case true: remove_task(id);
  67.  
  68. }
  69. }
  70.  
  71. SendQuadro(id, iTarget)
  72. {
  73. static pl[32], pnum, my_team;
  74. static Float:my_origin[3], Float:target_origin[3], Float:v_middle[3], Float:v_hitpoint[3];
  75. static Float:distance, Float:distance_to_hitpoint, Float:distance_target_hitpoint, Float:scaled_bone_len;
  76. static Float:v_bone_start[3], Float:v_bone_end[3], Float:offset_vector[3], Float:eye_level[3];
  77.  
  78. entity_get_vector(iTarget, EV_VEC_origin, my_origin);
  79. my_team = get_user_team(iTarget);
  80. get_players(pl, pnum, "ah");
  81. for(new i; i < pnum; i++)
  82. {
  83. if(pl[i] == iTarget) continue;
  84. if(my_team == get_user_team(pl[i])) continue;
  85.  
  86. entity_get_vector(pl[i], EV_VEC_origin, target_origin);
  87. distance = vector_distance(my_origin, target_origin);
  88.  
  89. trace_line(-1, my_origin, target_origin, v_hitpoint);
  90.  
  91. subVec(target_origin, my_origin, v_middle);
  92. normalize(v_middle, offset_vector, (distance_to_hitpoint = vector_distance(my_origin, v_hitpoint)) - 10.0);
  93.  
  94. copyVec(my_origin, eye_level);
  95. eye_level[2] += 17.5;
  96. addVec(offset_vector, eye_level);
  97.  
  98. copyVec(offset_vector, v_bone_start);
  99. copyVec(offset_vector, v_bone_end);
  100. v_bone_end[2] -= (scaled_bone_len = distance_to_hitpoint / distance * 50.0);
  101.  
  102. if(distance_to_hitpoint == distance)
  103. continue;
  104.  
  105. distance_target_hitpoint = (distance - distance_to_hitpoint) / 12;
  106. MakeQuadrate(id, v_bone_start, v_bone_end, floatround(scaled_bone_len * 3.0), (distance_target_hitpoint < 170.0) ? (255 - floatround(distance_target_hitpoint)) : 85)
  107. }
  108. }
  109.  
  110. stock normalize(Float:Vec[3], Float:Ret[3], Float:multiplier)
  111. {
  112. static Float:len; len = vector_distance(Vec, Float:{ 0.0, 0.0, 0.0 });
  113. copyVec(Vec, Ret);
  114.  
  115. Ret[0] /= len;
  116. Ret[1] /= len;
  117. Ret[2] /= len;
  118. Ret[0] *= multiplier;
  119. Ret[1] *= multiplier;
  120. Ret[2] *= multiplier;
  121. }
  122.  
  123. stock copyVec(Float:Vec[3], Float:Ret[3])
  124. {
  125. Ret[0] = Vec[0];
  126. Ret[1] = Vec[1];
  127. Ret[2] = Vec[2];
  128. }
  129.  
  130. stock subVec(Float:Vec1[3], Float:Vec2[3], Float:Ret[3])
  131. {
  132. Ret[0] = Vec1[0] - Vec2[0];
  133. Ret[1] = Vec1[1] - Vec2[1];
  134. Ret[2] = Vec1[2] - Vec2[2];
  135. }
  136.  
  137. stock addVec(Float:Vec1[3], Float:Vec2[3])
  138. {
  139. Vec1[0] += Vec2[0];
  140. Vec1[1] += Vec2[1];
  141. Vec1[2] += Vec2[2];
  142. }
  143.  
  144. MakeQuadrate(id, Float:Vec1[3], Float:Vec2[3], width, brightness)
  145. {
  146. message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, { 0, 0, 0 }, id);
  147. write_byte(0);
  148. write_coord(floatround(Vec1[0]));
  149. write_coord(floatround(Vec1[1]));
  150. write_coord(floatround(Vec1[2]));
  151. write_coord(floatround(Vec2[0]));
  152. write_coord(floatround(Vec2[1]));
  153. write_coord(floatround(Vec2[2]));
  154. write_short(g_iLaser);
  155. write_byte(3);
  156. write_byte(0);
  157. write_byte(3);
  158. write_byte(width);
  159. write_byte(0);
  160. write_byte(0);
  161. write_byte(255);
  162. write_byte(0);
  163. write_byte(brightness);
  164. write_byte(0);
  165. message_end();
  166. }

_________________
GitHub - mforce

Ők köszönték meg mforce nek ezt a hozzászólást: ZiT3K (2021.02.21. 19:08)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Spectator ESP
HozzászólásElküldve: 2015.09.12. 01:10 
Offline
Őstag
Avatar

Csatlakozott: 2015.07.27. 22:56
Hozzászólások: 1367
Megköszönt másnak: 28 alkalommal
Megköszönték neki: 351 alkalommal
Köszi kipróbálom majd, igaz közben ráleltem erre a parancsra:
esp_settings 111111011

Minden egyes szám egy menüpontot jelöl, a fentiben például csak a töltényeket nem jelzi.

Iletve most találtam egy 1.5b minit is:
SMA Forráskód: [ Mindet kijelol ]
  1. /* AMX Mod X - Script
  2. *
  3. * Admin Spectator ESP v1.5
  4. * Copyright (C) 2006 by KoST
  5. *
  6. * this plugin along with its compiled version can de downloaded here:
  7. *
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  22. *
  23. * In addition, as a special exception, the author gives permission to
  24. * link the code of this program with the Half-Life Game Engine ("HL
  25. * Engine") and Modified Game Libraries ("MODs") developed by Valve,
  26. * L.L.C ("Valve"). You must obey the GNU General Public License in all
  27. * respects for all of the code used other than the HL Engine and MODs
  28. * from Valve. If you modify this file, you may extend this exception
  29. * to your version of the file, but you are not obligated to do so. If
  30. * you do not wish to do so, delete this exception statement from your
  31. * version.
  32. */
  33. //--------------------------------------------------------------------------------------------------
  34.  
  35. #include <amxmodx>
  36. #include <fakemeta>
  37.  
  38. // Here you can adjust the required admin level if needed
  39.  
  40. #define REQUIRED_ADMIN_LEVEL ADMIN_BAN
  41.  
  42. //--------------------------------------------------------------------------------------------------
  43.  
  44. #define PLUGIN "Admin ESP"
  45. #define VERSION "1.5b_mini"
  46. #define AUTHOR "KoST"
  47.  
  48. #define OFFSET_TEAM 114
  49.  
  50. new const g_szPlugin[] = PLUGIN; // Global this since it is used throughout
  51. new pcvar_esp, pcvar_esp_timer, pcvar_esp_allow_all, pcvar_esp_disable_default_keys;
  52. new team_colors[4][3] = {{0,0,0}, {150,0,0}, {0,0,150}, {0,150,0}};
  53. new esp_colors[5][3] = {{0,255,0}, {100,60,60}, {60,60,100}, {255,0,255}, {128,128,128}};
  54. new bool:admin[33]; // is/is not admin
  55. new bool:first_person[33]; // is/is not in first person view
  56. new bool:ducking[33]; // is/is not player ducked
  57. new bool:mode[33]; // 0 = line, 1 = box
  58. new bool:enabled[33]; // has esp on
  59. new spec[33]; // spec[player_id]=the players id if
  60. new laser; // precached model
  61. new max_players; // if you start hlds with +maxplayers 20 for example this would be 20
  62. new damage_done_to[33]; // damage_done_to[p1]=p2 // p1 has hit p2
  63. new view_target[33]; // attackers victim
  64.  
  65. public plugin_precache() {
  66. laser = precache_model("sprites/laserbeam.spr");
  67. }
  68.  
  69. public plugin_init() {
  70. register_plugin(g_szPlugin, VERSION, AUTHOR);
  71. server_print("^n^t%s v%s, Copyright (C) 2006 by %s^n", g_szPlugin, VERSION, AUTHOR);
  72.  
  73. // cvars
  74. pcvar_esp = register_cvar("esp", "1");
  75. pcvar_esp_timer = register_cvar("esp_timer", "0.4");
  76. pcvar_esp_allow_all = register_cvar("esp_allow_all", "0");
  77. pcvar_esp_disable_default_keys = register_cvar("esp_disable_default_keys", "0");
  78. register_cvar("aesp_version", VERSION, FCVAR_SERVER|FCVAR_UNLOGGED|FCVAR_SPONLY);
  79.  
  80. // client commands
  81. register_clcmd("esp_mode", "cmd_esp_mode", REQUIRED_ADMIN_LEVEL, "Toggle ESP type: line/box");
  82. register_clcmd("say /esp_mode", "cmd_esp_mode", REQUIRED_ADMIN_LEVEL, "Toggle ESP type: line/box");
  83. register_clcmd("esp_toggle", "cmd_esp_toggle", REQUIRED_ADMIN_LEVEL, "Toggle ESP on/off");
  84. register_clcmd("say /esp_toggle", "cmd_esp_toggle", REQUIRED_ADMIN_LEVEL, "Toggle ESP on/off");
  85.  
  86. // events
  87. register_event("StatusValue", "spec_target", "bd", "1=2");
  88. register_event("SpecHealth2", "spec_target", "bd");
  89. register_event("TextMsg", "spec_mode", "b", "2&#Spec_Mode");
  90. register_event("Damage", "event_Damage", "b", "2!0", "3=0", "4!0");
  91. register_event("ResetHUD", "reset_hud_alive", "be");
  92.  
  93. register_forward(FM_PlayerPreThink, "fwdPlayerPreThink");
  94. max_players = get_maxplayers();
  95. // start esp_timer for the first time
  96. set_task(1.0, "esp_timer");
  97. }
  98.  
  99. public client_putinserver(id) {
  100. first_person[id] = false;
  101. new args[1];
  102. args[0] = id;
  103. set_task(4.0, "delayed_putinserver", id + 100, args, 1);
  104. }
  105.  
  106. public delayed_putinserver(args[0])
  107. {
  108. new id = args[0];
  109. if (!is_user_connected(id))
  110. {
  111. return PLUGIN_HANDLED;
  112. }
  113. if ((get_user_flags(id) & REQUIRED_ADMIN_LEVEL) || get_pcvar_num(pcvar_esp_allow_all) == 1) {
  114. admin[id] = true;
  115. init_admin_options(id);
  116. } else {
  117. admin[id] = false;
  118. }
  119. return PLUGIN_CONTINUE;
  120. }
  121.  
  122. public client_disconnect(id) {
  123. save2vault(id);
  124. admin[id] = false;
  125. spec[id] = 0;
  126. remove_task(id + 100);
  127. }
  128.  
  129. public reset_hud_alive(id) {
  130. spec[id] = 0;
  131. }
  132.  
  133. public cmd_esp_toggle(id) {
  134. if (admin[id] && get_pcvar_num(pcvar_esp) == 1) {
  135. change_esp_status(id, !enabled[id]);
  136. }
  137. }
  138.  
  139. public cmd_esp_mode(id) {
  140. if (admin[id] && get_pcvar_num(pcvar_esp) == 1) {
  141. change_esp_mode(id, !mode[id]);
  142. }
  143. }
  144.  
  145. public event_Damage(id) {
  146. if (id>0) {
  147. new attacker = get_user_attacker(id)
  148. if (attacker > 0 && attacker <= max_players) {
  149. if (view_target[attacker] == id) {
  150. damage_done_to[attacker] = id;
  151. }
  152. }
  153. }
  154. return PLUGIN_CONTINUE;
  155. }
  156.  
  157. public spec_mode(id) {
  158. // discover if in first_person_view
  159. new specMode[12]
  160. read_data(2, specMode, 11);
  161.  
  162. if(equal(specMode, "#Spec_Mode4")) {
  163. first_person[id] = true;
  164. } else {
  165. first_person[id] = false;
  166. }
  167. return PLUGIN_CONTINUE;
  168. }
  169.  
  170. public spec_target(id) {
  171. if (id > 0) {
  172. new target = read_data(2);
  173. if (target != 0) {
  174. spec[id] = target;
  175. }
  176. }
  177. return PLUGIN_CONTINUE;
  178. }
  179.  
  180. init_admin_options(id) {
  181. mode[id] = false;
  182. enabled[id] = true;
  183. load_vault_data(id);
  184. }
  185.  
  186. save2vault(id) {
  187. if (admin[id]) {
  188. new authid[35];
  189. get_user_authid (id,authid,34);
  190. new tmp[3];
  191. tmp[0] = (mode[id]) ? '1' : '0';
  192. tmp[1] = (enabled[id]) ? '1' : '0';
  193.  
  194. //server_print("STEAMID: %s OPTIONS: %s", authid, tmp);
  195. new key[41];
  196. formatex(key, 40, "AESPmini_%s", authid);
  197. set_vaultdata(key, tmp);
  198. }
  199. }
  200.  
  201. load_vault_data(id) {
  202. if (admin[id]) {
  203. new data[3];
  204. new authid[35];
  205. get_user_authid (id,authid,34);
  206. new key[41];
  207. formatex(key,40, "AESPmini_%s", authid);
  208. get_vaultdata(key,data,2);
  209. if (strlen(data) > 0) {
  210. mode[id] = (data[0]=='1');
  211. enabled[id] = (data[1]=='1');
  212. }
  213. }
  214. }
  215.  
  216. change_esp_status(id, bool:on) {
  217. if (on) {
  218. enabled[id] = true;
  219. client_print(id, print_chat, "[%s] ON", g_szPlugin);
  220. } else {
  221. enabled[id] = false;
  222. client_print(id, print_chat, "[%s] OFF", g_szPlugin);
  223. }
  224. }
  225.  
  226. change_esp_mode(id, bool:on) {
  227. if (on) {
  228. mode[id] = true;
  229. client_print(id, print_chat, "[%s] Mode: Box", g_szPlugin);
  230. } else {
  231. mode[id] = false;
  232. client_print(id, print_chat, "[%s] Mode: Line", g_szPlugin);
  233. }
  234. }
  235.  
  236.  
  237. public fwdPlayerPreThink(id) {
  238. if (!is_user_connected(id)) return FMRES_IGNORED;
  239.  
  240. static button;
  241. button = pev(id, pev_button);
  242. if (button==0) return FMRES_IGNORED; // saves a lot of cpu
  243.  
  244. static oldbutton;
  245. oldbutton = pev(id, pev_oldbuttons);
  246.  
  247. if (button & IN_DUCK) {
  248. ducking[id] = true;
  249. } else {
  250. ducking[id] = false;
  251. }
  252.  
  253. if ((get_pcvar_num(pcvar_esp) == 1) && (get_pcvar_num(pcvar_esp_disable_default_keys) != 1)) {
  254. if (admin[id]) {
  255. if (first_person[id] && !is_user_alive(id)) {
  256. if ((button & IN_RELOAD) && !(oldbutton & IN_RELOAD)) {
  257. cmd_esp_mode(id);
  258. }
  259. if ((button & IN_FORWARD) && !(oldbutton & IN_FORWARD) && !enabled[id]) {
  260. change_esp_status(id, true);
  261. }
  262. if ((button & IN_BACK) && !(oldbutton & IN_BACK) && enabled[id]) {
  263. change_esp_status(id, false);
  264. }
  265. }
  266. }
  267. }
  268. return FMRES_HANDLED;
  269. }
  270.  
  271. public esp_timer() {
  272.  
  273. if (get_pcvar_num(pcvar_esp) != 1) { // if esp is not 1, it is off
  274. set_task(1.0, "esp_timer"); // check for reactivation in 1 sec intervals
  275. return PLUGIN_CONTINUE;
  276. }
  277.  
  278. static spec_id, Float:my_origin[3], my_team, s,
  279. target_team, Float:target_origin[3], Float:distance, width, Float:v_middle[3], Float:v_hitpoint[3],
  280. Float:distance_to_hitpoint, Float:scaled_bone_len, Float:scaled_bone_width, Float:v_bone_start[3],
  281. Float:v_bone_end[3], Float:offset_vector[3], Float:eye_level[3], Float:distance_target_hitpoint,
  282. actual_bright, color
  283.  
  284. for (new i = 1; i <= max_players; i++) { // loop through players
  285.  
  286. if (enabled[i] && first_person[i] && is_user_connected(i) && admin[i] && (!is_user_alive(i)) && (spec[i] > 0) && is_user_alive(spec[i])) { // <!-- s:) --><img src=\"{SMILIES_PATH}/icon_e_smile.gif\" alt=\":)\" title=\"mosoly\" /><!-- s:) -->
  287.  
  288. spec_id = spec[i];
  289. pev(i, pev_origin, my_origin); // get origin of spectating admin
  290. // get team of spectated <!-- s:) --><img src=\"{SMILIES_PATH}/icon_e_smile.gif\" alt=\":)\" title=\"mosoly\" /><!-- s:) -->
  291. my_team = get_pdata_int(spec_id, OFFSET_TEAM);
  292.  
  293. for (s = 1; s <= max_players; s++) { // loop through the targets
  294. if (is_user_alive(s)) { // target must be alive
  295. // get team of target
  296. target_team = get_pdata_int(s, OFFSET_TEAM);
  297. if (!(target_team == 3)) { //if not spectator
  298. if (spec_id != s) { // do not target myself
  299. // if the target is in the other team and not spectator
  300.  
  301. if (((my_team != target_team && (target_team == 1 || target_team == 2)) )) {
  302. // get origin of target
  303. pev(s, pev_origin, target_origin);
  304.  
  305.  
  306. // get distance from me to target
  307. distance = vector_distance(my_origin, target_origin);
  308.  
  309. if (!mode[i]) { // Draw LINE?
  310. // calculate width according to distance
  311. width = (distance < 2040.0) ? ( (255 - floatround(distance / 8.0) ) / 3 ) : 1;
  312.  
  313. // create temp_ent
  314. make_TE_BEAMENTPOINT(i, target_origin, width, target_team);
  315. }
  316.  
  317. // get vector from me to target
  318. subVec(target_origin, my_origin, v_middle);
  319.  
  320. // trace from me to target, getting hitpoint
  321. engfunc(EngFunc_TraceLine, my_origin, target_origin, 1, -1, 0);
  322. get_tr2(0, TR_vecEndPos, v_hitpoint);
  323.  
  324. // get distance from me to hitpoint (nearest wall)
  325. distance_to_hitpoint = vector_distance(my_origin, v_hitpoint);
  326.  
  327. // scale
  328. if (ducking[spec_id]) {
  329. scaled_bone_len = distance_to_hitpoint / distance * (50.0-18.0);
  330. } else {
  331. scaled_bone_len = distance_to_hitpoint / distance * 50.0;
  332. }
  333. scaled_bone_len = distance_to_hitpoint / distance * 50.0;
  334. scaled_bone_width = distance_to_hitpoint / distance * 150.0;
  335.  
  336. // get the point 10.0 units away from wall
  337. normalize(v_middle, offset_vector, distance_to_hitpoint - 10.0); // offset from wall
  338.  
  339. // set to eye level
  340. copyVec(my_origin, eye_level);
  341.  
  342. if (ducking[spec_id]) {
  343. eye_level[2] += 12.3
  344. } else {
  345. eye_level[2] += 17.5
  346. }
  347.  
  348. addVec(offset_vector, eye_level);
  349.  
  350. // start and end of green box
  351. copyVec(offset_vector, v_bone_start);
  352. copyVec(offset_vector, v_bone_end);
  353. v_bone_end[2] -= scaled_bone_len;
  354.  
  355. distance_target_hitpoint = distance - distance_to_hitpoint;
  356. actual_bright = 255;
  357.  
  358. if (mode[i]) { // Draw BOX?
  359. // this is to make green box darker if distance is larger
  360. if (distance_target_hitpoint < 2040.0) {
  361. actual_bright = (255 - floatround(distance_target_hitpoint / 12.0));
  362. } else {
  363. actual_bright = 85;
  364. }
  365. if (distance_to_hitpoint != distance) { // if no line of sight
  366. color = 0;
  367. } else { // if line of sight
  368. color = target_team;
  369. }
  370. if (damage_done_to[spec_id] == s) {
  371. color = 3;
  372. damage_done_to[spec_id] = 0;
  373. }
  374. make_TE_BEAMPOINTS(i, color, v_bone_start, v_bone_end, floatround(scaled_bone_width), actual_bright);
  375. }
  376. }
  377. }
  378. }
  379. }
  380. } // inner player loop end
  381. }
  382. }
  383. set_task(get_pcvar_float(pcvar_esp_timer), "esp_timer"); // keep it going
  384. return PLUGIN_CONTINUE;
  385. }
  386.  
  387. // Vector Operations -------------------------------------------------------------------------------
  388.  
  389. Float:getVecLen(Float:Vec[3]) {
  390. new Float:VecNull[3] = {0.0,0.0,0.0};
  391. new Float:len = vector_distance(Vec, VecNull);
  392. return len;
  393. }
  394.  
  395. normalize(Float:Vec[3], Float:Ret[3], Float:multiplier) {
  396. new Float:len = getVecLen(Vec);
  397. copyVec(Vec, Ret);
  398. Ret[0] /= len;
  399. Ret[1] /= len;
  400. Ret[2] /= len;
  401. Ret[0] *= multiplier;
  402. Ret[1] *= multiplier;
  403. Ret[2] *= multiplier;
  404. }
  405.  
  406. copyVec(Float:Vec[3], Float:Ret[3]) {
  407. Ret[0] = Vec[0];
  408. Ret[1] = Vec[1];
  409. Ret[2] = Vec[2];
  410. }
  411.  
  412. subVec(Float:Vec1[3], Float:Vec2[3], Float:Ret[3]) {
  413. Ret[0] = Vec1[0] - Vec2[0];
  414. Ret[1] = Vec1[1] - Vec2[1];
  415. Ret[2] = Vec1[2] - Vec2[2];
  416. }
  417.  
  418. addVec(Float:Vec1[3], Float:Vec2[3]) {
  419. Vec1[0] += Vec2[0];
  420. Vec1[1] += Vec2[1];
  421. Vec1[2] += Vec2[2];
  422. }
  423.  
  424. // Temporary Entities ------------------------------------------------------------------------------
  425. // there is a list of much more temp entities at: http://djeyl.net/forum/index.php?s=80ec ... &id=290870
  426. // all messages are sent with MSG_ONE_UNRELIABLE flag to avoid overflow in case of very low esp_timer setting and much targets
  427.  
  428. make_TE_BEAMPOINTS(id,color, Float:Vec1[3], Float:Vec2[3], width, brightness) {
  429. message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0,0,0}, id); //message begin
  430. write_byte(0);
  431. write_coord(floatround(Vec1[0])); // start position
  432. write_coord(floatround(Vec1[1]));
  433. write_coord(floatround(Vec1[2]));
  434. write_coord(floatround(Vec2[0])); // end position
  435. write_coord(floatround(Vec2[1]));
  436. write_coord(floatround(Vec2[2]));
  437. write_short(laser); // sprite index
  438. write_byte(3); // starting frame
  439. write_byte(0); // frame rate in 0.1's
  440. write_byte(floatround(get_pcvar_float(pcvar_esp_timer) * 10)); // life in 0.1's
  441. write_byte(width); // line width in 0.1's
  442. write_byte(0); // noise amplitude in 0.01's
  443. write_byte(esp_colors[color][0]);
  444. write_byte(esp_colors[color][1]);
  445. write_byte(esp_colors[color][2]);
  446. write_byte(brightness); // brightness)
  447. write_byte(0); // scroll speed in 0.1's
  448. message_end();
  449. }
  450.  
  451. make_TE_BEAMENTPOINT(id, Float:target_origin[3], width, target_team) {
  452. message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0,0,0}, id);
  453. write_byte(1);
  454. write_short(id);
  455. write_coord(floatround(target_origin[0]));
  456. write_coord(floatround(target_origin[1]));
  457. write_coord(floatround(target_origin[2]));
  458. write_short(laser);
  459. write_byte(1);
  460. write_byte(1);
  461. write_byte(floatround(get_pcvar_float(pcvar_esp_timer) * 10));
  462. write_byte(width);
  463. write_byte(0);
  464. write_byte(team_colors[target_team][0]);
  465. write_byte(team_colors[target_team][1]);
  466. write_byte(team_colors[target_team][2]);
  467. write_byte(255);
  468. write_byte(0);
  469. message_end();
  470. }
  471. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  472. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
  473. */
  474.  



UI.: de durván összetört az oldal egy hosszú sortól :O


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Spectator ESP
HozzászólásElküldve: 2015.09.12. 09:00 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2014.09.08. 22:21
Hozzászólások: 3014
Megköszönt másnak: 96 alkalommal
Megköszönték neki: 555 alkalommal
Mini létére a fentebb említett lite verzió 166 sor a 477-el szemben :)

_________________
GitHub - mforce


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Admin Spectator ESP
HozzászólásElküldve: 2021.02.21. 19:18 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.12.15. 19:13
Hozzászólások: 495
Megköszönt másnak: 289 alkalommal
Megköszönték neki: 14 alkalommal
semmi már.


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 16 hozzászólás ]  Oldal Előző 1 2


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 10 vendég


Nem nyithatsz témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole