here is the keybind
admin_killtarg =
{
killmyself = player; publicvariableserver "killmyself";
};
(findDisplay 46) displayAddEventHandler ['KeyDown', 'if ((_this select 1) == 0x57) then
{
call admin_killtarg;
}'];
"killmyself" addPublicVariableEventHandler
{
_agent = _this select 1;
_startpos = getpos _agent;
_agent playaction "suicide";
_eh = _agent addeventhandler ["fired",{(_this select 0) setdamage 1} ];
[_agent,_startpos] spawn
{
waitUntil {floor((_this select 1) distance getpos (_this select 0)) > 0.001};
(_this select 0) removeAllEventHandlers "fired";
};
};
admin_killtarg =
{
killmyself = player; publicvariableserver "killmyself";
};
(findDisplay 46) displayAddEventHandler ['KeyDown', 'if ((_this select 1) == 0x57) then
{
call admin_killtarg;
}'];
"killmyself" addPublicVariableEventHandler
{
_agent = _this select 1;
_startpos = getpos _agent;
_agent playaction "suicide";
_eh = _agent addeventhandler ["fired",{(_this select 0) setdamage 1} ];
[_agent,_startpos] spawn
{
waitUntil {floor((_this select 1) distance getpos (_this select 0)) > 0.001};
(_this select 0) removeAllEventHandlers "fired";
};
};