There isn't really any scripting necessary, player UAVs and UGVs flag as hostile to mission AI, the question is do they have a weapon that can damage it, and do they detect it.
What I found to be most effective at controlling this problem is to price every thing low enough that players can reasonably afford to buy the counters to whatever the other players are doing.