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?