DarkRP custom job only available when an admin is online

Hey, I was wondering how to setup a custom job for DarkRP that you can only become when an admin is online.

Thanks,
Kalayah

Just use a custom check to see if there are admins online and return false if there isn’t.

on customcheck function create local variable = 0, loop through the players, use the statement check to check if any of them are admins, if they are, then increase the variable by 1. another statement, check if variable is higher than 0, then return true - else, return false



customCheck = function( ply ) 
     for _,v in pairs(player.GetAll())
          if v:IsAdmin() then
               return true
          end
     end
     return false
end



I wanted to reply the exact same but when I tested it it didn’t seem to work.

Yep thats perfect

If you show us what you tried, we can probably fix it