When you add your hit event I think it should be:
this addEventHandler ["hit",{_this exec "debris.sqs"}]
The "_This" between the {} is an array supplied by the event itself.
_this select 0 : who's hit (can be either a man or a vehicle) ;
_this select 1 : who did (h)it ;
_this select 2 : scalar damage value.
Take a look here for more on events:
http://www.ofpec.com/editors/resource_view.php?id=543The same applies to your script:
? "Ch47D" counttype [this] == 1 || "Mi17" counttype [this] == 1|| "MI24" counttype [this] == 1|| "Kamov" counttype [this] == 1|| "SU25" counttype [this] == 1|| "Cobra" counttype [this] == 1|| "A10" counttype [this] == 1|| "A10LGB" counttype [this] == 1|| "AH64" counttype [this] == 1|| "UH60" counttype [this] == 1|| "UH60MG" counttype [this] == 1: _weight = 1.2
You cant use This from within a script, I think the value your after would be (_this select 1) e.g
? "Ch47D" counttype [(_this select 1)] == 1....e.t.c
Sorry I cant test more, but to be honest if I where you I would start from scratch again and do it one step at a time. Try and get the vehicle thats firing first, before worrying about the drop command. For example you could use:
Debris.sqs
_Target=_This Select 0
_Firing=_This Select 1
_Vehicle=Vehicle _Firing
If ((TypeOf _Vehicle) In ["Ch47D","Mi17","MI24","Kamov"]) Then {Hint Format ["You are being fired at by a %1",TypeOf Vehicle]}