An added action automatcially passes such information to the script it executes. I didn't know this til recently, but here it is.
Example:
Make a jeep or ammo crate or something, and put this in the init:
this addAction ["Do Action","doaction.sqs"]
;; doaction.sqs
;; does something if the soldier's name is w1
;; and removes action from object
;; the parameters of an action-triggered script are as follows
;; object action was added to
_obj = _this select 0
;; soldier who triggered the action
_soldier = _this select 1
;; index of the action
_index = _this select 2
;; if the soldier's name was not w1, return msg and exit
;; only return msg to player that tried to activate
?(!(_soldier == w1) AND player == _soldier): hint "You can't do that!"
?!(_soldier == w1): exit
;; example event for the action
_soldier addWeapon "M60"
?(player == _soldier): hint "Go get em, Rambo!"
;; remove the action
_obj removeAction _index
exit
There you go.