Admin Spectator ESP v1.3 谁来作个汉化。
Description:This plugin allows admins who are spectating and are in 'first person view' of another player to see the enemies (and teammates) of that player through the walls. This may help to catch wallhackers http://forums.alliedmods.net/images/smilies/wink.gif
VAC-Info: there is no way that you could get banned by VAC when using this plugin, sure!
it is a serverside plugin which only spawns temporary entities (the most plugins use them to create visual effects) like WC3 for example.
[*]Quote:
Originally Posted by darkfyre
does this only let spectating admins use this plugin?
[*]Yes of course, it is for detection of wallhacking not for cheating !! (this plugin is only active if admin using it is spectating/dead)(click to enlarge)
http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low001.jpg http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low002.jpg http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low003.jpg http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low004.jpg
http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low006.jpg http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low007.jpg http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low008.jpg
http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low009.jpg http://webuser.hs-furtwangen.de/%7Ekoerfgen/amxmodx/shot_low010.jpg
回复: Admin Spectator ESP v1.3 谁来作个汉化。
ESP-Features:red/blue lines to the enemy depending on team (Terrorist=red CT=blue)
the lines will get wider depending on distance to target
a green box which shows the enemy position through walls
the box gets much brighter if there is line of sight between player and target
the box gets darker if distance to target is bigger
it briefly changes color if target is hit by player
info of the nearest target to the crosshair is shown:
the name of the target
health/armor
weapon name
clip/ammo
distance to target
shows the aim of the target (white lines)
Commands:
If you are dead and in 'first person view' of another player you have the following three options:
you can press your 'reload' button and the following menu appears:
Code:
Admin Sepctator ESP
is on (use move forward/backward to switch on/off)
1. Line is on
2. Box is on
3. Name is on
4. Health/Armor is on
5. Weapon is on
6. Clip/Ammo is on
7. Distance is on
8. Show TeamMates is off
9. Show AimVector is on
0. Exit
here you can adjust all esp options (each admin has individual settings)
you can press your 'move forward' (mostly: "w") button to enable your ESP (this also works when ESP menu is not open)
you can press your 'move backward' (mostly: "s") button to disable your ESP (this also works when ESP menu is not open)
that's all..
Optional:
if you do not like that you can control the ESP with reload/forward/backward keys you can set 'esp_disable_default_keys' to 1 which disables that functionality (see cvars). but then you have to use the following console or chat commands to control your ESP:
additionally you can bring the ESP menu up by typing '/esp_menu' in game chat.
and toggle your ESP on/off by typing '/esp_toggle' in game chat.
Commands:
if you want to bind keys to control your ESP you can use 'esp_menu' and 'esp_toggle' console commands.
for example:
bind f9 esp_menu
bind f10 esp_toggle
pressing f9 would show up your ESP menu
pressing f10 would toggle your ESP on/off
esp_settings nnnnnnnnnn default: 1111111101 -> you can set all esp options with this command (this is a client command, no cvar):
1->on
0->off
Warning: if you put this command in your config.cfg no menu settings are saved any more, since they will be overwritten every mapchange by this command !!
only put this in your config.cfg if you always want to start with the same settings each map.
a nice way to use this command for admins:
bind f9 "esp_settings 1111111101" -> pressing F9 sets esp to default settings
bind f10 "esp_settings 1111111111" -> pressing F10 sets esp to default and also shows teammates
for example:
'esp_settings 1011000001'
sets esp to these settings:
1 -> ESP_ON
0 -> ESP_LINE
1 -> ESP_BOX
1 -> ESP_NAME
0 -> ESP_HEALTH_ARMOR
0 -> ESP_WEAPON
0 -> ESP_CLIP_AMMO
0 -> ESP_DISTANCE
0 -> ESP_TEAM_MATES
1 -> ESP_AIM_VEC
Cvars:
esp 0/1 (on/off) default: 1 -> switch whole plugin on/off
esp_timer x.x default: 0.3 -> all graphics are redrawn every x.x seconds (refreshrate of all graphics) do not set this value <0.1
if you set this lower it is more accurate, but uses more resources
esp_allow_all 0/1 (on/off) default: 0 -> enable for all users (doesnt't check ADMIN_KICK flag) requires mapchange to activate
esp_disable_default_keys 0/1 default: 0 -> if you don't like that you can control the ESP with reload/forward/backward keys you can set this to 1 which disables that functionality.
Configuration:
This requires ADMIN_KICK flag ("c") for admins to work.
see amxmodx/configs/users.ini
if needed you can change it on line 42 of this plugin and recompile..
Code:
#define REQUIRED_ADMIN_LEVEL ADMIN_KICK
you can find a list of all flags here: http://www.amxmodx.org/funcwiki.php?...=1#const_admin
or..
you can set 'esp_allow_all 1' which allows all users regardless of admin or not to use esp
Required Modules: (enable in amxmodx/configs/modules.ini)
-- engine
To do:
-- override mp_forcechasecam
Thanks to:
+ VEN: (SpecHealth2 event and get_user_team 1 char)
+ EKS: (get_maxplayers)
+ Brad: suggestion (change color on hit/line of sight)
+ BoK | Krazy: suggestion (menu definition)
+ lantz69: general debug help/hudmessage interference
+ ElectroE: Traditional Chinese translation
+ and to all who contributed in this project..
ChangeLog:
+ 01/28/2006 v1.0
-- first release
+ 02/01/2006 v1.1
-- changed: client_authorized to client_putinserver
-- changed: event StatusValue to SpecHealth2
-- fixed: way of getting team changed
-- fixed: hardcoded maxplayers replaced by get_maxplayers()
-- added: lines are colored team based
-- fixed: placement error when ducked
-- added: change color when hit/in view
-- added: draw aim vector of target
-- added: menu
-- removed: some cvars (not needed anymore)
+ 02/01/2006 v1.2
-- added cvar esp_disable_default_keys to disable reload/forward/backward keys
-- added console commands
-- optimized: client_prethink
-- fixed: esp 0 should also disable ESP control
+ 02/10/2006 v1.2b/c/d
-- fixed: invalid player id
+ 02/11/2006 v1.2e
-- fixed: show teammates
+ 02/13/2006 v1.2f
-- fixed: hud message interfering with stats display
+ 02/14/2006 v1.2g
-- fixed: index out of bounds get_user_attacker()
+ 02/14/2006 v1.2h
-- changed: don't show command_help to non admin users
+ 03/06/2006 v1.2i
-- fixed: out ouf bounds error ()
+ 03/30/2006 v1.2j
-- added: now saves the menu options for each admin
-- changed: re-added StatusValue event
-- added: command 'esp_settings'
+ 05/06/2006 v1.3
-- added: resethud event (no fullupdate problem since this turns esp off)
回复: Admin Spectator ESP v1.3 谁来作个汉化。
晕。怎么上传不了附件,写出来算了 :/* AMX Mod X - Script
*
* Admin Spectator ESP v1.3
* Copyright (C) 2006 by KoST
*
* this plugin along with its compiled version can de downloaded here:
* http://www.amxmodx.org/forums/viewtopic.php?t=24787
*
*
*This program is free software; you can redistribute it and/or
*modify it under the terms of the GNU General Public License
*as published by the Free Software Foundation; either version 2
*of the License, or (at your option) any later version.
*
*This program is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
*GNU General Public License for more details.
*
*You should have received a copy of the GNU General Public License
*along with this program; if not, write to the Free Software
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301, USA.
*or download here: http://www.gnu.org/licenses/gpl.txt
*
*In addition, as a special exception, the author gives permission to
*link the code of this program with the Half-Life Game Engine ("HL
*Engine") and Modified Game Libraries ("MODs") developed by Valve,
*L.L.C ("Valve"). You must obey the GNU General Public License in all
*respects for all of the code used other than the HL Engine and MODs
*from Valve. If you modify this file, you may extend this exception
*to your version of the file, but you are not obligated to do so. If
*you do not wish to do so, delete this exception statement from your
*version.
*/
//--------------------------------------------------------------------------------------------------
#include <amxmodx>
#include <engine>
// Here you can adjust the required admin level if needed
// there is a list of all levels http://www.amxmodx.org/funcwiki.php?go=module&id=1#const_admin
#define REQUIRED_ADMIN_LEVEL ADMIN_KICK
//--------------------------------------------------------------------------------------------------
#define PLUGIN "Admin Spectator ESP"
#define VERSION "1.3"
#define AUTHOR "KoST"
enum {
ESP_ON=0,
ESP_LINE,
ESP_BOX,
ESP_NAME,
ESP_HEALTH_ARMOR,
ESP_WEAPON,
ESP_CLIP_AMMO,
ESP_DISTANCE,
ESP_TEAM_MATES,
ESP_AIM_VEC,
}
new bool:admin // is/is not admin
new bool:first_person //is/is not in first person view
new spec // spec=the players id if
new laser // precached model
new max_players // if you start hlds with +maxplayers 20 for example this would be 20
new team_colors={{0,0,0},{150,0,0},{0,0,150},{0,150,0}}
new esp_colors={{0,255,0},{100,60,60},{60,60,100},{255,0,255},{128,128,128}}
new bool:ducking //is/is not player ducked
new damage_done_to //damage_done_to=p2 // p1 has hit p2
new view_target // attackers victim
new bool:admin_options // individual esp options
new bool:is_in_menu // has esp menu open
// weapon strings
new weapons={"None","P228","Scout","HE","XM1014","C4",
"MAC-10","AUG","Smoke","Elite","Fiveseven",
"UMP45","SIG550","Galil","Famas","USP",
"Glock","AWP","MP5","M249","M3","M4A1",
"TMP","G3SG1","Flash","Deagle","SG552",
"AK47","Knife","P90"}
public plugin_precache(){
laser=precache_model("sprites/laserbeam.spr")
}
public plugin_init(){
register_plugin(PLUGIN,VERSION,AUTHOR)
server_print("^n^t%s v%s, Copyright (C) 2006 by %s^n",PLUGIN,VERSION,AUTHOR)
// cvars
register_cvar("esp","1")
register_cvar("esp_timer","0.3")
register_cvar("esp_allow_all","0")
register_cvar("esp_disable_default_keys","0")
register_cvar("aesp_version",VERSION,FCVAR_SERVER|FCVAR_UNLOGGED|FCVAR_SPONLY)
// client commands
register_clcmd("esp_menu","cmd_esp_menu",REQUIRED_ADMIN_LEVEL,"Shows ESP Menu")
register_clcmd("esp_toggle","cmd_esp_toggle",REQUIRED_ADMIN_LEVEL,"Toggle ESP on/off")
register_clcmd("say /esp_menu","cmd_esp_menu",REQUIRED_ADMIN_LEVEL,"Shows ESP Menu")
register_clcmd("say /esp_toggle","cmd_esp_toggle",REQUIRED_ADMIN_LEVEL,"Toggle ESP on/off")
register_clcmd("esp_settings","cmd_esp_settings",REQUIRED_ADMIN_LEVEL," ESP adasdsassdasd")
// events
register_event("StatusValue","spec_target","bd","1=2")
register_event("SpecHealth2","spec_target","bd")
register_event("TextMsg","spec_mode","b","2&#Spec_Mode")
register_event("Damage", "event_Damage", "b", "2!0", "3=0", "4!0")
register_event("ResetHUD", "reset_hud_alive", "be")
// menu
new keys=MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9
register_menucmd(register_menuid("Admin Specator ESP"),keys,"menu_esp")
max_players=get_maxplayers()
// start esp_timer for the first time
set_task(1.0,"esp_timer")
}
public reset_hud_alive(id){
spec=0
return PLUGIN_CONTINUE
}
public cmd_esp_settings(id){
if (admin){
new out
read_argv(1,out,10)
new len=strlen(out)
for (new i=0;i<len;i++){
if (out=='1'){
admin_options=true
}else{
admin_options=false
}
}
}
}
public cmd_esp_menu(id){
if (admin && get_cvar_num("esp")==1){
show_esp_menu(id)
}
}
public cmd_esp_toggle(id){
if (admin && get_cvar_num("esp")==1){
change_esp_status(id,!admin_options)
}
}
public show_esp_menu(id){
is_in_menu=true
new menu
new keys=MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9
new onoff[]={{"\roff\w"},{"\yon\w"}} // \r=red \y=yellow \w white
new text[]={{"(use move forward/backward to switch on/off)"},{"(use esp_toggle command to toggle)"}} // \r=red \y=yellow \w white
new text_index=get_cvar_num("esp_disable_default_keys")
if (text_index!=1) text_index=0
format(menu, 300, "Admin Specator ESP^nis %s %s^n^n1. Line is %s^n2. Box is %s^n3. Name is %s^n4. Health/Armor is %s^n5. Weapon is %s^n6. Clip/Ammo is %s^n7. Distance is %s^n8. Show TeamMates is %s^n9. Show AimVector is %s^n^n0. Exit",
onoff],
text,
onoff],
onoff],
onoff],
onoff],
onoff],
onoff],
onoff],
onoff],
onoff])
show_menu(id,keys,menu)
return PLUGIN_HANDLED
}
public menu_esp(id,key){
if (key==9){ // exit
is_in_menu=false
return PLUGIN_HANDLED
}
// toggle esp options
if (admin_options){
admin_options=false
}else{
admin_options=true
}
show_esp_menu(id)
return PLUGIN_HANDLED
}
public event_Damage(id){
if (id>0) {
new attacker=get_user_attacker(id)
if (attacker>0 && attacker<=max_players){
if (view_target==id){
damage_done_to=id
}
}
}
return PLUGIN_CONTINUE
}
public spec_mode(id){
// discover if in first_person_view
new specMode
read_data(2,specMode,11)
if(equal(specMode,"#Spec_Mode4")){
first_person=true
}else{
first_person=false
}
return PLUGIN_CONTINUE
}
public spec_target(id){
if (id>0){
new target=read_data(2)
if (target!=0){
spec=target
}
}
return PLUGIN_CONTINUE
}
public client_putinserver(id){
first_person=false
if ((get_user_flags(id) & REQUIRED_ADMIN_LEVEL) || get_cvar_num("esp_allow_all")==1){
admin=true
init_admin_options(id)
}else{
admin=false
}
}
public init_admin_options(id){
for (new i=0;i<10;i++){
admin_options=true
}
admin_options=false
load_vault_data(id)
}
public save2vault(id){
if (admin){
new authid
get_user_authid (id,authid,34)
new tmp
for (new s=0;s<10;s++){
if (admin_options){
tmp='1';
}else{
tmp='0';
}
}
tmp=0
//server_print("STEAMID: %s OPTIONS: %s",authid,tmp);
new key
format(key,40,"AESP_%s",authid)
set_vaultdata(key,tmp)
}
}
public load_vault_data(id){
if (admin){
new data
new authid
get_user_authid (id,authid,34)
new key
format(key,40,"AESP_%s",authid)
get_vaultdata(key,data,10)
if (strlen(data)>0){
for (new s=0;s<10;s++){
if (data=='1'){
admin_options=true
}else{
admin_options=false
}
}
}
}
}
public client_disconnect(id){
save2vault(id)
admin=false
spec=0
}
public change_esp_status(id,bool:on){
if (on){
admin_options=true
if (!is_in_menu) client_print(id,print_chat,"[%s] ON",PLUGIN)
if (is_in_menu) show_esp_menu(id)
}else{
admin_options=false
if (!is_in_menu) client_print(id,print_chat,"[%s] OFF",PLUGIN)
if (is_in_menu) show_esp_menu(id)
}
}
public client_PreThink(id){
if (!is_user_connected(id)) return PLUGIN_CONTINUE
new button=get_user_button(id)
if (button==0) return PLUGIN_CONTINUE // saves a lot of cpu
new oldbutton=get_user_oldbutton(id)
if (button & IN_DUCK){
ducking=true
}else{
ducking=false
}
if ((get_cvar_num("esp")==1) && (get_cvar_num("esp_disable_default_keys")!=1)){
if (admin){
if (first_person && !is_user_alive(id)){
if ((button & IN_RELOAD) && !(oldbutton & IN_RELOAD)){
show_esp_menu(id)
}
if ((button & IN_FORWARD)&& !(oldbutton & IN_FORWARD) && !admin_options){
change_esp_status(id,true)
}
if ((button & IN_BACK)&& !(oldbutton & IN_BACK) && admin_options){
change_esp_status(id,false)
}
}
}
}
return PLUGIN_CONTINUE
}
public draw_aim_vector(i,s,len){
new Float:endpoint
new tmp
new Float:vec1
get_user_origin(s, tmp, 1)
IVecFVec(tmp,vec1)
vec1-=6.0
VelocityByAim(s,len,endpoint) // get aim vector
addVec(endpoint,vec1) // add origin to get absolute coordinates
make_TE_BEAMPOINTS(i,4,vec1,endpoint,10,0,255)
return PLUGIN_CONTINUE
}
public esp_timer(){
if (get_cvar_num("esp")!=1) { // if esp is not 1, it is off
set_task(1.0,"esp_timer") // check for reactivation in 1 sec intervals
return PLUGIN_CONTINUE
}
for (new i=1;i<=max_players;i++){ // loop through players
if (admin_options && first_person && is_user_connected(i) && admin && (!is_user_alive(i)) && (spec>0) && is_user_alive(spec)){ // :)
new spec_id=spec
new Float:my_origin
entity_get_vector(i,EV_VEC_origin,my_origin) // get origin of spectating admin
new my_team
my_team=get_team(spec_id) // get team of spectated :)
new Float:smallest_angle=180.0
new smallest_id=0
new Float:xp=2.0,Float:yp=2.0 // x,y of hudmessage
new Float:dist
for (new s=1;s<=max_players;s++){ // loop through the targets
if (is_user_alive(s)){ // target must be alive
new target_team=get_team(s) // get team of target
if (!(target_team==3)){ //if not spectator
if (spec_id!=s){ // do not target myself
// if the target is in the other team and not spectator
if (((my_team!=target_team && (target_team==1 || target_team==2)) || admin_options)){
new Float:target_origin
// get origin of target
entity_get_vector(s,EV_VEC_origin,target_origin)
// get distance from me to target
new Float:distance=vector_distance(my_origin,target_origin)
if (admin_options){
new width
if (distance<2040.0){
// calculate width according to distance
width=(255-floatround(distance/8.0))/3
}else{
width=1
}
// create temp_ent
make_TE_BEAMENTPOINT(i,target_origin,width,target_team)
}
// get vector from me to target
new Float:v_middle
subVec(target_origin,my_origin,v_middle)
// trace from me to target, getting hitpoint
new Float:v_hitpoint
trace_line (-1,my_origin,target_origin,v_hitpoint)
// get distance from me to hitpoint (nearest wall)
new Float:distance_to_hitpoint=vector_distance(my_origin,v_hitpoint)
// scale
new Float:scaled_bone_len
if (ducking){
scaled_bone_len=distance_to_hitpoint/distance*(50.0-18.0)
}else{
scaled_bone_len=distance_to_hitpoint/distance*50.0
}
scaled_bone_len=distance_to_hitpoint/distance*50.0
new Float:scaled_bone_width=distance_to_hitpoint/distance*150.0
new Float:v_bone_start,Float:v_bone_end
new Float:offset_vector
// get the point 10.0 units away from wall
normalize(v_middle,offset_vector,distance_to_hitpoint-10.0) // offset from wall
// set to eye level
new Float:eye_level
copyVec(my_origin,eye_level)
if (ducking){
eye_level+=12.3
}else{
eye_level+=17.5
}
addVec(offset_vector,eye_level)
// start and end of green box
copyVec(offset_vector,v_bone_start)
copyVec(offset_vector,v_bone_end)
v_bone_end-=scaled_bone_len
new Float:distance_target_hitpoint=distance-distance_to_hitpoint
new actual_bright=255
if (admin_options){
// this is to make green box darker if distance is larger
if (distance_target_hitpoint<2040.0){
actual_bright=(255-floatround(distance_target_hitpoint/12.0))
}else{
actual_bright=85
}
new color
if (distance_to_hitpoint!=distance){ // if no line of sight
color=0
}else{ // if line of sight
color=target_team
}
if (damage_done_to==s) {
color=3
damage_done_to=0
}
make_TE_BEAMPOINTS(i,color,v_bone_start,v_bone_end,floatround(scaled_bone_width),target_team,actual_bright)
}
if (admin_options || admin_options || admin_options || admin_options || admin_options || admin_options){
new Float:ret
new Float:x_angle=get_screen_pos(spec_id,v_middle,ret)
// find target with the smallest distance to crosshair (on x-axis)
if (smallest_angle>floatabs(x_angle)){
if (floatabs(x_angle)!=0.0){
smallest_angle=floatabs(x_angle)
view_target=s
smallest_id=s // store nearest target id..
xp=ret // and x,y coordinates of hudmessage
yp=ret
dist=distance
}
}
}
}
}
}
}
} // inner player loop end
if (!is_user_alive(smallest_id)) {
smallest_id=0
xp=-1.0
}
if (smallest_id>0 && admin_options){
draw_aim_vector(i,smallest_id,2000)
}
if (xp>0.0 && xp<=1.0 && yp>0.0 && yp<=1.0){ // if in visible range
// show the player info
set_hudmessage(255, 255, 0, floatabs(xp), floatabs(yp), 0, 0.0, get_cvar_float("esp_timer"), 0.0, 0.0, 2)
new name=""
new tmp
get_user_name(smallest_id,tmp,32)
if (admin_options){
format(name,36,"[%s]^n",tmp)
}
new health=""
if (admin_options){
new hp=get_user_health(smallest_id)
new armor=get_user_armor(smallest_id)
format(health,24,"health: %d armor: %d^n",hp,armor)
}
new clip_ammo=""
new clip,ammo
new weapon_id=get_user_weapon(smallest_id,clip,ammo)
if (admin_options){
format(clip_ammo,21,"clip: %d ammo: %d^n",clip,ammo)
}
new weapon_name=""
if (admin_options){
if ((weapon_id-1)<0 || (weapon_id-1)>29) weapon_id=1
format(weapon_name,20,"weapon: %s^n",weapons)
//copy(weapon_name,9,weapons)
}
new str_dist
if (admin_options){
format(str_dist,18,"distance: %d^n",floatround(dist))
}
show_hudmessage(i, "%s%s%s%s%s",name,health,weapon_name,clip_ammo,str_dist)
}
}
}
set_task(get_cvar_float("esp_timer"),"esp_timer") // keep it going
return PLUGIN_CONTINUE
}
public Float:get_screen_pos(id,Float:v_me_to_target,Float:Ret){
new Float:v_aim
VelocityByAim(id,1,v_aim) // get aim vector
new Float:aim
copyVec(v_aim,aim) // make backup copy of v_aim
v_aim=0.0 // project aim vector vertically to x,y plane
new Float:v_target
copyVec(v_me_to_target,v_target)
v_target=0.0 // project target vector vertically to x,y plane
// both v_aim and v_target are in the x,y plane, so angle can be calculated..
new Float:x_angle
new Float:x_pos=get_screen_pos_x(v_target,v_aim,x_angle) // get the x coordinate of hudmessage..
new Float:y_pos=get_screen_pos_y(v_me_to_target,aim) // get the y coordinate of hudmessage..
Ret=x_pos
Ret=y_pos
return x_angle
}
public Float:get_screen_pos_x(Float:target,Float:aim,&Float:xangle){
new Float:x_angle=floatacos(vectorProduct(aim,target)/(getVecLen(aim)*getVecLen(target)),1) // get angle between vectors
new Float:x_pos
//this part is a bit tricky..
//the problem is that the 'angle between vectors' formula returns always positive values
//how can be determined if the target vector is on the left or right side of the aim vector? with only positive angles?
//the solution:
//the scalar triple product returns the volume of the parallelepiped that is created by three input vectors
//
//i used the aim and target vectors as the first two input parameters
//and the third one is a vector pointing straight upwards
//if now the target is on the left side of spectator origin the created parallelepipeds volume is negative
//and on the right side positive
//now we can turn x_angle into a signed value..
if (scalar_triple_product(aim,target)<0.0) x_angle*=-1 // make signed
if (x_angle>=-45.0 && x_angle<=45.0){ // if in fov of 90
x_pos=1.0-(floattan(x_angle,degrees)+1.0)/2.0 // calulate y_pos of hudmessage
xangle=x_angle
return x_pos
}
xangle=0.0
return -2.0
}
public Float:get_screen_pos_y(Float:v_target,Float:aim){
new Float:target
// rotate vector about z-axis directly over the direction vector (to get height angle)
rotateVectorZ(v_target,aim,target)
// get angle between aim vector and target vector
new Float:y_angle=floatacos(vectorProduct(aim,target)/(getVecLen(aim)*getVecLen(target)),1) // get angle between vectors
new Float:y_pos
new Float:norm_target,Float:norm_aim
// get normalized target and aim vectors
normalize(v_target,norm_target,1.0)
normalize(aim,norm_aim,1.0)
//since the 'angle between vectors' formula returns always positive values
if (norm_target<norm_aim) y_angle*=-1 //make signed
if (y_angle>=-45.0 && y_angle<=45.0){ // if in fov of 90
y_pos=1.0-(floattan(y_angle,degrees)+1.0)/2.0 // calulate y_pos of hudmessage
if (y_pos>=0.0 && y_pos<=1.0) return y_pos
}
return -2.0
}
public get_team(id){
new team
get_user_team(id,team,1)
switch(team){
case 'T':{
return 1
}
case 'C':{
return 2
}
case 'S':{
return 3
}
default:{}
}
return 0
}
// Vector Operations -------------------------------------------------------------------------------
public Float:getVecLen(Float:Vec){
new Float:VecNull={0.0,0.0,0.0}
new Float:len=vector_distance(Vec,VecNull)
return len
}
public Float:scalar_triple_product(Float:a,Float:b){
new Float:up={0.0,0.0,1.0}
new Float:Ret
Ret=a*b-a*b
Ret=a*b-a*b
Ret=a*b-a*b
return vectorProduct(Ret,up)
}
public normalize(Float:Vec,Float:Ret,Float:multiplier){
new Float:len=getVecLen(Vec)
copyVec(Vec,Ret)
Ret/=len
Ret/=len
Ret/=len
Ret*=multiplier
Ret*=multiplier
Ret*=multiplier
}
public rotateVectorZ(Float:Vec,Float:direction,Float:Ret){
// rotates vector about z-axis
new Float:tmp
copyVec(Vec,tmp)
tmp=0.0
new Float:dest_len=getVecLen(tmp)
copyVec(direction,tmp)
tmp=0.0
new Float:tmp2
normalize(tmp,tmp2,dest_len)
tmp2=Vec
copyVec(tmp2,Ret)
}
public Float:vectorProduct(Float:Vec1,Float:Vec2){
return Vec1*Vec2+Vec1*Vec2+Vec1*Vec2
}
public copyVec(Float:Vec,Float:Ret){
Ret=Vec
Ret=Vec
Ret=Vec
}
public subVec(Float:Vec1,Float:Vec2,Float:Ret){
Ret=Vec1-Vec2
Ret=Vec1-Vec2
Ret=Vec1-Vec2
}
public addVec(Float:Vec1,Float:Vec2){
Vec1+=Vec2
Vec1+=Vec2
Vec1+=Vec2
}
// Temporary Entities ------------------------------------------------------------------------------
// there is a list of much more temp entities at: http://djeyl.net/forum/index.php?act=Attach&type=post&id=290870
// all messages are sent with MSG_ONE_UNRELIABLE flag to avoid overflow in case of very low esp_timer setting and much targets
public make_TE_BEAMPOINTS(id,color,Float:Vec1,Float:Vec2,width,target_team,brightness){
message_begin(MSG_ONE_UNRELIABLE ,SVC_TEMPENTITY,{0,0,0},id) //message begin
write_byte(0)
write_coord(floatround(Vec1)) // start position
write_coord(floatround(Vec1))
write_coord(floatround(Vec1))
write_coord(floatround(Vec2)) // end position
write_coord(floatround(Vec2))
write_coord(floatround(Vec2))
write_short(laser) // sprite index
write_byte(3) // starting frame
write_byte(0) // frame rate in 0.1's
write_byte(floatround(get_cvar_float("esp_timer")*10)) // life in 0.1's
write_byte(width) // line width in 0.1's
write_byte(0) // noise amplitude in 0.01's
write_byte(esp_colors)
write_byte(esp_colors)
write_byte(esp_colors)
write_byte(brightness) // brightness)
write_byte(0) // scroll speed in 0.1's
message_end()
}
public make_TE_BEAMENTPOINT(id,Float:target_origin,width,target_team){
message_begin(MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,{0,0,0},id)
write_byte(1)
write_short(id)
write_coord(floatround(target_origin))
write_coord(floatround(target_origin))
write_coord(floatround(target_origin))
write_short(laser)
write_byte(1)
write_byte(1)
write_byte(floatround(get_cvar_float("esp_timer")*10))
write_byte(width)
write_byte(0)
write_byte(team_colors)
write_byte(team_colors)
write_byte(team_colors)
write_byte(255)
write_byte(0)
message_end()
}
回复: Admin Spectator ESP v1.3 谁来作个汉化。
请问这个是什么插件??有何用处回复: Admin Spectator ESP v1.3 谁来作个汉化。
与管理员视角有关吧,具体我也在研究中。回复: Admin Spectator ESP v1.3 谁来作个汉化。
这个很早就有了AE自己不能汉化吗???
晕
回复: Admin Spectator ESP v1.3 谁来作个汉化。
我在AMXX的一个论坛上也看到了 也下载用了 作者的原意是管理员死后可以通过这样以第一视角观察玩家来判断是否有人作B 墙后的敌人以绿色小块表示 枪口瞄准方向以一道射线表示等 个人认为作用不是很大回复: Admin Spectator ESP v1.3 谁来作个汉化。
Post by 如花我在AMXX的一个论坛上也看到了 也下载用了 作者的原意是管理员死后可以通过这样以第一视角观察玩家来判断是否有人作B 墙后的敌人以绿色小块表示 枪口瞄准方向以一道射线表示等 个人认为作用不是很大
Nod.................
回复: Admin Spectator ESP v1.3 谁来作个汉化。
嗯!如果是那样的话作用应该很大啊
对管理员判断作弊有很大的帮助!
回复: Admin Spectator ESP v1.3 谁来作个汉化。
唉~~~~使用了一下,发现作用不是很大,画面太花了,根本看不清楚,能关掉一些就好了。
还有就是刷新率也低了一点,色块总是跟不上玩家的移动速度。
页:
[1]