DarkRP.Player.IsCP Function


So I was looking into making a function for CPs only (In DarkRP). I’m currently using DarkRP 2.4.3, since a lot of good addons haven’t been updated to 2.5 yet.

Anyway, so I was looking at the function, which can be found here.
I was wondering if there was anyway to make the this function for CPs only.

You can find the function I’m trying to make CP only here.

Any help is greatly appreciated!

if ply:IsValid() and ply:isCP( ) then

Thanks =)