View Single Post
  #1  
Old 08-30-2011, 03:58 AM
furry_mougle furry_mougle is offline
big heart
furry_mougle's Avatar
Join Date: Aug 2011
Posts: 42
furry_mougle is an unknown quantity at this point
timevar2 question

i'm utilizing timevar2 for a renting system, however i've come into a problem when comparing rentTime to timevar2. essentially if you do something like this

PHP Code:
function onActionRentTime(){

  
rentTime timevar2 6// somewhat stupid comparison

  
if( timevar2 >= rentTime ){
    
player.chat "Rent expired!";
  }
  

timevar2 is always incrementing, so there is no real way to compare the var rentTime to timevar because it'll always be greater than 6. (since it always increments). however, if there was a way to freeze the current timevar and THEN compare it to 6 and wait for the incrementing timevar to get over 6, thus leading the rent to expire that would be a much greater solution.

so, is there a way to freeze the current timevar2/ record it somehow?
Reply With Quote