Feche1320 Posted March 29, 2012 Share Posted March 29, 2012 Is there any way to lock the time to a specific our without using a timer? Like setTimeLocked ? Thanks Link to comment
X-SHADOW Posted March 29, 2012 Share Posted March 29, 2012 gMe = getLocalPlayer() function stoptime () setTimer (Timer, 2000, 0) setTime (12, 15) setWeather (17) end function Timer() setTime (12, 15) setWeather (17) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), stoptime ) Link to comment
qaisjp Posted March 29, 2012 Share Posted March 29, 2012 client code: local __TimeLock function setTimeLocked(bool, hour, minute) if bool then hour = tonumber(hour) if (not hour) or hour<0 or hour>23 then hour = getTime() end if (not tonumber(minute)) or minute<0 or minute>59 then _, minute = getTime() end __TimeLock = setTimer(setTime, 100, 0, hour, minute) else if isTimer(__TimeLock) then killTimer(__TimeLock) end end end untested setTimeLocked(true) locks time with current time setTimeLocked(true, 12, 0) locks time at 12 oclock setTimeLocked(false) unlocks time Link to comment
X-SHADOW Posted March 29, 2012 Share Posted March 29, 2012 dont use lua tags with value its bugged Link to comment
qaisjp Posted March 29, 2012 Share Posted March 29, 2012 dont use lua tags with value its buggeddafuq you complaining about.. Link to comment
drk Posted March 29, 2012 Share Posted March 29, 2012 X-SHADOW Lua tags aren't bugged LOL. Link to comment
Al3grab Posted March 29, 2012 Share Posted March 29, 2012 without a timer ? addEventHandler("onClientRender",root,function() setTime(12,00) end ) Link to comment
Kenix Posted March 29, 2012 Share Posted March 29, 2012 (edited) without a timer ? addEventHandler("onClientRender",root,function() setTime(12,00) end ) setTime in render oO Anyway better use setMinuteDuration. Edited March 29, 2012 by Guest Link to comment
qaisjp Posted March 29, 2012 Share Posted March 29, 2012 without a timer ? addEventHandler("onClientRender",root,function() setTime(12,00) end ) its funny how someone who is a complete n00b has a signature proving another person to be a noob. What you just gave him was a waste of processing AND a waste of perfectly good utility code. Edit: Or: setMinuteDuration(133333333333333333333337) Link to comment
Al3grab Posted March 31, 2012 Share Posted March 31, 2012 without a timer ? addEventHandler("onClientRender",root,function() setTime(12,00) end ) its funny how someone who is a complete n00b has a signature proving another person to be a noob. What you just gave him was a waste of processing AND a waste of perfectly good utility code. Edit: Or: setMinuteDuration(133333333333333333333337) he said that he don't want to use a timer , so i gave him that ! , and don't say noob to someone you don't really know Link to comment
qaisjp Posted March 31, 2012 Share Posted March 31, 2012 he said that he don't want to use a timer , so i gave him that ! , and don't say noob to someone you don't really know nah al3grab,you are still a noob Link to comment
Al3grab Posted March 31, 2012 Share Posted March 31, 2012 he said that he don't want to use a timer , so i gave him that ! , and don't say noob to someone you don't really know nah al3grab,you are still a noob then what are you ? Link to comment
qaisjp Posted March 31, 2012 Share Posted March 31, 2012 he said that he don't want to use a timer , so i gave him that ! , and don't say noob to someone you don't really know nah al3grab,you are still a noob then what are you ? An awesome scripter who has gone through many situations within Multi Theft Auto since 2010 winter, who is also a veteran on this forum and infamous. Problem? Link to comment
AGENT_STEELMEAT Posted March 31, 2012 Share Posted March 31, 2012 No, you are a script thief who is on the run from his bad history. But al3grab is still a noob. Also - best solution is to set the time to the same time every render. Link to comment
qaisjp Posted March 31, 2012 Share Posted March 31, 2012 No, you are a script thief who is on the run from his bad history. But al3grab is still a noob. Also - best solution is to set the time to the same time every render. a) cant complain, but i 'was' once, not anymore (lets not talk about that shit in this topic now) b) if you set it every render is that kind of redundant, the time doesnt change every frame Link to comment
AGENT_STEELMEAT Posted March 31, 2012 Share Posted March 31, 2012 Are you sure you don't want to talk about it? I'm sure nothing BAD would come up, I mean it's not like you stole from 2 major servers on MTA, got called out for it, and changed your name to avoid the consequences. That would be PREPOSTEROUS. Setting the time every render is the easy solution - it's guaranteed to be accurate (because nobody can setMinuteDuration low enough, while with a timer they could) and there won't be much overhead (while with a high-frequency timer, there would be). Link to comment
Al3grab Posted March 31, 2012 Share Posted March 31, 2012 then what are you ? An awesome scripter who has gone through many situations within Multi Theft Auto since 2010 winter, who is also a veteran on this forum and infamous. Problem? it looks that you are a thief No, you are a script thief who is on the run from his bad history. But al3grab is still a noob. Also - best solution is to set the time to the same time every render. and why i am a noob Link to comment
Castillo Posted March 31, 2012 Share Posted March 31, 2012 This has gone to nowhere, I'm locking this. Link to comment
Recommended Posts