heres the code
scarey=_this select 0;
dayz_playerUID,dayz_characterID,"Sniper1_DZ" spawn player_humanityMorph;sleep 0.5
_dd=0;
if (scarey=="") exitwith { hint "You must select a player name from the list"; };hint format["Teleporting To %1 inside a 25 meter range its scare scarey time :)", scarey];
{if (name _x == scarey) then {
_dd=1;
_posbaddy=getpos _x;_pos=getpos _x; _tx = (getPos _x select 0) + (25*sin(((getDir _x) +180)); _ty = (getPos _x select 1) + (25*cos((getDir _x)) +180));
_ttx = (sin(((getDir _x) -180)); _tty = (cos((getDir _x) -180)));
player setpos [_tx,_ty,_posbaddy select 2];player setVariable["lastPos",234, true];player setDir (getDir _x)-180;
};
}forEach allunits;
if (_dd==1) then {hint format["you are now 25 meters directly infront of %1. play a zombie sound.", scarey];};if (_dd==0) then {hint format["Player Not Found or player is dead or respawning.", scarey];};
scarey=nil;
// added anti copy pasta