Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Elektro on May 25, 2021, 11:07:53 AM

Title: Restricting DarkRP Jobs using UTime
Post by: Elektro on May 25, 2021, 11:07:53 AM
Hi, I need help with using UTime (i'm not a very experimented LUA user).

I want to restrict a job until you have "x" hours in the server.

For example, people who want to be Police need to have 2 hours playing.
Title: Re: Restricting DarkRP Jobs using UTime
Post by: jakej78b on May 30, 2021, 05:01:57 PM
Code: [Select]
local x = 3 -- time in hours
CustomCheckFailMsg = function(ply) return ply:GetUTimeTotalTime() < x * 60 * 60 end

Add this into your job and it will make it so only people who have played for x hours can become the job.