View Single Post
  #17  
Old 08-26-2011, 04:55 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
If you want a timer to keep track of how long even while the player is offline you'll simply need to compare timevar2's.

When you jail the player, save a clientr of the current timevar2(on serverside) and time to stay jailed. For example: clientr.jailtime = {timevar2,days*24+hours*60+minutes*60}; Days, hours and minutes are simply representing real time you want them to be jailed.

Then every time they log in(or in the jail level, in a loop) do something like:

PHP Code:
if (timevar2 clientr.jailtime[0] + clientr.jailtime[1]) {
  
// JAIL TIME OVER!

Alternatively you can have a DBNPC that handles all jailings.

Not only would doing this clientside yield undesired results, it would also be extremely insecure. I wouldn't trust the clientside to handle any of it, if it's meant for a jailing system.
Reply With Quote