Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. ["slay", {
  2. params ["_name"];
  3. _fnc_findMatch = {
  4. _matches = [];
  5. {
  6. if ([_name, name _x] call BIS_fnc_inString) then {
  7. _matches pushBack _x;
  8. };
  9. } forEach ([] call CBA_fnc_players);
  10.  
  11. if (count _matches == 1) exitWith {_matches select 0};
  12. objNull
  13. };
  14. _unit = _name call _fnc_findMatch;
  15. if(isNull _unit)exitWith{systemChat "Cannot find a player with that name, try again.";};
  16. if(!(_unit call FNC_alive))exitWith{systemChat "ERROR: Player is already dead.";};
  17. systemChat "Sucess, player slayed.";
  18. _unit setDamage 1;
  19. }, "adminLogged"] call CBA_fnc_registerChatCommand;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement