Auto-Kick based on GMod game time

My SandBox server gets too many minges and trolls. Its gotten so annoying I decided to code a command that will automaticly kick players if they have less than X hours of playtime on GMod.
There’s only 1 problem: I have no idea how to code something like that.
Can anyone help me?

P.S. I’ve looked at THIS thread, it didn’t help.

Ty in advance

How has the thread not helped? The last two posts explain what to do.

…What? What if someone new joins then they get automatically kicked?

Say you have a professional car/vehicle building server with ACF, SProps, and wiremod.

A newbie with 5 hours total on Garry’s mod joins.

They are not wanted on a professional vehicle build server, since 95% of the time newbies either spam entities, spam every weapon, or they drive around jeeps with thrusters spammed on them.

This is what he was talking about.


Use the Steam Web API to find a player’s gmod playtime

Using the JSON (or xml), you can determine if a player has enough playtime

I fixed the code from before.
It was simply in the wrong location.
Ty for the help
You can close this I guess…