View Single Post
  #2  
Old 08-25-2011, 03:24 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
Use timevar, so basically...
you set the time you want the player to get out

PHP Code:
client.jailrelease=timevar+(hours*720); 
then
PHP Code:
if (client.jailrelease<timevar)
{
//release the player

I get 720 since timevar increments by 1 every 5 seconds
so 60*60/5 == 720

Edit: In case you might not fully understand timevar is just a variable that the server increments by 1 ever 5 seconds, so its forever going up. Therefore the way in which you can apply timevar is very straight forward. Timevar2 is a more accurate way of judging time(increments every .1 of a second, maybe faster lol but the basis is its a more accurate presentation of time) but I tend to avoid it when doing big time distance calculations as it just ends up giving you messy numbers. Hope this helped you.

Have fun

Last edited by Tricxta; 08-25-2011 at 03:52 AM.. Reason: just further elaboration on this
Reply With Quote