DarkRP getting players team name?

Hello everyone, I remember seeing a way to get the players team name in DarkRP.

Right now im using this method:

function ENT:Use( activator, caller)
	if team.GetName(activator:Team()) == "Mayor" then

But i’m pretty sure there was a way that returns something like TEAM_MAYOR or something similar.

Someone mind telling me the proper way to get the players job in DarkRP? (If i didnt do it correctly)

if activator:Team() == WHATEVER then

Thanks a tonne mate

you could also use ply:getDarkRPVar(“job”) == “whatever”