I was going to delete this but thought I may as well share it rather than delete it for learning purposes ,
it may help someone so here is an aimbot , have fun.
if (isnil "AIMBOTAIMASSIST" ) then {AIMBOTAIMASSIST=0;};
[] spawn {
while {AIMBOTAIMASSIST==1} do
{
sleep 0.1;
_tx=0;
_ty=0;
_direction=0;
_ttx=0;
_tty=0;
_posbaddy=0;
_name=0;
_side=0;
_gothim=0;
_dst=0;
_olddist=200;
AIMBOTTARGETx =0;
{if (player !=_x && !isplayer _x && ((side _x) getFriend (side Player) < 0.6) && vehicle _x isKindOf "Man" && alive _x) then {
//{if (player !=_x && !isplayer _x && ((side _x) getFriend (side Player) < 0.6) && alive _x) then { // add if you wish to kill anything not just men
_posbaddy=getpos (vehicle _x);
_dst=round (_posbaddy distance (vehicle player));
_pos=worldToScreen _posbaddy;
if ( (_pos select 0 > 0.40 && _pos select 0 < 0.70 && _pos select 1 > 0.40 && _pos select 1 < 0.70) ) then
{
_gothim=1;
//_olddist=_dst; add if you wish to kill nearest target only to cross hair
_tx = vehicle _x;
};
};
sleep 0.01;} forEach allUnits;
if (_gothim==1) then{
AIMBOTTARGETx =_tx;
hintsilent "got target";
};
_olddist=500;
};
sleep 1;
};
Create file named Aimbot.sqf then Paste code above into Aimbot.sqf then save Aimbot.sqf.
-- -- ------ 2 -------------
Create file name it InitBullet.sqf copy code below , paste into InitBullet.sqf , save as InitBullet.sqf.
_b = _this select 0;
_bullet = nearestobject [player, _b];
if (AIMBOTTARGETx != vehicle player) then {
_bullet setpos [getpos AIMBOTTARGETx select 0,getpos AIMBOTTARGETx select 1,(getpos AIMBOTTARGETx select 2)+random 0.8];
};
----- 3 ------
create file AimbotOn.sqf
paste below code into file , save file as AimbotOn.sqf.
if (isnil "Dammagek") then {Dammagek=0;};
if (Dammagek==0) then
{
player addeventhandler ["fired", {[_this select 4] exec "\InitBullet.sqf"}];
Dammagek=1;
[] execvm "\Aimbot.sqf";
hint "Aimbot ON!!!";
}
else
{
player removealleventhandlers "fired";
Dammagek=0;
hint "AImbot is off!";
};
Call like this
[] execvm 'AimbotOn.sqf';
---------
As is it , this will kill any enemy target on the screen ,
Though it can be easily modified to kill anything close to you ( team mates if you wish , zombies , rabbits , sheep etc ) by changing a few things if you want it to do that.
Instructions to use : Fire your weapon they die.
Aimbot / aim assist , credits: Mrmedic , everyone who ever opend an sqf and changed something , Bis for making the game engine.