Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ["slay", {
- params ["_name"];
- _fnc_findMatch = {
- _matches = [];
- {
- if ([_name, name _x] call BIS_fnc_inString) then {
- _matches pushBack _x;
- };
- } forEach ([] call CBA_fnc_players);
- if (count _matches == 1) exitWith {_matches select 0};
- objNull
- };
- _unit = _name call _fnc_findMatch;
- if(isNull _unit)exitWith{systemChat "Cannot find a player with that name, try again.";};
- if(!(_unit call FNC_alive))exitWith{systemChat "ERROR: Player is already dead.";};
- systemChat "Sucess, player slayed.";
- _unit setDamage 1;
- }, "adminLogged"] call CBA_fnc_registerChatCommand;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement