|
#define MAX_POS 20 new CheckAim; new PosActual[MAX_PLAYERS] ; new Float:xpos[MAX_POS][MAX_PLAYERS],Float:ypos[MAX_POS][MAX_PLAYERS],Float:zpos[MAX_POS][MAX_PLAYERS]; public OnFilterScriptInit() { CheckAim = SetTimer("ChecarAim",100,1); return 1; stock Float:Distance2D(Float:x1, Float:y1, Float:x2, Float:y2, bool:sqrt = true) { x1 -= x2; x1 *= x1; y1 -= y2; y1 *= y1; x1 += y1; return sqrt ? floatsqroot(x1) : x1; } forward ChecarAim(); public ChecarAim() { for (new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && !IsPlayerInAnyVehicle(i)) { if(GetPlayerCameraMode(i) == 53) { new aimid; aimid = GetPlayerTargetPlayer(i); if(aimid != INVALID_PLAYER_ID) { new Float:xvec,Float:yvec,Float:zvec; GetPlayerCameraFrontVector(i,xvec,yvec,zvec); new Float: fDistance = GetPlayerDistanceFromPoint(aimid, xpos[PosActual[aimid]][aimid], ypos[PosActual[aimid]][aimid], zpos[PosActual[aimid]][aimid]); PosActual[aimid]++; if(PosActual[aimid] == MAX_POS)PosActual[aimid] = 0; if(fDistance > 0.1 ) { Apuntando[i]++; if(Apuntando[i] == 20) { Apuntando[i] = 0; new str[120]; for (new b = 0; b < MAX_POS; b++) { new Float:distance = Distance2D(xpos[b][aimid], ypos[b][aimid], xvec, yvec); if(distance <= 1) { format(str,sizeof str,"%s sospechado de Aimbot %.2f %.2f %.2f %.2f",PlayerName2(i),xvec,yvec,xpos[b][aimid], ypos[b][aimid]); for (new y = 0; y < MAX_PLAYERS; y++) { if(IsPlayerConnected(y) && IsPlayerAdmin(y)) { SendClientMessage(y,-1,str); } } } } } } else { Apuntando[i] = 0; } GetPlayerPos(aimid,xpos[PosActual[aimid]][aimid], ypos[PosActual[aimid]][aimid], zpos[PosActual[aimid]][aimid]); } else { Apuntando[i] = 0; } } } } return 1; } |
|
If I delete, send many false reports. I need a way to check the center of the skin (OffsetX 0.0 , OffsetY 0.0) when the player shoots or aims.
|
|
Sorry, I said ~Delete~ cuz I posted something stupid before and wanted someone to delete my post.
|