How to get online state of cops?



Am trying to do a check were it will scan online for any current online cops or ems so on but not found anything am wondering if anyone has done this before and can help?

sample idea

if cop == ‘online’ then
// cops found
// no cops found



How are you storing data that someone is actually a cop?
You could for example store that server side and assigning it when someone joins/leaves server and in this case if he is a cop…


is it not possible just to look the connections already connected and pull of there job tag and if cop is found on any of them its counted ?


But how do you assign a job to a player…?
There could be many meanings to that.


my idea was use GetPlayers and loop the database to find all the cops that are in data then filter only the active police officers by using NetworkIsPlayerActive(id) this is all in my mind not yet really coded it just want to know if it possible ?