Pawn ai - decide between friendly and enemy and different priorities of enemies (actor arrays?)

ive now found lots of info on the wiki and in the documentation:

this was the best for the basics:

here under A theres lots of tutorials about AI,

his one helped me the most: (a bit advanced)