mirror of
https://github.com/Ghostrider-DbD-/GMS_RC.git
synced 2024-08-30 16:02:11 +00:00
30 lines
614 B
Plaintext
30 lines
614 B
Plaintext
/*
|
|
Delete a unit.
|
|
by Ghostrider
|
|
|
|
--------------------------
|
|
License
|
|
--------------------------
|
|
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
|
|
|
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
*/
|
|
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
|
|
|
private["_ai","_group"];
|
|
params["_unit"];
|
|
|
|
{
|
|
_unit removeAllEventHandlers _x;
|
|
}forEach ["reloaded"];
|
|
{
|
|
_unit removeAllMPEventHandlers _x;
|
|
} forEach ["MPKilled","MPHit"];
|
|
_group = (group _unit);
|
|
deleteVehicle _unit;
|
|
if (count units _group isEqualTo 0) then
|
|
{
|
|
deletegroup _group;
|
|
};
|
|
|