Hey,
I will write a similar script, you have mentioned in the description. It will check whether the user already clicks an ad in 24 hours if yes then it won't count maybe we can redirect to the dashboard otherwise it will allow the user to click an ad and record that click.
Ping me back, so we can discuss it and start asap.
Regards,
Nabeel Abid