View Single Post
  #2  
Old 08-11-2012, 04:12 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
So what you'll do is you'll have to make use of a server time variable "timevar"/"timevar2" store that in a client string and then when the player comes to vote again, compare the distance between the current time and the recorded time, if it's greater than 24 hours let them vote again.

PHP Code:
function onPlayervotes(){
  if (
timevar2 clientr.voteTime >= 24*360){
    
server.votes ++;
    
clientr.voteTime timevar2;
    return 
true;
  }
  else return 
false;

Of course to set a clientr variable you must be on the serverside and there you wouldn't have the player scope so you still have some work to do.
Good luck.
Reply With Quote